From 3ec924a3cb7bc3b37be9adec695d7c3d563b3d2c Mon Sep 17 00:00:00 2001 From: wdenk Date: Sun, 3 Apr 2005 17:23:39 +0000 Subject: [PATCH] Patch by Steven Scholz, 25 Oct 2004: Declare reset_cpu() in include/common.h instead locally --- CHANGELOG | 3 +++ cpu/arm1136/cpu.c | 2 -- cpu/arm1136/interrupts.c | 1 - cpu/arm720t/cpu.c | 2 -- cpu/arm720t/interrupts.c | 2 -- cpu/arm920t/cpu.c | 2 -- cpu/arm920t/interrupts.c | 2 -- cpu/arm920t/s3c24x0/interrupts.c | 1 - cpu/arm925t/cpu.c | 2 -- cpu/arm925t/interrupts.c | 1 - cpu/arm926ejs/cpu.c | 2 -- cpu/arm926ejs/interrupts.c | 1 - cpu/at91rm9200/cpu.c | 2 -- cpu/at91rm9200/interrupts.c | 2 -- cpu/i386/cpu.c | 2 -- cpu/ixp/cpu.c | 2 -- cpu/ixp/interrupts.c | 2 -- cpu/lh7a40x/cpu.c | 2 -- cpu/lh7a40x/interrupts.c | 1 - cpu/pxa/cpu.c | 2 -- cpu/pxa/interrupts.c | 2 -- cpu/s3c44b0/cpu.c | 2 -- cpu/s3c44b0/interrupts.c | 2 -- cpu/sa1100/cpu.c | 2 -- cpu/sa1100/interrupts.c | 2 -- include/common.h | 1 + 26 files changed, 4 insertions(+), 43 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index dcb907e..a91ac93 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ Changes for U-Boot 1.1.3: ====================================================================== +* Patch by Steven Scholz, 25 Oct 2004: + Declare reset_cpu() in include/common.h instead locally + * Patch by Yusdi Santoso, 22 Oct 2004: - Add support for HIDDEN_DRAGON board - fix endianess problem in driver/rtl1839.c diff --git a/cpu/arm1136/cpu.c b/cpu/arm1136/cpu.c index d5c5dc8..7fa5ddc 100644 --- a/cpu/arm1136/cpu.c +++ b/cpu/arm1136/cpu.c @@ -131,8 +131,6 @@ int cleanup_before_linux (void) int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - extern void reset_cpu (ulong addr); - disable_interrupts (); reset_cpu (0); /*NOTREACHED*/ diff --git a/cpu/arm1136/interrupts.c b/cpu/arm1136/interrupts.c index e87a628..c80d9a5 100644 --- a/cpu/arm1136/interrupts.c +++ b/cpu/arm1136/interrupts.c @@ -35,7 +35,6 @@ #include #include -extern void reset_cpu(ulong addr); #define TIMER_LOAD_VAL 0 /* macro to read the 32 bit timer */ diff --git a/cpu/arm720t/cpu.c b/cpu/arm720t/cpu.c index ef3fbf3..5421aff 100644 --- a/cpu/arm720t/cpu.c +++ b/cpu/arm720t/cpu.c @@ -84,8 +84,6 @@ int cleanup_before_linux (void) int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - extern void reset_cpu (ulong addr); - disable_interrupts (); reset_cpu (0); /*NOTREACHED*/ diff --git a/cpu/arm720t/interrupts.c b/cpu/arm720t/interrupts.c index 842a443..a7ea70a 100644 --- a/cpu/arm720t/interrupts.c +++ b/cpu/arm720t/interrupts.c @@ -31,8 +31,6 @@ #include #include -extern void reset_cpu(ulong addr); - #ifndef CONFIG_NETARM /* we always count down the max. */ #define TIMER_LOAD_VAL 0xffff diff --git a/cpu/arm920t/cpu.c b/cpu/arm920t/cpu.c index 2a2b578..718f253 100644 --- a/cpu/arm920t/cpu.c +++ b/cpu/arm920t/cpu.c @@ -124,8 +124,6 @@ int cleanup_before_linux (void) int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - extern void reset_cpu (ulong addr); - disable_interrupts (); reset_cpu (0); /*NOTREACHED*/ diff --git a/cpu/arm920t/interrupts.c b/cpu/arm920t/interrupts.c index ea58f15..bfab519 100644 --- a/cpu/arm920t/interrupts.c +++ b/cpu/arm920t/interrupts.c @@ -34,8 +34,6 @@ #include #include -extern void reset_cpu(ulong addr); - #ifdef CONFIG_USE_IRQ /* enable IRQ interrupts */ void enable_interrupts (void) diff --git a/cpu/arm920t/s3c24x0/interrupts.c b/cpu/arm920t/s3c24x0/interrupts.c index 92298b0..f581d6d 100644 --- a/cpu/arm920t/s3c24x0/interrupts.c +++ b/cpu/arm920t/s3c24x0/interrupts.c @@ -39,7 +39,6 @@ #include #endif -extern void reset_cpu(ulong addr); int timer_load_val = 0; /* macro to read the 16 bit timer */ diff --git a/cpu/arm925t/cpu.c b/cpu/arm925t/cpu.c index b760ec9..c1c6b03 100644 --- a/cpu/arm925t/cpu.c +++ b/cpu/arm925t/cpu.c @@ -125,8 +125,6 @@ int cleanup_before_linux (void) int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - extern void reset_cpu (ulong addr); - disable_interrupts (); reset_cpu (0); /*NOTREACHED*/ diff --git a/cpu/arm925t/interrupts.c b/cpu/arm925t/interrupts.c index d3c9476..ea4aa3b 100644 --- a/cpu/arm925t/interrupts.c +++ b/cpu/arm925t/interrupts.c @@ -38,7 +38,6 @@ #include -extern void reset_cpu(ulong addr); #define TIMER_LOAD_VAL 0xffffffff /* macro to read the 32 bit timer */ diff --git a/cpu/arm926ejs/cpu.c b/cpu/arm926ejs/cpu.c index 6c153e5..2681f99 100644 --- a/cpu/arm926ejs/cpu.c +++ b/cpu/arm926ejs/cpu.c @@ -125,8 +125,6 @@ int cleanup_before_linux (void) int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - extern void reset_cpu (ulong addr); - disable_interrupts (); reset_cpu (0); /*NOTREACHED*/ diff --git a/cpu/arm926ejs/interrupts.c b/cpu/arm926ejs/interrupts.c index 4fdac9f..062515e 100644 --- a/cpu/arm926ejs/interrupts.c +++ b/cpu/arm926ejs/interrupts.c @@ -40,7 +40,6 @@ #include -extern void reset_cpu(ulong addr); #define TIMER_LOAD_VAL 0xffffffff /* macro to read the 32 bit timer */ diff --git a/cpu/at91rm9200/cpu.c b/cpu/at91rm9200/cpu.c index 90a4f9c..9fdb703 100644 --- a/cpu/at91rm9200/cpu.c +++ b/cpu/at91rm9200/cpu.c @@ -115,8 +115,6 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { #ifdef CFG_SOFT_RESET - extern void reset_cpu(ulong addr); - disable_interrupts(); reset_cpu(0); #else diff --git a/cpu/at91rm9200/interrupts.c b/cpu/at91rm9200/interrupts.c index 1c071bb..f15c583 100644 --- a/cpu/at91rm9200/interrupts.c +++ b/cpu/at91rm9200/interrupts.c @@ -35,8 +35,6 @@ #include #include -extern void reset_cpu(ulong addr); - /* the number of clocks per CFG_HZ */ #define TIMER_LOAD_VAL (CFG_HZ_CLOCK/CFG_HZ) diff --git a/cpu/i386/cpu.c b/cpu/i386/cpu.c index f24e4ba..5fd37c7 100644 --- a/cpu/i386/cpu.c +++ b/cpu/i386/cpu.c @@ -50,8 +50,6 @@ int cpu_init(void) int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - extern void reset_cpu(ulong addr); - printf ("resetting ...\n"); udelay(50000); /* wait 50 ms */ disable_interrupts(); diff --git a/cpu/ixp/cpu.c b/cpu/ixp/cpu.c index 00264be..9383473 100644 --- a/cpu/ixp/cpu.c +++ b/cpu/ixp/cpu.c @@ -76,8 +76,6 @@ int cleanup_before_linux (void) int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - extern void reset_cpu (ulong addr); - printf ("resetting ...\n"); udelay (50000); /* wait 50 ms */ diff --git a/cpu/ixp/interrupts.c b/cpu/ixp/interrupts.c index 962f3ff..e260dea 100644 --- a/cpu/ixp/interrupts.c +++ b/cpu/ixp/interrupts.c @@ -30,8 +30,6 @@ #include #include -extern void reset_cpu (ulong addr); - #ifdef CONFIG_USE_IRQ /* enable IRQ/FIQ interrupts */ void enable_interrupts (void) diff --git a/cpu/lh7a40x/cpu.c b/cpu/lh7a40x/cpu.c index 2a2b578..718f253 100644 --- a/cpu/lh7a40x/cpu.c +++ b/cpu/lh7a40x/cpu.c @@ -124,8 +124,6 @@ int cleanup_before_linux (void) int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - extern void reset_cpu (ulong addr); - disable_interrupts (); reset_cpu (0); /*NOTREACHED*/ diff --git a/cpu/lh7a40x/interrupts.c b/cpu/lh7a40x/interrupts.c index a716269..3c2dc4f 100644 --- a/cpu/lh7a40x/interrupts.c +++ b/cpu/lh7a40x/interrupts.c @@ -35,7 +35,6 @@ #include -extern void reset_cpu(ulong addr); static ulong timer_load_val = 0; /* macro to read the 16 bit timer */ diff --git a/cpu/pxa/cpu.c b/cpu/pxa/cpu.c index abb064a..d1551dd 100644 --- a/cpu/pxa/cpu.c +++ b/cpu/pxa/cpu.c @@ -74,8 +74,6 @@ int cleanup_before_linux (void) int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - extern void reset_cpu (ulong addr); - printf ("resetting ...\n"); udelay (50000); /* wait 50 ms */ diff --git a/cpu/pxa/interrupts.c b/cpu/pxa/interrupts.c index fd02154..b335a82 100644 --- a/cpu/pxa/interrupts.c +++ b/cpu/pxa/interrupts.c @@ -29,8 +29,6 @@ #include #include -extern void reset_cpu (ulong addr); - #ifdef CONFIG_USE_IRQ /* enable IRQ/FIQ interrupts */ void enable_interrupts (void) diff --git a/cpu/s3c44b0/cpu.c b/cpu/s3c44b0/cpu.c index 2d5e2e8..5d50b3c 100644 --- a/cpu/s3c44b0/cpu.c +++ b/cpu/s3c44b0/cpu.c @@ -86,8 +86,6 @@ void reset_cpu (ulong addr) int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - extern void reset_cpu (ulong addr); - disable_interrupts (); reset_cpu (0); diff --git a/cpu/s3c44b0/interrupts.c b/cpu/s3c44b0/interrupts.c index 4328feb..dea8118 100644 --- a/cpu/s3c44b0/interrupts.c +++ b/cpu/s3c44b0/interrupts.c @@ -29,8 +29,6 @@ #include -extern void reset_cpu(ulong addr); - /* we always count down the max. */ #define TIMER_LOAD_VAL 0xffff diff --git a/cpu/sa1100/cpu.c b/cpu/sa1100/cpu.c index 34adf91..17e5b0d 100644 --- a/cpu/sa1100/cpu.c +++ b/cpu/sa1100/cpu.c @@ -73,8 +73,6 @@ int cleanup_before_linux (void) int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - extern void reset_cpu (ulong addr); - printf ("resetting ...\n"); udelay (50000); /* wait 50 ms */ diff --git a/cpu/sa1100/interrupts.c b/cpu/sa1100/interrupts.c index 00b6d2a..93a78d7 100644 --- a/cpu/sa1100/interrupts.c +++ b/cpu/sa1100/interrupts.c @@ -31,8 +31,6 @@ #include -extern void reset_cpu (ulong addr); - #ifdef CONFIG_USE_IRQ /* enable IRQ/FIQ interrupts */ void enable_interrupts (void) diff --git a/include/common.h b/include/common.h index eee79b2..edb704d 100644 --- a/include/common.h +++ b/include/common.h @@ -383,6 +383,7 @@ int checkicache (void); int checkdcache (void); void upmconfig (unsigned int, unsigned int *, unsigned int); ulong get_tbclk (void); +void reset_cpu (ulong addr); /* $(CPU)/serial.c */ int serial_init (void);