提交 08dd988b 编写于 作者: C Christophe Leroy 提交者: Tom Rini

powerpc, 8xx: fix missing function declarations.

Add missing .h and add missing declarations in .h
Declare local functions as static.  Make interrupt_init_cpu function
signatures consistent with how decrementer_count is declared.

Based on warnings reported by 'make C=2'
Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
[trini: drop cpu_init_f as 8xx/83xx are different from the rest, rework
interrupt_init_cpu/decrementer_count]
Signed-off-by: NTom Rini <trini@konsulko.com>
上级 ba2c5a5c
......@@ -20,7 +20,7 @@
#include <post.h>
#endif
int interrupt_init_cpu(unsigned int *decrementer_count)
int interrupt_init_cpu(unsigned *decrementer_count)
{
ccsr_pic_t __iomem *pic = (void *)CONFIG_SYS_MPC8xxx_PIC_ADDR;
......
......@@ -23,7 +23,7 @@
#include <post.h>
#endif
int interrupt_init_cpu(unsigned long *decrementer_count)
int interrupt_init_cpu(unsigned *decrementer_count)
{
volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
volatile ccsr_pic_t *pic = &immr->im_pic;
......@@ -43,7 +43,7 @@ int interrupt_init_cpu(unsigned long *decrementer_count)
pic->gcr = MPC86xx_PICGCR_MODE;
*decrementer_count = get_tbclk() / CONFIG_SYS_HZ;
debug("interrupt init: tbclk() = %ld MHz, decrementer_count = %ld\n",
debug("interrupt init: tbclk() = %ld MHz, decrementer_count = %d\n",
(get_tbclk() / 1000000),
*decrementer_count);
......
......@@ -19,7 +19,7 @@
DECLARE_GLOBAL_DATA_PTR;
int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
static int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
sysconf8xx_t __iomem *sc = &immap->im_siu_conf;
......@@ -36,7 +36,8 @@ int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
static int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
{
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
memctl8xx_t __iomem *memctl = &immap->im_memctl;
......@@ -58,7 +59,7 @@ int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
int do_carinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
static int do_carinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
car8xx_t __iomem *car = &immap->im_clkrst;
......@@ -119,7 +120,7 @@ static void binary(char *label, uint value, int nbits)
#define PC_NBITS 12
#define PD_NBITS 13
int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
static int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
iop8xx_t __iomem *iop = &immap->im_ioport;
......@@ -172,7 +173,7 @@ int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
* this needs a clean up for smaller tighter code
* use *uint and set the address based on cmd + port
*/
int do_iopset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
static int do_iopset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
uint rcode = 0;
iopin_t iopin;
......@@ -328,7 +329,7 @@ static void prbrg(int n, uint val)
putc('\n');
}
int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
static int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
cpm8xx_t __iomem *cp = &immap->im_cpm;
......
......@@ -52,7 +52,7 @@ static void print_backtrace(unsigned long *sp)
printf("\n");
}
void show_regs(struct pt_regs *regs)
static void show_regs(struct pt_regs *regs)
{
int i;
......
......@@ -122,6 +122,10 @@ static inline void set_msr(unsigned long msr)
void print_reginfo(void);
#endif
int interrupt_init_cpu(unsigned *);
void timer_interrupt_cpu(struct pt_regs *);
unsigned long search_exception_table(unsigned long addr);
#endif /* !__ASSEMBLY__ */
#ifdef CONFIG_PPC
......
......@@ -18,6 +18,8 @@
#include <environment.h>
#include <asm/byteorder.h>
#include <asm/mp.h>
#include <bootm.h>
#include <vxworks.h>
#if defined(CONFIG_OF_LIBFDT)
#include <libfdt.h>
......
......@@ -28,9 +28,6 @@ void __board_show_activity (ulong dummy)
#define CONFIG_SYS_WATCHDOG_FREQ (CONFIG_SYS_HZ / 2)
#endif
extern int interrupt_init_cpu (unsigned *);
extern void timer_interrupt_cpu (struct pt_regs *);
static unsigned decrementer_count; /* count value for 1e6/HZ microseconds */
static __inline__ unsigned long get_dec (void)
......
......@@ -10,6 +10,7 @@
#include <commproc.h>
#include <malloc.h>
#include <net.h>
#include <netdev.h>
#include <asm/io.h>
#include <phy.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册