From 882b7d726febe65579d6502c271412ecb05821d7 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 20 Oct 2010 03:41:17 -0400 Subject: do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger --- board/eltec/bab7xx/bab7xx.c | 3 ++- board/esd/apc405/apc405.c | 1 - board/esd/ar405/ar405.c | 2 -- board/esd/ash405/ash405.c | 1 - board/esd/canbt/canbt.c | 4 ---- board/esd/cpci405/cpci405.c | 1 - board/esd/cpciiser4/cpciiser4.c | 3 --- board/esd/du405/du405.c | 3 --- board/esd/hh405/hh405.c | 1 - board/esd/pci405/pci405.c | 1 - board/esd/plu405/plu405.c | 1 - board/esd/tasreg/tasreg.c | 1 - board/esd/voh405/voh405.c | 1 - board/esd/wuh405/wuh405.c | 2 -- board/freescale/m5249evb/m5249evb.c | 4 ---- board/funkwerk/vovpn-gw/vovpn-gw.c | 2 +- board/prodrive/pdnb3/pdnb3.c | 3 --- board/sacsng/sacsng.c | 2 -- board/xilinx/microblaze-generic/microblaze-generic.c | 3 ++- board/zeus/zeus.c | 1 - 20 files changed, 5 insertions(+), 35 deletions(-) (limited to 'board') diff --git a/board/eltec/bab7xx/bab7xx.c b/board/eltec/bab7xx/bab7xx.c index f5c9777ee1..ea4897b5b7 100644 --- a/board/eltec/bab7xx/bab7xx.c +++ b/board/eltec/bab7xx/bab7xx.c @@ -184,7 +184,7 @@ void after_reloc (ulong dest_addr) * do_reset is done here because in this case it is board specific, since the * 7xx CPUs can only be reset by external HW (the RTC in this case). */ -void do_reset (cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { #if defined(CONFIG_RTC_MK48T59) /* trigger watchdog immediately */ @@ -192,6 +192,7 @@ void do_reset (cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const ar #else #error "You must define the macro CONFIG_RTC_MK48T59." #endif + return 0; } /* ------------------------------------------------------------------------- */ diff --git a/board/esd/apc405/apc405.c b/board/esd/apc405/apc405.c index 52477d72c1..def8a4fe4f 100644 --- a/board/esd/apc405/apc405.c +++ b/board/esd/apc405/apc405.c @@ -38,7 +38,6 @@ DECLARE_GLOBAL_DATA_PTR; #undef FPGA_DEBUG -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern void lxt971_no_sleep(void); /* fpga configuration data - gzip compressed and generated by bin2c */ diff --git a/board/esd/ar405/ar405.c b/board/esd/ar405/ar405.c index 8879faf50f..6ec507f620 100644 --- a/board/esd/ar405/ar405.c +++ b/board/esd/ar405/ar405.c @@ -29,8 +29,6 @@ DECLARE_GLOBAL_DATA_PTR; -/*cmd_boot.c*/ -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern void lxt971_no_sleep(void); /* ------------------------------------------------------------------------- */ diff --git a/board/esd/ash405/ash405.c b/board/esd/ash405/ash405.c index ea28090304..1b0365e285 100644 --- a/board/esd/ash405/ash405.c +++ b/board/esd/ash405/ash405.c @@ -33,7 +33,6 @@ #define FPGA_DEBUG #endif -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern void lxt971_no_sleep(void); /* fpga configuration data - gzip compressed and generated by bin2c */ diff --git a/board/esd/canbt/canbt.c b/board/esd/canbt/canbt.c index 0d2d7f1499..cc537f2b4b 100644 --- a/board/esd/canbt/canbt.c +++ b/board/esd/canbt/canbt.c @@ -29,10 +29,6 @@ DECLARE_GLOBAL_DATA_PTR; -/*cmd_boot.c*/ -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); - - /* ------------------------------------------------------------------------- */ #if 0 diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c index 51e10fdc92..98a8584156 100644 --- a/board/esd/cpci405/cpci405.c +++ b/board/esd/cpci405/cpci405.c @@ -32,7 +32,6 @@ DECLARE_GLOBAL_DATA_PTR; -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern void __ft_board_setup(void *blob, bd_t *bd); #undef FPGA_DEBUG diff --git a/board/esd/cpciiser4/cpciiser4.c b/board/esd/cpciiser4/cpciiser4.c index 10a40be25d..8afc50d45c 100644 --- a/board/esd/cpciiser4/cpciiser4.c +++ b/board/esd/cpciiser4/cpciiser4.c @@ -28,9 +28,6 @@ DECLARE_GLOBAL_DATA_PTR; -/*cmd_boot.c*/ - -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern void lxt971_no_sleep(void); diff --git a/board/esd/du405/du405.c b/board/esd/du405/du405.c index b1362a8694..c32d333ddf 100644 --- a/board/esd/du405/du405.c +++ b/board/esd/du405/du405.c @@ -30,9 +30,6 @@ DECLARE_GLOBAL_DATA_PTR; -/*cmd_boot.c*/ - -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern void lxt971_no_sleep(void); diff --git a/board/esd/hh405/hh405.c b/board/esd/hh405/hh405.c index c5e9514bee..e9d2d36c1b 100644 --- a/board/esd/hh405/hh405.c +++ b/board/esd/hh405/hh405.c @@ -236,7 +236,6 @@ static const SMI_REGS init_regs_1024x768 [] = #define FPGA_DEBUG #endif -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern void lxt971_no_sleep(void); /* fpga configuration data - gzip compressed and generated by bin2c */ diff --git a/board/esd/pci405/pci405.c b/board/esd/pci405/pci405.c index 4018a7d29f..c1bac6a1b8 100644 --- a/board/esd/pci405/pci405.c +++ b/board/esd/pci405/pci405.c @@ -34,7 +34,6 @@ DECLARE_GLOBAL_DATA_PTR; /* Prototypes */ -int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); unsigned long fpga_done_state(void); unsigned long fpga_init_state(void); diff --git a/board/esd/plu405/plu405.c b/board/esd/plu405/plu405.c index b68ffaf771..109d2dcfdf 100644 --- a/board/esd/plu405/plu405.c +++ b/board/esd/plu405/plu405.c @@ -32,7 +32,6 @@ DECLARE_GLOBAL_DATA_PTR; -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern void lxt971_no_sleep(void); /* fpga configuration data - gzip compressed and generated by bin2c */ diff --git a/board/esd/tasreg/tasreg.c b/board/esd/tasreg/tasreg.c index 270caac08c..d2488b83a2 100644 --- a/board/esd/tasreg/tasreg.c +++ b/board/esd/tasreg/tasreg.c @@ -29,7 +29,6 @@ /* Prototypes */ -int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len); int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len); diff --git a/board/esd/voh405/voh405.c b/board/esd/voh405/voh405.c index da25212f4c..5f28a4869c 100644 --- a/board/esd/voh405/voh405.c +++ b/board/esd/voh405/voh405.c @@ -33,7 +33,6 @@ #define FPGA_DEBUG #endif -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern void lxt971_no_sleep(void); /* fpga configuration data - gzip compressed and generated by bin2c */ diff --git a/board/esd/wuh405/wuh405.c b/board/esd/wuh405/wuh405.c index 5a65133d71..d8d4bb58f3 100644 --- a/board/esd/wuh405/wuh405.c +++ b/board/esd/wuh405/wuh405.c @@ -32,8 +32,6 @@ #define FPGA_DEBUG #endif -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); - /* fpga configuration data - gzip compressed and generated by bin2c */ const unsigned char fpgadata[] = { diff --git a/board/freescale/m5249evb/m5249evb.c b/board/freescale/m5249evb/m5249evb.c index ac1937b338..894873b975 100644 --- a/board/freescale/m5249evb/m5249evb.c +++ b/board/freescale/m5249evb/m5249evb.c @@ -26,10 +26,6 @@ #include #include - -/* Prototypes */ -int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); - int checkboard (void) { ulong val; uchar val8; diff --git a/board/funkwerk/vovpn-gw/vovpn-gw.c b/board/funkwerk/vovpn-gw/vovpn-gw.c index e856adaee5..a4bfbc9780 100644 --- a/board/funkwerk/vovpn-gw/vovpn-gw.c +++ b/board/funkwerk/vovpn-gw/vovpn-gw.c @@ -306,7 +306,7 @@ int misc_init_r (void) #if defined(CONFIG_HAVE_OWN_RESET) int -do_reset (void *cmdtp, int flag, int argc, char * const argv[]) +do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { volatile ioport_t *iop; diff --git a/board/prodrive/pdnb3/pdnb3.c b/board/prodrive/pdnb3/pdnb3.c index 83b79148cb..928dd2222d 100644 --- a/board/prodrive/pdnb3/pdnb3.c +++ b/board/prodrive/pdnb3/pdnb3.c @@ -28,9 +28,6 @@ DECLARE_GLOBAL_DATA_PTR; -/* Prototypes */ -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); - /* predefine these here for FPGA programming (before including fpga.c) */ #define SET_FPGA(data) *IXP425_GPIO_GPOUTR = (data) #define FPGA_DONE_STATE (*IXP425_GPIO_GPINR & CONFIG_SYS_FPGA_DONE) diff --git a/board/sacsng/sacsng.c b/board/sacsng/sacsng.c index 8edca59c18..61cab87035 100644 --- a/board/sacsng/sacsng.c +++ b/board/sacsng/sacsng.c @@ -38,8 +38,6 @@ extern void eth_loopback_test(void); #endif /* CONFIG_ETHER_LOOPBACK_TEST */ -extern int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); - #include "clkinit.h" #include "ioconfig.h" /* I/O configuration table */ diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index 744384c1d3..183e4dc8b8 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -31,7 +31,7 @@ #include #include -void do_reset (void) +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { #ifdef CONFIG_SYS_GPIO_0 *((unsigned long *)(CONFIG_SYS_GPIO_0_ADDR)) = @@ -41,6 +41,7 @@ void do_reset (void) puts ("Reseting board\n"); asm ("bra r0"); #endif + return 0; } int gpio_init (void) diff --git a/board/zeus/zeus.c b/board/zeus/zeus.c index a29e518e0a..7e33d3f383 100644 --- a/board/zeus/zeus.c +++ b/board/zeus/zeus.c @@ -44,7 +44,6 @@ extern uchar default_environment[]; ulong flash_get_size(ulong base, int banknum); void env_crc_update(void); -int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); static u32 start_time; -- cgit v1.2.1