From: Wolfgang Denk Date: Mon, 28 Jun 2010 20:00:46 +0000 (+0200) Subject: Make sure that argv[] argument pointers are not modified. X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=54841ab50c20d6fa6c9cc3eb826989da3a22d934;p=u-boot.git Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk Acked-by: Mike Frysinger --- diff --git a/api/api.c b/api/api.c index 385a7e3cdc..190ee6ad6c 100644 --- a/api/api.c +++ b/api/api.c @@ -37,7 +37,7 @@ #undef DEBUG /* U-Boot routines needed */ -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /***************************************************************************** * diff --git a/arch/arm/cpu/arm_cortexa8/mx51/clock.c b/arch/arm/cpu/arm_cortexa8/mx51/clock.c index 38480ac5a1..a27227de31 100644 --- a/arch/arm/cpu/arm_cortexa8/mx51/clock.c +++ b/arch/arm/cpu/arm_cortexa8/mx51/clock.c @@ -269,7 +269,7 @@ u32 imx_get_fecclk(void) /* * Dump some core clockes. */ -int do_mx51_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mx51_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { u32 freq; diff --git a/arch/arm/cpu/arm_cortexa8/omap3/board.c b/arch/arm/cpu/arm_cortexa8/omap3/board.c index d2500ca3b2..69e56f55c5 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/board.c +++ b/arch/arm/cpu/arm_cortexa8/omap3/board.c @@ -282,7 +282,7 @@ void abort(void) /****************************************************************************** * OMAP3 specific command to switch between NAND HW and SW ecc *****************************************************************************/ -static int do_switch_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_switch_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { if (argc != 2) goto usage; diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 5ac1302aa6..310132126c 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -50,7 +50,7 @@ static void setup_end_tag (bd_t *bd); static struct tag *params; #endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */ -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { bd_t *bd = gd->bd; char *s; diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c index 4fcedfa150..08e6acb261 100644 --- a/arch/arm/lib/reset.c +++ b/arch/arm/lib/reset.c @@ -39,7 +39,7 @@ #include -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { puts ("resetting ...\n"); diff --git a/arch/avr32/cpu/cpu.c b/arch/avr32/cpu/cpu.c index 904bfb227e..e4489bb2e2 100644 --- a/arch/avr32/cpu/cpu.c +++ b/arch/avr32/cpu/cpu.c @@ -76,7 +76,7 @@ void prepare_to_boot(void) "sync 0" : : "r"(0) : "memory"); } -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { /* This will reset the CPU core, caches, MMU and all internal busses */ __builtin_mtdr(8, 1 << 13); /* set DC:DBE */ diff --git a/arch/avr32/lib/bootm.c b/arch/avr32/lib/bootm.c index 6a3172a9a0..8a47cfeb4a 100644 --- a/arch/avr32/lib/bootm.c +++ b/arch/avr32/lib/bootm.c @@ -171,7 +171,7 @@ static void setup_end_tag(struct tag *params) params->hdr.size = 0; } -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { void (*theKernel)(int magic, void *tagtable); struct tag *params, *params_start; diff --git a/arch/blackfin/cpu/bootrom-asm-offsets.c.in b/arch/blackfin/cpu/bootrom-asm-offsets.c.in index 3146e46674..64c2f24120 100644 --- a/arch/blackfin/cpu/bootrom-asm-offsets.c.in +++ b/arch/blackfin/cpu/bootrom-asm-offsets.c.in @@ -9,4 +9,4 @@ #define _DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val)) #define DEFINE(s, m) _DEFINE(offset_##s##_##m, offsetof(s, m)) -int main(int argc, char *argv[]) +int main(int argc, char * const argv[]) diff --git a/arch/blackfin/cpu/reset.c b/arch/blackfin/cpu/reset.c index e3be740711..164afde331 100644 --- a/arch/blackfin/cpu/reset.c +++ b/arch/blackfin/cpu/reset.c @@ -99,7 +99,7 @@ void bfin_reset_or_hang(void) #endif } -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bfin_reset_trampoline(); return 0; diff --git a/arch/blackfin/lib/boot.c b/arch/blackfin/lib/boot.c index 951d5b0d02..37aa82a055 100644 --- a/arch/blackfin/lib/boot.c +++ b/arch/blackfin/lib/boot.c @@ -33,7 +33,7 @@ static char *make_command_line(void) extern ulong bfin_poweron_retx; -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { int (*appl) (char *cmdline); char *cmdline; diff --git a/arch/blackfin/lib/cmd_cache_dump.c b/arch/blackfin/lib/cmd_cache_dump.c index de5840e4cc..412e0198af 100644 --- a/arch/blackfin/lib/cmd_cache_dump.c +++ b/arch/blackfin/lib/cmd_cache_dump.c @@ -25,7 +25,7 @@ static int check_limit(const char *type, size_t start_limit, size_t end_limit, s return 1; } -int do_icache_dump(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_icache_dump(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int cache_status = icache_status(); @@ -97,7 +97,7 @@ U_BOOT_CMD(icache_dump, 4, 0, do_icache_dump, "icache_dump - dump current instruction cache\n", "[way] [subbank] [set]"); -int do_dcache_dump(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_dcache_dump(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { u32 way, bank, subbank, set; u32 status, addr; diff --git a/arch/blackfin/lib/kgdb.c b/arch/blackfin/lib/kgdb.c index bd62d71058..4ca3fc7312 100644 --- a/arch/blackfin/lib/kgdb.c +++ b/arch/blackfin/lib/kgdb.c @@ -417,7 +417,7 @@ void kgdb_putregs(struct pt_regs *regs, char *buf, int length) } -void kgdb_breakpoint(int argc, char *argv[]) +void kgdb_breakpoint(int argc, char * const argv[]) { asm volatile ("excpt 0x1\n"); } diff --git a/arch/i386/cpu/cpu.c b/arch/i386/cpu/cpu.c index 3010519e74..bd6aced873 100644 --- a/arch/i386/cpu/cpu.c +++ b/arch/i386/cpu/cpu.c @@ -56,7 +56,7 @@ int cpu_init_r(void) return 0; } -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { printf ("resetting ...\n"); udelay(50000); /* wait 50 ms */ diff --git a/arch/i386/lib/board.c b/arch/i386/lib/board.c index 3f849f6542..0adc66455a 100644 --- a/arch/i386/lib/board.c +++ b/arch/i386/lib/board.c @@ -431,7 +431,7 @@ void hang (void) for (;;); } -unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[]) +unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char * const argv[]) { /* * x86 does not use a dedicated register to pass the pointer diff --git a/arch/i386/lib/bootm.c b/arch/i386/lib/bootm.c index f96d7bd6da..b36e58d9ec 100644 --- a/arch/i386/lib/bootm.c +++ b/arch/i386/lib/bootm.c @@ -29,7 +29,7 @@ #include /*cmd_boot.c*/ -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { void *base_ptr; ulong os_data, os_len; diff --git a/arch/i386/lib/interrupts.c b/arch/i386/lib/interrupts.c index 51def59954..5a28278280 100644 --- a/arch/i386/lib/interrupts.c +++ b/arch/i386/lib/interrupts.c @@ -136,7 +136,7 @@ void do_irq(int hw_irq) } #if defined(CONFIG_CMD_IRQ) -int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int irq; diff --git a/arch/i386/lib/zimage.c b/arch/i386/lib/zimage.c index b39615a3e2..89fe015e6e 100644 --- a/arch/i386/lib/zimage.c +++ b/arch/i386/lib/zimage.c @@ -245,7 +245,7 @@ void boot_zimage(void *setup_base) enter_realmode(((u32)setup_base+SETUP_START_OFFSET)>>4, 0, ®s, ®s); } -int do_zboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_zboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { void *base_ptr; void *bzImage_addr; diff --git a/arch/m68k/cpu/mcf5227x/cpu.c b/arch/m68k/cpu/mcf5227x/cpu.c index d9f5f43c3c..5129a03251 100644 --- a/arch/m68k/cpu/mcf5227x/cpu.c +++ b/arch/m68k/cpu/mcf5227x/cpu.c @@ -33,7 +33,7 @@ DECLARE_GLOBAL_DATA_PTR; -int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { volatile rcm_t *rcm = (rcm_t *) (MMAP_RCM); udelay(1000); diff --git a/arch/m68k/cpu/mcf523x/cpu.c b/arch/m68k/cpu/mcf523x/cpu.c index a1a51336c2..582aec9b23 100644 --- a/arch/m68k/cpu/mcf523x/cpu.c +++ b/arch/m68k/cpu/mcf523x/cpu.c @@ -34,7 +34,7 @@ DECLARE_GLOBAL_DATA_PTR; -int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { volatile ccm_t *ccm = (ccm_t *) MMAP_CCM; diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c index c4c5d50604..9fb717c2bd 100644 --- a/arch/m68k/cpu/mcf52x2/cpu.c +++ b/arch/m68k/cpu/mcf52x2/cpu.c @@ -38,7 +38,7 @@ DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_M5208 -int do_reset(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char * const argv[]) { volatile rcm_t *rcm = (rcm_t *)(MMAP_RCM); @@ -142,7 +142,7 @@ int checkcpu(void) return 0; } -int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { /* Call the board specific reset actions first. */ if(board_reset) { @@ -177,7 +177,7 @@ int watchdog_init(void) #endif #ifdef CONFIG_M5272 -int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { volatile wdog_t *wdp = (wdog_t *) (MMAP_WDOG); @@ -257,7 +257,7 @@ int watchdog_init(void) #endif /* #ifdef CONFIG_M5272 */ #ifdef CONFIG_M5275 -int do_reset(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char * const argv[]) { volatile rcm_t *rcm = (rcm_t *)(MMAP_RCM); @@ -337,7 +337,7 @@ int checkcpu(void) return 0; } -int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { MCFRESET_RCR = MCFRESET_RCR_SOFTRST; return 0; @@ -354,7 +354,7 @@ int checkcpu(void) return 0; } -int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { /* enable watchdog, set timeout to 0 and wait */ mbar_writeByte(MCFSIM_SYPCR, 0xc0); @@ -384,7 +384,7 @@ int checkcpu(void) return 0; } -int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { /* enable watchdog, set timeout to 0 and wait */ mbar_writeByte(SIM_SYPCR, 0xc0); diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c index 331cc15da4..0af4969087 100644 --- a/arch/m68k/cpu/mcf532x/cpu.c +++ b/arch/m68k/cpu/mcf532x/cpu.c @@ -34,7 +34,7 @@ DECLARE_GLOBAL_DATA_PTR; -int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { volatile rcm_t *rcm = (rcm_t *) (MMAP_RCM); diff --git a/arch/m68k/cpu/mcf5445x/cpu.c b/arch/m68k/cpu/mcf5445x/cpu.c index 6238bc020f..182521c552 100644 --- a/arch/m68k/cpu/mcf5445x/cpu.c +++ b/arch/m68k/cpu/mcf5445x/cpu.c @@ -34,7 +34,7 @@ DECLARE_GLOBAL_DATA_PTR; -int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { volatile rcm_t *rcm = (rcm_t *) (MMAP_RCM); udelay(1000); diff --git a/arch/m68k/cpu/mcf547x_8x/cpu.c b/arch/m68k/cpu/mcf547x_8x/cpu.c index 3912a74d5f..f9a4b64011 100644 --- a/arch/m68k/cpu/mcf547x_8x/cpu.c +++ b/arch/m68k/cpu/mcf547x_8x/cpu.c @@ -34,7 +34,7 @@ DECLARE_GLOBAL_DATA_PTR; -int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { volatile gptmr_t *gptmr = (gptmr_t *) (MMAP_GPTMR); diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c index e5ed6eb7cc..76a2fb27c1 100644 --- a/arch/m68k/lib/bootm.c +++ b/arch/m68k/lib/bootm.c @@ -64,7 +64,7 @@ void arch_lmb_reserve(struct lmb *lmb) lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp)); } -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { ulong rd_len; ulong initrd_start, initrd_end; diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c index 7a9d022eee..e9d53c1afd 100644 --- a/arch/microblaze/cpu/interrupts.c +++ b/arch/microblaze/cpu/interrupts.c @@ -173,7 +173,7 @@ void interrupt_handler (void) #if defined(CONFIG_CMD_IRQ) #ifdef CONFIG_SYS_INTC_0 -int do_irqinfo (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_irqinfo (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { int i; struct irq_action *act = vecs; @@ -193,7 +193,7 @@ int do_irqinfo (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return (0); } #else -int do_irqinfo (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_irqinfo (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { puts ("Undefined interrupt controller\n"); } diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index 2227a81bb0..8e2c6d8922 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -32,7 +32,7 @@ DECLARE_GLOBAL_DATA_PTR; -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { /* First parameter is mapped to $r5 for kernel boot args */ void (*theKernel) (char *, ulong, ulong); diff --git a/arch/mips/cpu/cpu.c b/arch/mips/cpu/cpu.c index d5a16047de..3ae397c8ef 100644 --- a/arch/mips/cpu/cpu.c +++ b/arch/mips/cpu/cpu.c @@ -42,7 +42,7 @@ void __attribute__((weak)) _machine_restart(void) { } -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { _machine_restart(); diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c index 54af24cba3..40a564718f 100644 --- a/arch/mips/lib/bootm.c +++ b/arch/mips/lib/bootm.c @@ -43,7 +43,7 @@ static int linux_env_idx; static void linux_params_init (ulong start, char * commandline); static void linux_env_set (char * env_name, char * env_val); -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { void (*theKernel) (int, char **, char **, int *); char *commandline = getenv ("bootargs"); diff --git a/arch/mips/lib/bootm_qemu_mips.c b/arch/mips/lib/bootm_qemu_mips.c index cc70fa93f3..f1906c6775 100644 --- a/arch/mips/lib/bootm_qemu_mips.c +++ b/arch/mips/lib/bootm_qemu_mips.c @@ -29,7 +29,7 @@ DECLARE_GLOBAL_DATA_PTR; -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { void (*theKernel) (int, char **, char **, int *); char *bootargs = getenv ("bootargs"); diff --git a/arch/nios2/cpu/epcs.c b/arch/nios2/cpu/epcs.c index ab7d746b5f..2369431f15 100644 --- a/arch/nios2/cpu/epcs.c +++ b/arch/nios2/cpu/epcs.c @@ -472,7 +472,7 @@ static int epcs_sect_erased (int sect, unsigned *offset, * Commands ***********************************************************************/ static -void do_epcs_info (struct epcs_devinfo_t *dev, int argc, char *argv[]) +void do_epcs_info (struct epcs_devinfo_t *dev, int argc, char * const argv[]) { int i; unsigned char stat; @@ -519,7 +519,7 @@ void do_epcs_info (struct epcs_devinfo_t *dev, int argc, char *argv[]) } static -void do_epcs_erase (struct epcs_devinfo_t *dev, int argc, char *argv[]) +void do_epcs_erase (struct epcs_devinfo_t *dev, int argc, char * const argv[]) { unsigned start,end; @@ -549,7 +549,7 @@ void do_epcs_erase (struct epcs_devinfo_t *dev, int argc, char *argv[]) } static -void do_epcs_protect (struct epcs_devinfo_t *dev, int argc, char *argv[]) +void do_epcs_protect (struct epcs_devinfo_t *dev, int argc, char * const argv[]) { unsigned char stat; @@ -585,7 +585,7 @@ void do_epcs_protect (struct epcs_devinfo_t *dev, int argc, char *argv[]) } static -void do_epcs_read (struct epcs_devinfo_t *dev, int argc, char *argv[]) +void do_epcs_read (struct epcs_devinfo_t *dev, int argc, char * const argv[]) { ulong addr,off,cnt; ulong sz; @@ -617,7 +617,7 @@ void do_epcs_read (struct epcs_devinfo_t *dev, int argc, char *argv[]) } static -void do_epcs_write (struct epcs_devinfo_t *dev, int argc, char *argv[]) +void do_epcs_write (struct epcs_devinfo_t *dev, int argc, char * const argv[]) { ulong addr,off,cnt; ulong sz; @@ -656,7 +656,7 @@ void do_epcs_write (struct epcs_devinfo_t *dev, int argc, char *argv[]) } static -void do_epcs_verify (struct epcs_devinfo_t *dev, int argc, char *argv[]) +void do_epcs_verify (struct epcs_devinfo_t *dev, int argc, char * const argv[]) { ulong addr,off,cnt; ulong sz; @@ -690,7 +690,7 @@ void do_epcs_verify (struct epcs_devinfo_t *dev, int argc, char *argv[]) } /*-----------------------------------------------------------------------*/ -int do_epcs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_epcs (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int len; struct epcs_devinfo_t *dev = epcs_dev_find (); diff --git a/arch/nios2/cpu/interrupts.c b/arch/nios2/cpu/interrupts.c index b552db4eba..63acfa9147 100644 --- a/arch/nios2/cpu/interrupts.c +++ b/arch/nios2/cpu/interrupts.c @@ -239,7 +239,7 @@ int interrupt_init (void) /*************************************************************************/ #if defined(CONFIG_CMD_IRQ) -int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; struct irq_action *act = vecs; diff --git a/arch/nios2/cpu/sysid.c b/arch/nios2/cpu/sysid.c index 77bc8b5690..5fbc28b988 100644 --- a/arch/nios2/cpu/sysid.c +++ b/arch/nios2/cpu/sysid.c @@ -44,7 +44,7 @@ void display_sysid (void) } -int do_sysid (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_sysid (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { display_sysid (); return (0); diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c index 5d25edf80d..e4093a822a 100644 --- a/arch/nios2/lib/bootm.c +++ b/arch/nios2/lib/bootm.c @@ -28,7 +28,7 @@ #define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */ -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { void (*kernel)(int, int, int, char *) = (void *)images->ep; char *commandline = getenv("bootargs"); diff --git a/arch/powerpc/cpu/74xx_7xx/cpu.c b/arch/powerpc/cpu/74xx_7xx/cpu.c index 14d3ce448a..ab6f11dade 100644 --- a/arch/powerpc/cpu/74xx_7xx/cpu.c +++ b/arch/powerpc/cpu/74xx_7xx/cpu.c @@ -235,7 +235,7 @@ soft_restart(unsigned long addr) !defined(CONFIG_PPMC7XX) /* no generic way to do board reset. simply call soft_reset. */ void -do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr; /* flush and disable I/D cache */ diff --git a/arch/powerpc/cpu/74xx_7xx/interrupts.c b/arch/powerpc/cpu/74xx_7xx/interrupts.c index c2856c936a..7fc8a34080 100644 --- a/arch/powerpc/cpu/74xx_7xx/interrupts.c +++ b/arch/powerpc/cpu/74xx_7xx/interrupts.c @@ -98,7 +98,7 @@ irq_free_handler(int vec) /****************************************************************************/ void -do_irqinfo(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[]) +do_irqinfo(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char * const argv[]) { puts("IRQ related functions are unimplemented currently.\n"); } diff --git a/arch/powerpc/cpu/mpc512x/cpu.c b/arch/powerpc/cpu/mpc512x/cpu.c index 09cbd2024d..a1a3bd4adf 100644 --- a/arch/powerpc/cpu/mpc512x/cpu.c +++ b/arch/powerpc/cpu/mpc512x/cpu.c @@ -75,7 +75,7 @@ int checkcpu (void) int -do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong msr; volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; diff --git a/arch/powerpc/cpu/mpc512x/diu.c b/arch/powerpc/cpu/mpc512x/diu.c index 1cce6a233c..f638c00372 100644 --- a/arch/powerpc/cpu/mpc512x/diu.c +++ b/arch/powerpc/cpu/mpc512x/diu.c @@ -107,7 +107,7 @@ int mpc5121_diu_init(void) } int mpc5121diu_init_show_bmp(cmd_tbl_t *cmdtp, - int flag, int argc, char *argv[]) + int flag, int argc, char * const argv[]) { unsigned int addr; diff --git a/arch/powerpc/cpu/mpc512x/iim.c b/arch/powerpc/cpu/mpc512x/iim.c index 8f2eb37e17..abec8f61cc 100644 --- a/arch/powerpc/cpu/mpc512x/iim.c +++ b/arch/powerpc/cpu/mpc512x/iim.c @@ -278,7 +278,7 @@ int ads5121_fuse_stat(int bank) return 0; } -int do_ads5121_fuse(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ads5121_fuse(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int frow, n, v, bank; diff --git a/arch/powerpc/cpu/mpc512x/speed.c b/arch/powerpc/cpu/mpc512x/speed.c index ce8d0949b2..9d749f22e4 100644 --- a/arch/powerpc/cpu/mpc512x/speed.c +++ b/arch/powerpc/cpu/mpc512x/speed.c @@ -131,7 +131,7 @@ ulong get_bus_freq (ulong dummy) return gd->csb_clk; } -int do_clocks (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_clocks (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { char buf[32]; diff --git a/arch/powerpc/cpu/mpc5xx/cpu.c b/arch/powerpc/cpu/mpc5xx/cpu.c index 7fffebcc1e..5aa7f848df 100644 --- a/arch/powerpc/cpu/mpc5xx/cpu.c +++ b/arch/powerpc/cpu/mpc5xx/cpu.c @@ -138,7 +138,7 @@ int dcache_status (void) /* * Reset board */ -int do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { #if defined(CONFIG_PATI) volatile ulong *addr = (ulong *) CONFIG_SYS_RESET_ADDRESS; diff --git a/arch/powerpc/cpu/mpc5xx/interrupts.c b/arch/powerpc/cpu/mpc5xx/interrupts.c index 167543fcf5..66bce30a04 100644 --- a/arch/powerpc/cpu/mpc5xx/interrupts.c +++ b/arch/powerpc/cpu/mpc5xx/interrupts.c @@ -184,7 +184,7 @@ void timer_interrupt_cpu (struct pt_regs *regs) * irqinfo - print information about IRQs * */ -int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int vec; diff --git a/arch/powerpc/cpu/mpc5xxx/cpu.c b/arch/powerpc/cpu/mpc5xxx/cpu.c index 44b8a7a6d4..0c1eebd4ee 100644 --- a/arch/powerpc/cpu/mpc5xxx/cpu.c +++ b/arch/powerpc/cpu/mpc5xxx/cpu.c @@ -78,7 +78,7 @@ int checkcpu (void) /* ------------------------------------------------------------------------- */ int -do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong msr; /* Interrupts and MMU off */ diff --git a/arch/powerpc/cpu/mpc5xxx/interrupts.c b/arch/powerpc/cpu/mpc5xxx/interrupts.c index 16eee3a480..50455d07a1 100644 --- a/arch/powerpc/cpu/mpc5xxx/interrupts.c +++ b/arch/powerpc/cpu/mpc5xxx/interrupts.c @@ -311,7 +311,7 @@ void irq_free_handler(int irq) /****************************************************************************/ #if defined(CONFIG_CMD_IRQ) -void do_irqinfo(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +void do_irqinfo(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { int irq, re_enable; u32 intr_ctrl; diff --git a/arch/powerpc/cpu/mpc8220/cpu.c b/arch/powerpc/cpu/mpc8220/cpu.c index 563cfe0536..64e0526e88 100644 --- a/arch/powerpc/cpu/mpc8220/cpu.c +++ b/arch/powerpc/cpu/mpc8220/cpu.c @@ -52,7 +52,7 @@ int checkcpu (void) /* ------------------------------------------------------------------------- */ -int do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { volatile gptmr8220_t *gptmr = (volatile gptmr8220_t *) MMAP_GPTMR; ulong msr; diff --git a/arch/powerpc/cpu/mpc8220/interrupts.c b/arch/powerpc/cpu/mpc8220/interrupts.c index 78e99179c9..9544d85b55 100644 --- a/arch/powerpc/cpu/mpc8220/interrupts.c +++ b/arch/powerpc/cpu/mpc8220/interrupts.c @@ -74,7 +74,7 @@ void irq_free_handler (int vec) /****************************************************************************/ void -do_irqinfo (cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +do_irqinfo (cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { puts ("IRQ related functions are unimplemented currently.\n"); } diff --git a/arch/powerpc/cpu/mpc824x/cpu.c b/arch/powerpc/cpu/mpc824x/cpu.c index 08f6a947f4..44f91b25fa 100644 --- a/arch/powerpc/cpu/mpc824x/cpu.c +++ b/arch/powerpc/cpu/mpc824x/cpu.c @@ -92,7 +92,7 @@ int checkdcache (void) /*------------------------------------------------------------------- */ -int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong msr, addr; diff --git a/arch/powerpc/cpu/mpc8260/bedbug_603e.c b/arch/powerpc/cpu/mpc8260/bedbug_603e.c index c969ff65e6..248861289b 100644 --- a/arch/powerpc/cpu/mpc8260/bedbug_603e.c +++ b/arch/powerpc/cpu/mpc8260/bedbug_603e.c @@ -18,7 +18,7 @@ extern CPU_DEBUG_CTX bug_ctx; void bedbug603e_init __P((void)); -void bedbug603e_do_break __P((cmd_tbl_t*,int,int,char*[])); +void bedbug603e_do_break __P((cmd_tbl_t*,int,int,char*const[])); void bedbug603e_break_isr __P((struct pt_regs*)); int bedbug603e_find_empty __P((void)); int bedbug603e_set __P((int,unsigned long)); @@ -64,7 +64,7 @@ void bedbug603e_init( void ) * ====================================================================== */ void bedbug603e_do_break (cmd_tbl_t *cmdtp, int flag, int argc, - char *argv[]) + char * const argv[]) { long addr; /* Address to break at */ int which_bp; /* Breakpoint number */ diff --git a/arch/powerpc/cpu/mpc8260/cpu.c b/arch/powerpc/cpu/mpc8260/cpu.c index aedbf297ab..220c1e24b1 100644 --- a/arch/powerpc/cpu/mpc8260/cpu.c +++ b/arch/powerpc/cpu/mpc8260/cpu.c @@ -238,7 +238,7 @@ void upmconfig (uint upm, uint * table, uint size) #if !defined(CONFIG_HAVE_OWN_RESET) int -do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong msr, addr; diff --git a/arch/powerpc/cpu/mpc8260/interrupts.c b/arch/powerpc/cpu/mpc8260/interrupts.c index 2606c60d45..79178cc3a3 100644 --- a/arch/powerpc/cpu/mpc8260/interrupts.c +++ b/arch/powerpc/cpu/mpc8260/interrupts.c @@ -256,7 +256,7 @@ void timer_interrupt_cpu (struct pt_regs *regs) * */ void -do_irqinfo (cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +do_irqinfo (cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { int irq, re_enable; diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c index d3be909761..b664c641a1 100644 --- a/arch/powerpc/cpu/mpc83xx/cpu.c +++ b/arch/powerpc/cpu/mpc83xx/cpu.c @@ -192,7 +192,7 @@ void upmconfig (uint upm, uint *table, uint size) int -do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong msr; #ifndef MPC83xx_RESET diff --git a/arch/powerpc/cpu/mpc83xx/ecc.c b/arch/powerpc/cpu/mpc83xx/ecc.c index f3942b411f..8dadd64b42 100644 --- a/arch/powerpc/cpu/mpc83xx/ecc.c +++ b/arch/powerpc/cpu/mpc83xx/ecc.c @@ -98,7 +98,7 @@ void ecc_print_status(void) ddr->capture_attributes & ECC_CAPT_ATTR_VLD); } -int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; volatile ddr83xx_t *ddr = &immap->ddr; diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c index faffbaf838..446af27c6f 100644 --- a/arch/powerpc/cpu/mpc83xx/interrupts.c +++ b/arch/powerpc/cpu/mpc83xx/interrupts.c @@ -90,7 +90,7 @@ void timer_interrupt_cpu (struct pt_regs *regs) */ void -do_irqinfo(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[]) +do_irqinfo(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char * const argv[]) { } diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c index 500eef1e9c..b5076a9af8 100644 --- a/arch/powerpc/cpu/mpc83xx/speed.c +++ b/arch/powerpc/cpu/mpc83xx/speed.c @@ -497,7 +497,7 @@ ulong get_bus_freq(ulong dummy) return gd->csb_clk; } -int do_clocks (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_clocks (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { char buf[32]; diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index fddeb2fb09..6f81fdf61b 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -186,7 +186,7 @@ int checkcpu (void) /* ------------------------------------------------------------------------- */ -int do_reset (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[]) +int do_reset (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char * const argv[]) { /* Everything after the first generation of PQ3 parts has RSTCR */ #if defined(CONFIG_MPC8540) || defined(CONFIG_MPC8541) || \ diff --git a/arch/powerpc/cpu/mpc85xx/interrupts.c b/arch/powerpc/cpu/mpc85xx/interrupts.c index 409367d158..ac8c01ac15 100644 --- a/arch/powerpc/cpu/mpc85xx/interrupts.c +++ b/arch/powerpc/cpu/mpc85xx/interrupts.c @@ -103,7 +103,7 @@ void timer_interrupt_cpu(struct pt_regs *regs) #if defined(CONFIG_CMD_IRQ) /* irqinfo - print information about PCI devices,not implemented. */ -int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return 0; } diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c index 826bf32d4d..ddbc2211c3 100644 --- a/arch/powerpc/cpu/mpc85xx/mp.c +++ b/arch/powerpc/cpu/mpc85xx/mp.c @@ -105,7 +105,7 @@ static u8 boot_entry_map[4] = { BOOT_ENTRY_R6_LOWER, }; -int cpu_release(int nr, int argc, char *argv[]) +int cpu_release(int nr, int argc, char * const argv[]) { u32 i, val, *table = (u32 *)get_spin_virt_addr() + nr * NUM_BOOT_ENTRY; u64 boot_addr; diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c index 188757587f..9064e78037 100644 --- a/arch/powerpc/cpu/mpc86xx/cpu.c +++ b/arch/powerpc/cpu/mpc86xx/cpu.c @@ -124,7 +124,7 @@ checkcpu(void) void -do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; volatile ccsr_gur_t *gur = &immap->im_gur; diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c index c78fc72254..d8ad6d30d6 100644 --- a/arch/powerpc/cpu/mpc86xx/interrupts.c +++ b/arch/powerpc/cpu/mpc86xx/interrupts.c @@ -101,7 +101,7 @@ void irq_free_handler(int vec) /* * irqinfo - print information about PCI devices,not implemented. */ -int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return 0; } diff --git a/arch/powerpc/cpu/mpc86xx/mp.c b/arch/powerpc/cpu/mpc86xx/mp.c index b4a0faacde..24eb30aaaa 100644 --- a/arch/powerpc/cpu/mpc86xx/mp.c +++ b/arch/powerpc/cpu/mpc86xx/mp.c @@ -66,7 +66,7 @@ int cpu_disable(int nr) return 0; } -int cpu_release(int nr, int argc, char *argv[]) +int cpu_release(int nr, int argc, char * const argv[]) { /* dummy function so common/cmd_mp.c will build * should be implemented in the future */ diff --git a/arch/powerpc/cpu/mpc8xx/bedbug_860.c b/arch/powerpc/cpu/mpc8xx/bedbug_860.c index 0308bbbf7a..9deda6c2a0 100644 --- a/arch/powerpc/cpu/mpc8xx/bedbug_860.c +++ b/arch/powerpc/cpu/mpc8xx/bedbug_860.c @@ -17,7 +17,7 @@ extern CPU_DEBUG_CTX bug_ctx; void bedbug860_init __P((void)); -void bedbug860_do_break __P((cmd_tbl_t*,int,int,char*[])); +void bedbug860_do_break __P((cmd_tbl_t*,int,int,char*const[])); void bedbug860_break_isr __P((struct pt_regs*)); int bedbug860_find_empty __P((void)); int bedbug860_set __P((int,unsigned long)); @@ -63,7 +63,7 @@ void bedbug860_init( void ) * ====================================================================== */ void bedbug860_do_break (cmd_tbl_t *cmdtp, int flag, int argc, - char *argv[]) + char * const argv[]) { long addr = 0; /* Address to break at */ int which_bp; /* Breakpoint number */ diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 2eb848bd0e..142cfa5b98 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -478,7 +478,7 @@ void upmconfig (uint upm, uint * table, uint size) #ifndef CONFIG_LWMON -int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong msr, addr; @@ -521,7 +521,7 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * and thus too short to reset the external hardware. So we use the * watchdog to reset the board. */ -int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { /* prevent triggering the watchdog */ disable_interrupts (); diff --git a/arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c b/arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c index b2cc2feaa3..ff5ef5f0c7 100644 --- a/arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c +++ b/arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c @@ -418,7 +418,7 @@ static void test(void); static void DQS_calibration_process(void); #endif #endif -int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); static unsigned char spd_read(uchar chip, uint addr) { diff --git a/arch/powerpc/cpu/ppc4xx/bedbug_405.c b/arch/powerpc/cpu/ppc4xx/bedbug_405.c index ef11cb65e4..e1500cc042 100644 --- a/arch/powerpc/cpu/ppc4xx/bedbug_405.c +++ b/arch/powerpc/cpu/ppc4xx/bedbug_405.c @@ -17,7 +17,7 @@ extern CPU_DEBUG_CTX bug_ctx; void bedbug405_init __P ((void)); -void bedbug405_do_break __P ((cmd_tbl_t *, int, int, char *[])); +void bedbug405_do_break __P ((cmd_tbl_t *, int, int, char * const [])); void bedbug405_break_isr __P ((struct pt_regs *)); int bedbug405_find_empty __P ((void)); int bedbug405_set __P ((int, unsigned long)); @@ -63,7 +63,7 @@ void bedbug405_init (void) * set routine which will assign a breakpoint number. * ====================================================================== */ -void bedbug405_do_break (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +void bedbug405_do_break (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { long addr = 0; /* Address to break at */ int which_bp; /* Breakpoint number */ diff --git a/arch/powerpc/cpu/ppc4xx/cmd_chip_config.c b/arch/powerpc/cpu/ppc4xx/cmd_chip_config.c index ba57211dd0..72c5aec706 100644 --- a/arch/powerpc/cpu/ppc4xx/cmd_chip_config.c +++ b/arch/powerpc/cpu/ppc4xx/cmd_chip_config.c @@ -45,7 +45,7 @@ static void print_configs(int cur_config_nr) } -static int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; int ret; diff --git a/arch/powerpc/cpu/ppc4xx/cpu.c b/arch/powerpc/cpu/ppc4xx/cpu.c index e1a023b703..851065cbd7 100644 --- a/arch/powerpc/cpu/ppc4xx/cpu.c +++ b/arch/powerpc/cpu/ppc4xx/cpu.c @@ -688,7 +688,7 @@ int ppc440spe_revB() { /* ------------------------------------------------------------------------- */ -int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { #if defined(CONFIG_BOARD_RESET) board_reset(); diff --git a/arch/powerpc/cpu/ppc4xx/interrupts.c b/arch/powerpc/cpu/ppc4xx/interrupts.c index 6db84210b8..c89bf37a17 100644 --- a/arch/powerpc/cpu/ppc4xx/interrupts.c +++ b/arch/powerpc/cpu/ppc4xx/interrupts.c @@ -194,7 +194,7 @@ void irq_free_handler(int vec) } #if defined(CONFIG_CMD_IRQ) -int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int vec; diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 6702df51a5..3064121143 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -47,7 +47,7 @@ DECLARE_GLOBAL_DATA_PTR; -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern ulong get_effective_memsize(void); static ulong get_sp (void); static void set_clocks_in_mhz (bd_t *kbd); @@ -297,7 +297,7 @@ static int boot_body_linux(bootm_headers_t *images) } __attribute__((noinline)) -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { int ret; diff --git a/arch/powerpc/lib/kgdb.c b/arch/powerpc/lib/kgdb.c index d3eb1f35a9..1ec68184bf 100644 --- a/arch/powerpc/lib/kgdb.c +++ b/arch/powerpc/lib/kgdb.c @@ -313,7 +313,7 @@ kgdb_putregs(struct pt_regs *regs, char *buf, int length) the debugger. */ void -kgdb_breakpoint(int argc, char *argv[]) +kgdb_breakpoint(int argc, char * const argv[]) { asm(" .globl breakinst\n\ breakinst: .long 0x7d821008\n\ diff --git a/arch/sh/cpu/sh2/cpu.c b/arch/sh/cpu/sh2/cpu.c index e0cb04752d..6bbedd9d48 100644 --- a/arch/sh/cpu/sh2/cpu.c +++ b/arch/sh/cpu/sh2/cpu.c @@ -59,7 +59,7 @@ int cleanup_before_linux(void) return 0; } -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { disable_interrupts(); reset_cpu(0); diff --git a/arch/sh/cpu/sh3/cpu.c b/arch/sh/cpu/sh3/cpu.c index 8261d29d48..3e9caad8d2 100644 --- a/arch/sh/cpu/sh3/cpu.c +++ b/arch/sh/cpu/sh3/cpu.c @@ -45,7 +45,7 @@ int cleanup_before_linux(void) return 0; } -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { disable_interrupts(); reset_cpu(0); diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c index be410abf00..f136758334 100644 --- a/arch/sh/cpu/sh4/cpu.c +++ b/arch/sh/cpu/sh4/cpu.c @@ -44,7 +44,7 @@ int cleanup_before_linux (void) return 0; } -int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { disable_interrupts(); reset_cpu (0); diff --git a/arch/sh/lib/bootm.c b/arch/sh/lib/bootm.c index ae1f869f10..9c58ed7ec8 100644 --- a/arch/sh/lib/bootm.c +++ b/arch/sh/lib/bootm.c @@ -43,7 +43,7 @@ static void hexdump(unsigned char *buf, int len) } #endif -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { /* Linux kernel load address */ void (*kernel) (void) = (void (*)(void))images->ep; diff --git a/arch/sparc/cpu/leon2/cpu.c b/arch/sparc/cpu/leon2/cpu.c index d6e23b129c..46512c761f 100644 --- a/arch/sparc/cpu/leon2/cpu.c +++ b/arch/sparc/cpu/leon2/cpu.c @@ -49,7 +49,7 @@ void cpu_reset(void) _reset_reloc(); } -int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { cpu_reset(); diff --git a/arch/sparc/cpu/leon2/interrupts.c b/arch/sparc/cpu/leon2/interrupts.c index 9b0da963af..5149550e8f 100644 --- a/arch/sparc/cpu/leon2/interrupts.c +++ b/arch/sparc/cpu/leon2/interrupts.c @@ -195,7 +195,7 @@ void irq_free_handler(int irq) /****************************************************************************/ #if defined(CONFIG_CMD_IRQ) -void do_irqinfo(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +void do_irqinfo(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { int irq; unsigned int pil = get_pil(); diff --git a/arch/sparc/cpu/leon3/cpu.c b/arch/sparc/cpu/leon3/cpu.c index 976f311348..a1646e22f5 100644 --- a/arch/sparc/cpu/leon3/cpu.c +++ b/arch/sparc/cpu/leon3/cpu.c @@ -52,7 +52,7 @@ void cpu_reset(void) _reset_reloc(); } -int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { cpu_reset(); diff --git a/arch/sparc/cpu/leon3/interrupts.c b/arch/sparc/cpu/leon3/interrupts.c index ac6aca5d18..4138f9b673 100644 --- a/arch/sparc/cpu/leon3/interrupts.c +++ b/arch/sparc/cpu/leon3/interrupts.c @@ -197,7 +197,7 @@ void irq_free_handler(int irq) /****************************************************************************/ #if defined(CONFIG_CMD_IRQ) -void do_irqinfo(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) +void do_irqinfo(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { int irq; unsigned int pil = get_pil(); diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h index d55cc863da..12901bcef8 100644 --- a/arch/sparc/include/asm/prom.h +++ b/arch/sparc/include/asm/prom.h @@ -79,7 +79,7 @@ struct linux_mem_v0 { /* Arguments sent to the kernel from the boot prompt. */ struct linux_arguments_v0 { - char *argv[8]; + char * const argv[8]; char args[100]; char boot_dev[2]; int boot_dev_ctrl; diff --git a/arch/sparc/lib/board.c b/arch/sparc/lib/board.c index 11eea603c1..b776c21d60 100644 --- a/arch/sparc/lib/board.c +++ b/arch/sparc/lib/board.c @@ -63,7 +63,7 @@ DECLARE_GLOBAL_DATA_PTR; extern void timer_interrupt_init(void); extern void malloc_bin_reloc(void); -extern int do_ambapp_print(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]); +extern int do_ambapp_print(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]); extern int prom_init(void); #if defined(CONFIG__CMD_DOC) diff --git a/arch/sparc/lib/bootm.c b/arch/sparc/lib/bootm.c index c62cf57d80..4c226a3a75 100644 --- a/arch/sparc/lib/bootm.c +++ b/arch/sparc/lib/bootm.c @@ -92,7 +92,7 @@ void arch_lmb_reserve(struct lmb *lmb) } /* boot the linux kernel */ -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t * images) +int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t * images) { char *bootargs; ulong initrd_start, initrd_end; diff --git a/board/BuS/EB+MCF-EV123/EB+MCF-EV123.c b/board/BuS/EB+MCF-EV123/EB+MCF-EV123.c index 2fc3eafbd8..1f76dd91cc 100644 --- a/board/BuS/EB+MCF-EV123/EB+MCF-EV123.c +++ b/board/BuS/EB+MCF-EV123/EB+MCF-EV123.c @@ -193,7 +193,7 @@ int drv_video_init(void) /*---------------------------------------------------------------------------*/ #ifdef CONFIG_VIDEO -int do_brightness(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_brightness(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int rcode = 0; ulong side; diff --git a/board/BuS/eb_cpux9k2/cpux9k2.c b/board/BuS/eb_cpux9k2/cpux9k2.c index 1f222756c8..bbceaf37ae 100644 --- a/board/BuS/eb_cpux9k2/cpux9k2.c +++ b/board/BuS/eb_cpux9k2/cpux9k2.c @@ -348,7 +348,7 @@ void __led_set(led_id_t mask, int state) /*---------------------------------------------------------------------------*/ -int do_brightness(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_brightness(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int rcode = 0; ulong side; diff --git a/board/amcc/acadia/cmd_acadia.c b/board/amcc/acadia/cmd_acadia.c index c427f9ebc6..86f86e2b18 100644 --- a/board/amcc/acadia/cmd_acadia.c +++ b/board/amcc/acadia/cmd_acadia.c @@ -38,7 +38,7 @@ static u8 boot_267_nand[] = { 0x00, 0x00, 0x00, 0x00 }; -static int do_bootstrap(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_bootstrap(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { u8 chip; u8 *buf; diff --git a/board/amcc/luan/luan.c b/board/amcc/luan/luan.c index 4e12e9af12..c0368c0389 100644 --- a/board/amcc/luan/luan.c +++ b/board/amcc/luan/luan.c @@ -207,7 +207,7 @@ static int l2cache_status(void) * int do_l2cache() * ************************************************************************/ -int do_l2cache( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] ) +int do_l2cache( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] ) { switch (argc) { case 2: /* on / off */ diff --git a/board/amcc/makalu/cmd_pll.c b/board/amcc/makalu/cmd_pll.c index 9bae67e563..3c0dc5f896 100644 --- a/board/amcc/makalu/cmd_pll.c +++ b/board/amcc/makalu/cmd_pll.c @@ -178,7 +178,7 @@ test_write(void) } int -do_pll_alter (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_pll_alter (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char c = '\0'; pll_freq_t pll_freq; diff --git a/board/amcc/taihu/lcd.c b/board/amcc/taihu/lcd.c index c3dc9837b5..595dee3fcc 100644 --- a/board/amcc/taihu/lcd.c +++ b/board/amcc/taihu/lcd.c @@ -129,7 +129,7 @@ int lcd_init(void) return 0; } -static int do_lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { out_8((u8 *) LCD_CMD_ADDR, 0x01); udelay(2000); @@ -137,7 +137,7 @@ static int do_lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 0; } -static int do_lcd_puts (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_lcd_puts (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { if (argc < 2) { cmd_usage(cmdtp); @@ -148,7 +148,7 @@ static int do_lcd_puts (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 0; } -static int do_lcd_putc (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_lcd_putc (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { if (argc < 2) { cmd_usage(cmdtp); @@ -159,7 +159,7 @@ static int do_lcd_putc (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 0; } -static int do_lcd_cur (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_lcd_cur (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong count; ulong dir; diff --git a/board/amcc/taihu/taihu.c b/board/amcc/taihu/taihu.c index be381d60ac..1682cf7c6a 100644 --- a/board/amcc/taihu/taihu.c +++ b/board/amcc/taihu/taihu.c @@ -78,7 +78,7 @@ int checkboard(void) return 0; } -static int do_sw_stat(cmd_tbl_t* cmd_tp, int flags, int argc, char *argv[]) +static int do_sw_stat(cmd_tbl_t* cmd_tp, int flags, int argc, char * const argv[]) { char stat; int i; @@ -97,7 +97,7 @@ U_BOOT_CMD ( "" ); -static int do_led_ctl(cmd_tbl_t* cmd_tp, int flags, int argc, char *argv[]) +static int do_led_ctl(cmd_tbl_t* cmd_tp, int flags, int argc, char * const argv[]) { int led_no; diff --git a/board/amcc/taihu/update.c b/board/amcc/taihu/update.c index f9c31b3927..b87eac4a1b 100644 --- a/board/amcc/taihu/update.c +++ b/board/amcc/taihu/update.c @@ -98,7 +98,7 @@ static uchar buf_66[] = 0x00 }; -static int update_boot_eeprom(cmd_tbl_t* cmdtp, int flag, int argc, char *argv[]) +static int update_boot_eeprom(cmd_tbl_t* cmdtp, int flag, int argc, char * const argv[]) { ulong len = 0x20; uchar chip = CONFIG_SYS_I2C_EEPROM_ADDR; diff --git a/board/amcc/taishan/lcd.c b/board/amcc/taishan/lcd.c index d432cc3d05..6a049dfbad 100644 --- a/board/amcc/taishan/lcd.c +++ b/board/amcc/taishan/lcd.c @@ -152,19 +152,19 @@ int lcd_init(void) return 0; } -static int do_lcd_test(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_lcd_test(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { lcd_init(); return 0; } -static int do_lcd_clear(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_lcd_clear(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { *LCD_CMD_ADDR = 0x01; mdelay(LCD_DELAY_NORMAL_MS); return 0; } -static int do_lcd_puts(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_lcd_puts(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { if (argc < 2) { cmd_usage(cmdtp); @@ -173,7 +173,7 @@ static int do_lcd_puts(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) lcd_puts(argv[1]); return 0; } -static int do_lcd_putc(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_lcd_putc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { if (argc < 2) { cmd_usage(cmdtp); @@ -182,7 +182,7 @@ static int do_lcd_putc(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) lcd_putc((char)argv[1][0]); return 0; } -static int do_lcd_cur(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_lcd_cur(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong count; ulong dir; @@ -356,7 +356,7 @@ void set_phy_normal_mode(void) } #endif /* 0 - test only */ -static int do_led_test_off(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_led_test_off(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { volatile unsigned int *GpioOr = (volatile unsigned int *)(CONFIG_SYS_PERIPHERAL_BASE + 0x700); @@ -364,7 +364,7 @@ static int do_led_test_off(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 0; } -static int do_led_test_on(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_led_test_on(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { volatile unsigned int *GpioOr = (volatile unsigned int *)(CONFIG_SYS_PERIPHERAL_BASE + 0x700); diff --git a/board/amcc/taishan/showinfo.c b/board/amcc/taishan/showinfo.c index a9a80e5b6e..587fe74e47 100644 --- a/board/amcc/taishan/showinfo.c +++ b/board/amcc/taishan/showinfo.c @@ -161,7 +161,7 @@ void show_xbridge_info(void) printf("PCIL0_XSTS = %#010lx\n", in32r(PCIL0_STS)); } -int do_show_xbridge_info(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_show_xbridge_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { show_xbridge_info(); return 0; @@ -215,7 +215,7 @@ void show_pcix_device_info(void) } int do_show_pcix_device_info(cmd_tbl_t * cmdtp, int flag, int argc, - char *argv[]) + char * const argv[]) { show_pcix_device_info(); return 0; @@ -226,7 +226,7 @@ U_BOOT_CMD(xdevinfo, 1, 1, do_show_pcix_device_info, extern void show_reset_reg(void); -int do_show_reset_reg_info(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_show_reset_reg_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { show_reset_reg(); return 0; diff --git a/board/amcc/taishan/update.c b/board/amcc/taishan/update.c index aab3a6577c..3f063a05f0 100644 --- a/board/amcc/taishan/update.c +++ b/board/amcc/taishan/update.c @@ -68,7 +68,7 @@ static int update_boot_eeprom(void) return 0; } -int do_update_boot_eeprom(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_update_boot_eeprom(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { return update_boot_eeprom(); } diff --git a/board/amcc/yucca/cmd_yucca.c b/board/amcc/yucca/cmd_yucca.c index ed6daa3899..cde13e424b 100644 --- a/board/amcc/yucca/cmd_yucca.c +++ b/board/amcc/yucca/cmd_yucca.c @@ -31,10 +31,10 @@ extern void print_evb440spe_info(void); static int setBootStrapClock(cmd_tbl_t *cmdtp, int incrflag, - int flag, int argc, char *argv[]); + int flag, int argc, char * const argv[]); /* ------------------------------------------------------------------------- */ -int do_evb440spe(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_evb440spe(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return setBootStrapClock (cmdtp, 1, flag, argc, argv); } @@ -46,7 +46,7 @@ int do_evb440spe(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * evb440spe wrclk prom0,prom1 */ static int setBootStrapClock(cmd_tbl_t *cmdtp, int incrflag, int flag, - int argc, char *argv[]) + int argc, char * const argv[]) { uchar chip; ulong data; diff --git a/board/amirix/ap1000/ap1000.c b/board/amirix/ap1000/ap1000.c index cadfe0b5bc..c8dd99eb4c 100644 --- a/board/amirix/ap1000/ap1000.c +++ b/board/amirix/ap1000/ap1000.c @@ -167,7 +167,7 @@ unsigned int get_device (void) /* This function loads FPGA configurations from the SystemACE CompactFlash */ -int do_loadace (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_loadace (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { unsigned char *p = (unsigned char *) AP1000_SYSACE_REGBASE; int cfg; @@ -247,7 +247,7 @@ int do_loadace (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) * -1 if failed * */ -int do_swconfigbyte (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_swconfigbyte (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { unsigned char *sector_buffer = NULL; unsigned char input_char; @@ -311,7 +311,7 @@ int do_swconfigbyte (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) #define ONE_SECOND 1000000 -int do_pause (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_pause (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { int pause_time; unsigned int delay_time; @@ -345,7 +345,7 @@ int do_pause (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 0; } -int do_swreconfig (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_swreconfig (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { printf ("Triggering software reconfigure (software config byte is 0x%02x)...\n", *((unsigned char *) (SW_BYTE_SECTOR_ADDR + SW_BYTE_SECTOR_OFFSET))); @@ -365,7 +365,7 @@ int do_swreconfig (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) #define TEMP_ETHERM_BIT 0x02 #define TEMP_LTHERM_BIT 0x01 -int do_temp_sensor (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_temp_sensor (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { char cmd; int ret_val = 0; diff --git a/board/amirix/ap1000/powerspan.c b/board/amirix/ap1000/powerspan.c index 28e2bbc478..55451b11f0 100644 --- a/board/amirix/ap1000/powerspan.c +++ b/board/amirix/ap1000/powerspan.c @@ -364,7 +364,7 @@ int EEPROMWrite (unsigned char theI2CAddress, unsigned char theValue) &theValue, I2C_WRITE); } -int do_eeprom (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_eeprom (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { char cmd; int ret_val = 0; @@ -690,7 +690,7 @@ int SetTargetImage (int theImageIndex, unsigned int theBlockSize, return 0; } -int do_bridge (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_bridge (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { char cmd; int ret_val = 1; diff --git a/board/barco/barco.c b/board/barco/barco.c index c5fe8c4708..b8d968b915 100644 --- a/board/barco/barco.c +++ b/board/barco/barco.c @@ -288,7 +288,7 @@ void barcobcd_boot (void) do_bootm (NULL,0,2,bootm_args); } -int barcobcd_boot_image (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int barcobcd_boot_image (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { #if 0 if (argc > 1) { diff --git a/board/bc3450/cmd_bc3450.c b/board/bc3450/cmd_bc3450.c index 271ffb1d1f..a9e490252d 100644 --- a/board/bc3450/cmd_bc3450.c +++ b/board/bc3450/cmd_bc3450.c @@ -173,7 +173,7 @@ int sm501_gpio_init (void) * read and prints the dip switch * and/or external config inputs (4bits) 0...0x0F */ -int cmd_dip (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int cmd_dip (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { vu_long rc = 0; @@ -205,7 +205,7 @@ U_BOOT_CMD (dip, 1, 1, cmd_dip, * buz - turns Buzzer on/off */ #ifdef CONFIG_BC3450_BUZZER -static int cmd_buz (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int cmd_buz (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { if (argc != 2) { printf ("Usage:\nspecify one argument: \"on\" or \"off\"\n"); @@ -236,7 +236,7 @@ U_BOOT_CMD (buz, 2, 1, cmd_buz, /* * fp - front panel commands */ -static int cmd_fp (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int cmd_fp (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { sm501_gpio_init (); @@ -491,7 +491,7 @@ static void ds1620_write_state (struct therm *therm) ds1620_out (THERM_START_CONVERT, 0, 0); } -static int cmd_temp (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int cmd_temp (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { int i; struct therm therm; @@ -682,7 +682,7 @@ int can_init (void) * return 1 on CAN failure * return 0 if no failure */ -int do_can (char *argv[]) +int do_can (char * const argv[]) { int i; struct mpc5xxx_mscan *can1 = @@ -777,7 +777,7 @@ int do_can (char *argv[]) /* * test - BC3450 HW test routines */ -int cmd_test (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int cmd_test (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { #ifdef CONFIG_BC3450_CAN int rcode; diff --git a/board/bf537-stamp/cmd_bf537led.c b/board/bf537-stamp/cmd_bf537led.c index 317f088497..7d8f3eadff 100644 --- a/board/bf537-stamp/cmd_bf537led.c +++ b/board/bf537-stamp/cmd_bf537led.c @@ -80,7 +80,7 @@ int atoi(char *string) return retval; } -int do_bf537led(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_bf537led(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { int led_mask = 0; int led_current_state = 0; diff --git a/board/cm-bf527/gpio.c b/board/cm-bf527/gpio.c index dcf641b6a9..7e0babe891 100644 --- a/board/cm-bf527/gpio.c +++ b/board/cm-bf527/gpio.c @@ -11,7 +11,7 @@ #include -int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc != 3) { show_usage: diff --git a/board/cm-bf537e/flash.c b/board/cm-bf537e/flash.c index 25aeed264a..a4c1ec06cb 100644 --- a/board/cm-bf537e/flash.c +++ b/board/cm-bf537e/flash.c @@ -11,7 +11,7 @@ #include #include "gpio_cfi_flash.h" -int do_pf(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_pf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong faddr = CONFIG_SYS_FLASH_BASE; ushort data; diff --git a/board/cm-bf537u/flash.c b/board/cm-bf537u/flash.c index ebe17b6531..52abe790ab 100644 --- a/board/cm-bf537u/flash.c +++ b/board/cm-bf537u/flash.c @@ -11,7 +11,7 @@ #include #include "gpio_cfi_flash.h" -int do_ph(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ph(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong faddr = CONFIG_SYS_FLASH_BASE; ushort data; diff --git a/board/cm5200/cmd_cm5200.c b/board/cm5200/cmd_cm5200.c index cd98ae219f..df372d9306 100644 --- a/board/cm5200/cmd_cm5200.c +++ b/board/cm5200/cmd_cm5200.c @@ -29,7 +29,7 @@ #ifdef CONFIG_CMD_BSP -static int do_i2c_test(char *argv[]) +static int do_i2c_test(char * const argv[]) { unsigned char temp, temp1; @@ -57,7 +57,7 @@ static int do_i2c_test(char *argv[]) return 0; } -static int do_usb_test(char *argv[]) +static int do_usb_test(char * const argv[]) { int i; static int usb_stor_curr_dev = -1; /* current device */ @@ -90,7 +90,7 @@ static int do_usb_test(char *argv[]) return 0; } -static int do_led_test(char *argv[]) +static int do_led_test(char * const argv[]) { int i = 0; struct mpc5xxx_gpt_0_7 *gpt = (struct mpc5xxx_gpt_0_7 *)MPC5XXX_GPT; @@ -134,7 +134,7 @@ static int do_led_test(char *argv[]) return 0; } -static int do_rs232_test(char *argv[]) +static int do_rs232_test(char * const argv[]) { int error_status = 0; struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO; @@ -397,7 +397,7 @@ static int do_rs232_test(char *argv[]) return error_status; } -static int cmd_fkt(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int cmd_fkt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int rcode = -1; diff --git a/board/cm5200/fwupdate.c b/board/cm5200/fwupdate.c index 5a27191352..c1a4a19cc0 100644 --- a/board/cm5200/fwupdate.c +++ b/board/cm5200/fwupdate.c @@ -35,9 +35,9 @@ #include "fwupdate.h" -extern int do_bootm(cmd_tbl_t *, int, int, char *[]); +extern int do_bootm(cmd_tbl_t *, int, int, char * const []); extern long do_fat_read(const char *, void *, unsigned long, int); -extern int do_fat_fsload(cmd_tbl_t *, int, int, char *[]); +extern int do_fat_fsload(cmd_tbl_t *, int, int, char * const []); static int load_rescue_image(ulong); @@ -47,7 +47,7 @@ void cm5200_fwupdate(void) char *rsargs; char *tmp = NULL; char ka[16]; - char *argv[3] = { "bootm", ka, NULL }; + char * const argv[3] = { "bootm", ka, NULL }; /* Check if rescue system is disabled... */ if (getenv("norescue")) { @@ -99,7 +99,7 @@ static int load_rescue_image(ulong addr) char *tmp; char dev[7]; char addr_str[16]; - char *argv[6] = { "fatload", "usb", dev, addr_str, nxri, NULL }; + char * const argv[6] = { "fatload", "usb", dev, addr_str, nxri, NULL }; block_dev_desc_t *stor_dev = NULL; cmd_tbl_t *bcmd; diff --git a/board/delta/delta.c b/board/delta/delta.c index a2942135fd..68c39d23ce 100644 --- a/board/delta/delta.c +++ b/board/delta/delta.c @@ -240,7 +240,7 @@ static uchar *key_match (uchar *kbd_data) return (NULL); } -int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { uchar kbd_data[KEYBD_DATALEN]; char keybd_env[2 * KEYBD_DATALEN + 1]; diff --git a/board/digsy_mtc/cmd_mtc.c b/board/digsy_mtc/cmd_mtc.c index ecea5b3c54..621980dfce 100644 --- a/board/digsy_mtc/cmd_mtc.c +++ b/board/digsy_mtc/cmd_mtc.c @@ -68,7 +68,7 @@ static void mtc_calculate_checksum(tx_msp_cmd *packet) packet->cks += buff[i]; } -static int do_mtc_led(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_mtc_led(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { tx_msp_cmd pcmd; rx_msp_cmd prx; @@ -120,7 +120,7 @@ static int do_mtc_led(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return err; } -static int do_mtc_key(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_mtc_key(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { tx_msp_cmd pcmd; rx_msp_cmd prx; @@ -142,7 +142,7 @@ static int do_mtc_key(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return err; } -static int do_mtc_digout(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_mtc_digout(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { tx_msp_cmd pcmd; rx_msp_cmd prx; @@ -171,7 +171,7 @@ static int do_mtc_digout(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return err; } -static int do_mtc_digin(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_mtc_digin(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { tx_msp_cmd pcmd; rx_msp_cmd prx; @@ -205,7 +205,7 @@ static int do_mtc_digin(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return err; } -static int do_mtc_appreg(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_mtc_appreg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { tx_msp_cmd pcmd; rx_msp_cmd prx; @@ -232,7 +232,7 @@ static int do_mtc_appreg(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return err; } -static int do_mtc_version(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_mtc_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { tx_msp_cmd pcmd; rx_msp_cmd prx; @@ -254,7 +254,7 @@ static int do_mtc_version(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return err; } -static int do_mtc_state(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_mtc_state(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { tx_msp_cmd pcmd; rx_msp_cmd prx; @@ -281,7 +281,7 @@ static int do_mtc_state(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return err; } -static int do_mtc_help(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +static int do_mtc_help(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); cmd_tbl_t cmd_mtc_sub[] = { U_BOOT_CMD_MKENT(led, 3, 1, do_mtc_led, @@ -308,11 +308,11 @@ cmd_tbl_t cmd_mtc_sub[] = { "[command] - get help for command\n"), }; -static int do_mtc_help(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_mtc_help(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { extern int _do_help(cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t *cmdtp, int flag, - int argc, char *argv[]); + int argc, char * const argv[]); #ifdef CONFIG_SYS_LONGHELP puts("mtc "); #endif @@ -320,7 +320,7 @@ static int do_mtc_help(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ARRAY_SIZE(cmd_mtc_sub), cmdtp, flag, argc, argv); } -int cmd_mtc(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int cmd_mtc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { cmd_tbl_t *c; int err = 0; diff --git a/board/eltec/bab7xx/bab7xx.c b/board/eltec/bab7xx/bab7xx.c index 1f78f8d16e..f5c9777ee1 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 *argv[]) +void do_reset (cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char * const argv[]) { #if defined(CONFIG_RTC_MK48T59) /* trigger watchdog immediately */ diff --git a/board/eltec/elppc/elppc.c b/board/eltec/elppc/elppc.c index e73c712cbb..cb9ab86cb0 100644 --- a/board/eltec/elppc/elppc.c +++ b/board/eltec/elppc/elppc.c @@ -117,7 +117,7 @@ phys_size_t initdram (int board_type) * Register PI in the MPC 107 (at offset 0x41090 of the Embedded Utilities * Memory Block). */ -int do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { out8 (MPC107_EUMB_PI, 1); return (0); diff --git a/board/esd/apc405/apc405.c b/board/esd/apc405/apc405.c index 72c0907e01..b58c1ebfad 100644 --- a/board/esd/apc405/apc405.c +++ b/board/esd/apc405/apc405.c @@ -37,7 +37,7 @@ DECLARE_GLOBAL_DATA_PTR; #undef FPGA_DEBUG -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern void lxt971_no_sleep(void); extern ulong flash_get_size (ulong base, int banknum); diff --git a/board/esd/ar405/ar405.c b/board/esd/ar405/ar405.c index a632cb42d6..21b2432c47 100644 --- a/board/esd/ar405/ar405.c +++ b/board/esd/ar405/ar405.c @@ -30,7 +30,7 @@ DECLARE_GLOBAL_DATA_PTR; /*cmd_boot.c*/ -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern void lxt971_no_sleep(void); /* ------------------------------------------------------------------------- */ @@ -196,7 +196,7 @@ int checkboard (void) /* * Some test routines */ -int do_digtest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_digtest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; int k; @@ -257,7 +257,7 @@ struct io { short dummy; }; -int do_anatest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_anatest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { short val; int i; @@ -353,7 +353,7 @@ void cyclicInt(void *ptr) } -int do_inctest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_inctest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong *incin; int i; diff --git a/board/esd/ash405/ash405.c b/board/esd/ash405/ash405.c index 0615959316..03c409829c 100644 --- a/board/esd/ash405/ash405.c +++ b/board/esd/ash405/ash405.c @@ -33,7 +33,7 @@ #define FPGA_DEBUG #endif -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +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 5a3f61de3c..bfec5489d6 100644 --- a/board/esd/canbt/canbt.c +++ b/board/esd/canbt/canbt.c @@ -30,7 +30,7 @@ DECLARE_GLOBAL_DATA_PTR; /*cmd_boot.c*/ -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* ------------------------------------------------------------------------- */ diff --git a/board/esd/cms700/cms700.c b/board/esd/cms700/cms700.c index 391fbf4c1b..20346e15ac 100644 --- a/board/esd/cms700/cms700.c +++ b/board/esd/cms700/cms700.c @@ -157,7 +157,7 @@ int eeprom_write_enable (unsigned dev_addr, int state) return state; } -int do_eep_wren (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_eep_wren (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int query = argc == 1; int state = 0; diff --git a/board/esd/common/auto_update.c b/board/esd/common/auto_update.c index c4a49e2f18..4dfea71966 100644 --- a/board/esd/common/auto_update.c +++ b/board/esd/common/auto_update.c @@ -492,7 +492,7 @@ int do_auto_update(void) return 0; } -int auto_update(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int auto_update(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { do_auto_update(); diff --git a/board/esd/common/cmd_loadpci.c b/board/esd/common/cmd_loadpci.c index eecae0a7fd..87da27db10 100644 --- a/board/esd/common/cmd_loadpci.c +++ b/board/esd/common/cmd_loadpci.c @@ -37,7 +37,7 @@ extern int do_source (cmd_tbl_t *, int, int, char *[]); /* * Command loadpci: wait for signal from host and boot image. */ -int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { u32 *ptr = 0; int count = 0; diff --git a/board/esd/common/lcd.c b/board/esd/common/lcd.c index 5c50b4c8dc..9109b64a1c 100644 --- a/board/esd/common/lcd.c +++ b/board/esd/common/lcd.c @@ -339,7 +339,7 @@ int lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count, return lcd_bmp(logo_bmp); } -int do_esdbmp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_esdbmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr; #ifdef CONFIG_VIDEO_SM501 diff --git a/board/esd/common/xilinx_jtag/micro.c b/board/esd/common/xilinx_jtag/micro.c index 414e82135c..9823e5e8a7 100644 --- a/board/esd/common/xilinx_jtag/micro.c +++ b/board/esd/common/xilinx_jtag/micro.c @@ -1828,7 +1828,7 @@ int xsvfExecute(void) * ppzArgv - array of ptrs to strings (command-line arguments). * Returns: int - Legacy return value: 1 = success; 0 = error. *****************************************************************************/ -int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int iErrorCode; char* pzXsvfFileName; diff --git a/board/esd/cpci2dp/cpci2dp.c b/board/esd/cpci2dp/cpci2dp.c index 6d9814f163..00456a7003 100644 --- a/board/esd/cpci2dp/cpci2dp.c +++ b/board/esd/cpci2dp/cpci2dp.c @@ -149,7 +149,7 @@ int eeprom_write_enable (unsigned dev_addr, int state) { #endif #if defined(CONFIG_SYS_EEPROM_WREN) -int do_eep_wren (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_eep_wren (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int query = argc == 1; int state = 0; diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c index 24db8830c7..51d3355816 100644 --- a/board/esd/cpci405/cpci405.c +++ b/board/esd/cpci405/cpci405.c @@ -32,7 +32,7 @@ DECLARE_GLOBAL_DATA_PTR; -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +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 @@ -650,7 +650,7 @@ int OWReadByte(void) return result; } -int do_onewire(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_onewire(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned short val; int result; @@ -698,7 +698,7 @@ U_BOOT_CMD( /* * Write backplane ip-address... */ -int do_get_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_get_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; char *buf; @@ -756,7 +756,7 @@ U_BOOT_CMD( /* * Set and print backplane ip... */ -int do_set_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_set_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *buf; char str[32]; diff --git a/board/esd/cpci5200/cpci5200.c b/board/esd/cpci5200/cpci5200.c index 36fcf7f87d..abac217527 100644 --- a/board/esd/cpci5200/cpci5200.c +++ b/board/esd/cpci5200/cpci5200.c @@ -265,7 +265,7 @@ int board_eth_init(bd_t *bis) return pci_eth_init(bis); } -int do_writepci(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_writepci(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { unsigned int addr; unsigned int size; diff --git a/board/esd/cpci750/cpci750.c b/board/esd/cpci750/cpci750.c index a199d46182..f9f7c7fdf1 100644 --- a/board/esd/cpci750/cpci750.c +++ b/board/esd/cpci750/cpci750.c @@ -562,7 +562,7 @@ int display_mem_map (void) /* * Command loadpci: wait for signal from host and boot image. */ -int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { volatile unsigned int *ptr; int count = 0; @@ -1056,7 +1056,7 @@ void board_prebootm_init () dcache_disable (); } -int do_show_config(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_show_config(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { unsigned int reset_sample_low; unsigned int reset_sample_high; @@ -1091,7 +1091,7 @@ U_BOOT_CMD( "Show Marvell strapping register (ResetSampleLow ResetSampleHigh)" ); -int do_pldver(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_pldver(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { printf("PLD version:0x%02x\n", in_8((void *)CONFIG_SYS_PLD_VER)); diff --git a/board/esd/cpci750/sdram_init.c b/board/esd/cpci750/sdram_init.c index 5347958085..615e32af9f 100644 --- a/board/esd/cpci750/sdram_init.c +++ b/board/esd/cpci750/sdram_init.c @@ -1811,7 +1811,7 @@ int set_dfcdlInit (void) return (0); } -int do_show_ecc(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_show_ecc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned int ecc_counter; unsigned int ecc_addr; diff --git a/board/esd/cpciiser4/cpciiser4.c b/board/esd/cpciiser4/cpciiser4.c index ee90e2c28a..dcea50ee8d 100644 --- a/board/esd/cpciiser4/cpciiser4.c +++ b/board/esd/cpciiser4/cpciiser4.c @@ -30,7 +30,7 @@ DECLARE_GLOBAL_DATA_PTR; /*cmd_boot.c*/ -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +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/dasa_sim/cmd_dasa_sim.c b/board/esd/dasa_sim/cmd_dasa_sim.c index 675e5071d7..aa7437695e 100644 --- a/board/esd/dasa_sim/cmd_dasa_sim.c +++ b/board/esd/dasa_sim/cmd_dasa_sim.c @@ -204,7 +204,7 @@ static void clearPci9054 (void) /* ------------------------------------------------------------------------- */ int do_pci9054 (cmd_tbl_t * cmdtp, int flag, int argc, - char *argv[]) + char * const argv[]) { if (strcmp (argv[1], "info") == 0) { showPci9054 (); diff --git a/board/esd/du405/du405.c b/board/esd/du405/du405.c index f475d11072..aa7ee92a5f 100644 --- a/board/esd/du405/du405.c +++ b/board/esd/du405/du405.c @@ -32,7 +32,7 @@ DECLARE_GLOBAL_DATA_PTR; /*cmd_boot.c*/ -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +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/du440/du440.c b/board/esd/du440/du440.c index 111cce52a2..ba3c97c144 100644 --- a/board/esd/du440/du440.c +++ b/board/esd/du440/du440.c @@ -409,7 +409,7 @@ int dcf77_status(void) return mv; } -int do_dcf77(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_dcf77(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int mv; u32 pin, pinold; @@ -490,7 +490,7 @@ int usbhub_init(void) return ret; } -int do_hubinit(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_hubinit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { usbhub_init(); return 0; @@ -573,7 +573,7 @@ int boot_eeprom_write (unsigned dev_addr, return rcode; } -int do_setup_boot_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_setup_boot_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong sdsdp[4]; @@ -673,7 +673,7 @@ int eeprom_write_enable (unsigned dev_addr, int state) return state; } -int do_eep_wren (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_eep_wren (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int query = argc == 1; int state = 0; @@ -727,7 +727,7 @@ static int pld_interrupt(u32 arg) return rc; } -int do_waitpwrirq(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_waitpwrirq(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { got_pldirq = 0; @@ -795,7 +795,7 @@ int dvi_init(void) return ret; } -int do_dviinit(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_dviinit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { dvi_init(); return 0; @@ -810,7 +810,7 @@ U_BOOT_CMD( * TODO: 'time' command might be useful for others as well. * Move to 'common' directory. */ -int do_time(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_time(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned long long start, end; char c, cmd[CONFIG_SYS_CBSIZE]; @@ -874,7 +874,7 @@ unsigned int prng(unsigned int max) return Y; } -int do_gfxdemo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_gfxdemo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned int color; unsigned int x, y, dx, dy; diff --git a/board/esd/hh405/hh405.c b/board/esd/hh405/hh405.c index 4251d51b2e..ca7868cbd8 100644 --- a/board/esd/hh405/hh405.c +++ b/board/esd/hh405/hh405.c @@ -236,7 +236,7 @@ static const SMI_REGS init_regs_1024x768 [] = #define FPGA_DEBUG #endif -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +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 */ @@ -733,7 +733,7 @@ int eeprom_write_enable (unsigned dev_addr, int state) return state; } -int do_eep_wren (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_eep_wren (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int query = argc == 1; int state = 0; diff --git a/board/esd/ocrtc/cmd_ocrtc.c b/board/esd/ocrtc/cmd_ocrtc.c index 5f3254d252..b59689b0a5 100644 --- a/board/esd/ocrtc/cmd_ocrtc.c +++ b/board/esd/ocrtc/cmd_ocrtc.c @@ -33,7 +33,7 @@ /* * Set device number on pci board */ -int do_setdevice(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_setdevice(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int idx = 1; /* start at 1 (skip device 0) */ pci_dev_t bdf = 0; @@ -62,7 +62,7 @@ U_BOOT_CMD( /* * Get device number on pci board */ -int do_getdevice(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_getdevice(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { u32 device; char str[32]; diff --git a/board/esd/pci405/cmd_pci405.c b/board/esd/pci405/cmd_pci405.c index 1d14611293..2fc9fda5d2 100644 --- a/board/esd/pci405/cmd_pci405.c +++ b/board/esd/pci405/cmd_pci405.c @@ -39,7 +39,7 @@ extern int do_bootm (cmd_tbl_t *, int, int, char *[]); /* * Command loadpci: wait for signal from host and boot image. */ -int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned int *ptr = 0; int count = 0; diff --git a/board/esd/pci405/pci405.c b/board/esd/pci405/pci405.c index 536485727d..b0d7663b23 100644 --- a/board/esd/pci405/pci405.c +++ b/board/esd/pci405/pci405.c @@ -34,7 +34,7 @@ DECLARE_GLOBAL_DATA_PTR; /* Prototypes */ -int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +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); @@ -356,7 +356,7 @@ int wpeeprom(int wp) return wp_state; } -int do_wpeeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_wpeeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int wp = -1; if (argc >= 2) { diff --git a/board/esd/pf5200/pf5200.c b/board/esd/pf5200/pf5200.c index 4e64e83bf6..83dbfcbbda 100644 --- a/board/esd/pf5200/pf5200.c +++ b/board/esd/pf5200/pf5200.c @@ -288,7 +288,7 @@ void power_set_reset(int power) } } -int do_poweroff(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_poweroff(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { power_set_reset(1); return (0); @@ -325,7 +325,7 @@ int phypower(int flag) return (status); } -int do_phypower(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_phypower(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { int status; @@ -340,7 +340,7 @@ int do_phypower(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) U_BOOT_CMD(phypower, 2, 2, do_phypower, "Switch power of ethernet phy", ""); -int do_writepci(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_writepci(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { unsigned int addr; unsigned int size; diff --git a/board/esd/plu405/plu405.c b/board/esd/plu405/plu405.c index 0f7fa69a74..3a8a4cff34 100644 --- a/board/esd/plu405/plu405.c +++ b/board/esd/plu405/plu405.c @@ -32,7 +32,7 @@ DECLARE_GLOBAL_DATA_PTR; -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +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 */ @@ -322,7 +322,7 @@ int eeprom_write_enable(unsigned dev_addr, int state) return state; } -int do_eep_wren(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_eep_wren(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int query = argc == 1; int state = 0; diff --git a/board/esd/pmc405de/pmc405de.c b/board/esd/pmc405de/pmc405de.c index 3725ece394..b84e08ad72 100644 --- a/board/esd/pmc405de/pmc405de.c +++ b/board/esd/pmc405de/pmc405de.c @@ -374,7 +374,7 @@ int eeprom_write_enable(unsigned dev_addr, int state) return state; } -int do_eep_wren(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_eep_wren(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int query = argc == 1; int state = 0; @@ -417,7 +417,7 @@ U_BOOT_CMD(eepwren, 2, 0, do_eep_wren, #include extern env_t *env_ptr; -int do_painit(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_painit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { u32 pram, nextbase, base; char *v; @@ -477,7 +477,7 @@ U_BOOT_CMD( ); #endif /* CONFIG_PRAM */ -int do_selfreset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_selfreset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { struct ppc4xx_gpio *gpio0 = (struct ppc4xx_gpio *)GPIO_BASE; setbits_be32(&gpio0->tcr, CONFIG_SYS_GPIO_SELFRST_N); @@ -489,7 +489,7 @@ U_BOOT_CMD( "" ); -int do_resetout(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_resetout(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { struct pmc405de_cpld *cpld = (struct pmc405de_cpld *)CONFIG_SYS_CPLD_BASE; diff --git a/board/esd/pmc440/cmd_pmc440.c b/board/esd/pmc440/cmd_pmc440.c index 476e940962..200d7ee30d 100644 --- a/board/esd/pmc440/cmd_pmc440.c +++ b/board/esd/pmc440/cmd_pmc440.c @@ -67,7 +67,7 @@ int fpga_interrupt(u32 arg) return rc; } -int do_waithci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_waithci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { pmc440_fpga_t *fpga = (pmc440_fpga_t *)FPGA_BA; @@ -118,7 +118,7 @@ void dump_fifo(pmc440_fpga_t *fpga, int f, int *n) } } -int do_fifo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_fifo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { pmc440_fpga_t *fpga = (pmc440_fpga_t *)FPGA_BA; int i; @@ -269,7 +269,7 @@ U_BOOT_CMD( "'fifo' or 'address'" ); -int do_setup_bootstrap_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_setup_bootstrap_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong sdsdp[5]; ulong delay; @@ -344,7 +344,7 @@ U_BOOT_CMD( #include extern env_t *env_ptr; -int do_painit(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_painit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { u32 pram, nextbase, base; char *v; @@ -404,7 +404,7 @@ U_BOOT_CMD( ); #endif /* CONFIG_PRAM */ -int do_selfreset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_selfreset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { in_be32((void*)CONFIG_SYS_RESET_BASE); return 0; @@ -415,7 +415,7 @@ U_BOOT_CMD( "" ); -int do_resetout(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_resetout(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { pmc440_fpga_t *fpga = (pmc440_fpga_t *)FPGA_BA; @@ -452,7 +452,7 @@ U_BOOT_CMD( "" ); -int do_inta(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_inta(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (is_monarch()) { printf("This command is only supported in non-monarch mode\n"); @@ -485,7 +485,7 @@ U_BOOT_CMD( ); /* test-only */ -int do_pmm(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_pmm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong pciaddr; @@ -518,7 +518,7 @@ U_BOOT_CMD( ); #if defined(CONFIG_SYS_EEPROM_WREN) -int do_eep_wren(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_eep_wren(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int query = argc == 1; int state = 0; diff --git a/board/esd/tasreg/tasreg.c b/board/esd/tasreg/tasreg.c index bd9fb2fc2b..270caac08c 100644 --- a/board/esd/tasreg/tasreg.c +++ b/board/esd/tasreg/tasreg.c @@ -29,7 +29,7 @@ /* Prototypes */ -int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +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); @@ -219,7 +219,7 @@ int i2c_probe(uchar addr); /* */ -int do_iploop(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_iploop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr; @@ -254,7 +254,7 @@ U_BOOT_CMD( /* */ -int do_codec(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_codec(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { uchar buf[8]; @@ -307,7 +307,7 @@ U_BOOT_CMD( /* */ -int do_saa(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_saa(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr; ulong instr; @@ -340,7 +340,7 @@ U_BOOT_CMD( /* */ -int do_iwrite(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_iwrite(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr; ulong data0; @@ -379,7 +379,7 @@ U_BOOT_CMD( /* */ -int do_iread(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_iread(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr; ulong cnt; @@ -411,7 +411,7 @@ U_BOOT_CMD( /* */ -int do_ireadl(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ireadl(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr; uchar buf[32]; diff --git a/board/esd/vme8349/caddy.c b/board/esd/vme8349/caddy.c index bda41177d9..ca8357d100 100644 --- a/board/esd/vme8349/caddy.c +++ b/board/esd/vme8349/caddy.c @@ -53,7 +53,7 @@ void generate_answer(struct caddy_cmd *cmd, uint32_t status, uint32_t *result) caddy_interface->answer_in = ptr; } -int do_caddy(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_caddy(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned long base_addr; uint32_t ptr; diff --git a/board/esd/voh405/voh405.c b/board/esd/voh405/voh405.c index a5600de6fc..6ed493ea66 100644 --- a/board/esd/voh405/voh405.c +++ b/board/esd/voh405/voh405.c @@ -33,7 +33,7 @@ #define FPGA_DEBUG #endif -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +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 */ @@ -356,7 +356,7 @@ int eeprom_write_enable (unsigned dev_addr, int state) return state; } -int do_eep_wren (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_eep_wren (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int query = argc == 1; int state = 0; diff --git a/board/esd/wuh405/wuh405.c b/board/esd/wuh405/wuh405.c index 01966eec26..704cd02702 100644 --- a/board/esd/wuh405/wuh405.c +++ b/board/esd/wuh405/wuh405.c @@ -32,7 +32,7 @@ #define FPGA_DEBUG #endif -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +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/evb64260/zuma_pbb.c b/board/evb64260/zuma_pbb.c index cab4fcae17..aa15fa015c 100644 --- a/board/evb64260/zuma_pbb.c +++ b/board/evb64260/zuma_pbb.c @@ -174,14 +174,14 @@ static int last_cmd = 4; /* write increment */ static int last_size = 64; int -do_zuma_init_pbb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_zuma_init_pbb (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { zuma_init_pbb (); return 0; } int -do_zuma_test_dma (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_zuma_test_dma (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc > 1) { last_cmd = simple_strtoul (argv[1], NULL, 10); @@ -194,7 +194,7 @@ do_zuma_test_dma (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } int -do_zuma_init_mbox (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_zuma_init_mbox (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { zuma_mbox_init (); return 0; diff --git a/board/freescale/common/ngpixis.c b/board/freescale/common/ngpixis.c index bb6794e859..a135fbe5ef 100644 --- a/board/freescale/common/ngpixis.c +++ b/board/freescale/common/ngpixis.c @@ -92,7 +92,7 @@ void set_altbank(void) } -int pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned int i; char *p_altbank = NULL; diff --git a/board/freescale/common/pixis.c b/board/freescale/common/pixis.c index 119eaf95af..a35b5cfe3e 100644 --- a/board/freescale/common/pixis.c +++ b/board/freescale/common/pixis.c @@ -284,7 +284,7 @@ static void set_px_go_with_watchdog(void) * */ static int pixis_disable_watchdog_cmd(cmd_tbl_t *cmdtp, int flag, int argc, - char *argv[]) + char * const argv[]) { /* Disable the VELA sequencer and the watchdog */ clrbits_8(pixis_base + PIXIS_VCTL, 9); @@ -302,7 +302,7 @@ U_BOOT_CMD( /* Enable or disable SGMII mode for a TSEC */ -static int pixis_set_sgmii(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int pixis_set_sgmii(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int which_tsec = -1; unsigned char mask; @@ -430,7 +430,7 @@ static unsigned long strfractoint(char *strptr) return intval + decval; } -static int pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned int i; char *p_cf = NULL; diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c index 661015e000..5a8f4f5810 100644 --- a/board/freescale/common/sys_eeprom.c +++ b/board/freescale/common/sys_eeprom.c @@ -314,7 +314,7 @@ static void set_mac_address(unsigned int index, const char *string) update_crc(); } -int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char cmd; diff --git a/board/freescale/m5249evb/m5249evb.c b/board/freescale/m5249evb/m5249evb.c index b1ccbebde5..ac1937b338 100644 --- a/board/freescale/m5249evb/m5249evb.c +++ b/board/freescale/m5249evb/m5249evb.c @@ -28,7 +28,7 @@ /* Prototypes */ -int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); int checkboard (void) { ulong val; diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c index a7b7f45458..0b7f787e5d 100644 --- a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c +++ b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c @@ -111,7 +111,7 @@ void mpc8610hpcd_diu_init(void) } int mpc8610diu_init_show_bmp(cmd_tbl_t *cmdtp, - int flag, int argc, char *argv[]) + int flag, int argc, char * const argv[]) { unsigned int addr; diff --git a/board/funkwerk/vovpn-gw/vovpn-gw.c b/board/funkwerk/vovpn-gw/vovpn-gw.c index 8c4abdd370..889ba3f074 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 *argv[]) +do_reset (void *cmdtp, int flag, int argc, char * const argv[]) { volatile ioport_t *iop; diff --git a/board/g2000/g2000.c b/board/g2000/g2000.c index 03cd6b8847..8b15e51f1d 100644 --- a/board/g2000/g2000.c +++ b/board/g2000/g2000.c @@ -148,7 +148,7 @@ phys_size_t initdram (int board_type) } #if 0 /* test-only !!! */ -int do_dumpebc(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_dumpebc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong ap, cr; @@ -174,7 +174,7 @@ U_BOOT_CMD( ); -int do_dumpdcr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_dumpdcr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; @@ -196,7 +196,7 @@ U_BOOT_CMD( ); -int do_dumpspr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_dumpspr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { printf("\nSpecial Purpose Registers (SPR's) for PPC405GP:"); printf("\n%04x %08x ", 947, mfspr(947)); diff --git a/board/hymod/bsp.c b/board/hymod/bsp.c index 262070fdff..5dd0311d41 100644 --- a/board/hymod/bsp.c +++ b/board/hymod/bsp.c @@ -141,7 +141,7 @@ fpga_load (int mezz, uchar *addr, ulong size) /* ------------------------------------------------------------------------- */ int -do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { uchar *addr, *save_addr; ulong size; @@ -301,7 +301,7 @@ U_BOOT_CMD( ); /* ------------------------------------------------------------------------- */ int -do_eecl (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +do_eecl (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { uchar data[HYMOD_EEPROM_SIZE]; uint addr = CONFIG_SYS_I2C_EEPROM_ADDR; @@ -346,7 +346,7 @@ U_BOOT_CMD( /* ------------------------------------------------------------------------- */ int -do_htest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_htest (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { #if 0 int rc; diff --git a/board/inka4x0/inkadiag.c b/board/inka4x0/inkadiag.c index 0a75abde3f..637bb5a7b3 100644 --- a/board/inka4x0/inkadiag.c +++ b/board/inka4x0/inkadiag.c @@ -131,7 +131,7 @@ static void inka_digio_set_output(unsigned int state, int which) } static int do_inkadiag_io(cmd_tbl_t *cmdtp, int flag, int argc, - char *argv[]) { + char * const argv[]) { unsigned int state, val; switch (argc) { @@ -237,7 +237,7 @@ static int ser_getc(volatile struct mpc5xxx_psc *psc) } static int do_inkadiag_serial(cmd_tbl_t *cmdtp, int flag, int argc, - char *argv[]) { + char * const argv[]) { volatile struct NS16550 *uart; volatile struct mpc5xxx_psc *psc; unsigned int num, mode; @@ -389,7 +389,7 @@ static void buzzer_turn_off(void) } static int do_inkadiag_buzzer(cmd_tbl_t *cmdtp, int flag, int argc, - char *argv[]) { + char * const argv[]) { unsigned int period, freq; int prev, i; @@ -435,7 +435,7 @@ static int do_inkadiag_buzzer(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -static int do_inkadiag_help(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +static int do_inkadiag_help(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); cmd_tbl_t cmd_inkadiag_sub[] = { U_BOOT_CMD_MKENT(io, 1, 1, do_inkadiag_io, "read digital input", @@ -450,10 +450,10 @@ cmd_tbl_t cmd_inkadiag_sub[] = { }; static int do_inkadiag_help(cmd_tbl_t *cmdtp, int flag, - int argc, char *argv[]) { + int argc, char * const argv[]) { extern int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t *cmdtp, int flag, - int argc, char *argv[]); + int argc, char * const argv[]); /* do_help prints command name - we prepend inkadiag to our subcommands! */ #ifdef CONFIG_SYS_LONGHELP puts ("inkadiag "); @@ -463,7 +463,7 @@ static int do_inkadiag_help(cmd_tbl_t *cmdtp, int flag, } static int do_inkadiag(cmd_tbl_t *cmdtp, int flag, int argc, - char *argv[]) { + char * const argv[]) { cmd_tbl_t *c; c = find_cmd_tbl(argv[1], &cmd_inkadiag_sub[0], ARRAY_SIZE(cmd_inkadiag_sub)); diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index 53cf474767..3a33b5a511 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -183,7 +183,7 @@ int board_init(void) } #if defined(CONFIG_CMD_SF) -int do_spi_toggle(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_spi_toggle(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { u32 tmp; if (argc < 2) { diff --git a/board/lwmon/lwmon.c b/board/lwmon/lwmon.c index 8e27778939..61a1e1417f 100644 --- a/board/lwmon/lwmon.c +++ b/board/lwmon/lwmon.c @@ -791,7 +791,7 @@ void lcd_show_board_info(void) #if defined(CONFIG_CMD_BSP) /*********************************************************************** F* Function: int do_pic (cmd_tbl_t *cmdtp, int flag, -F* int argc, char *argv[]) P*A*Z* +F* int argc, char * const argv[]) P*A*Z* * P* Parameters: cmd_tbl_t *cmdtp P* - Pointer to our command table entry @@ -800,7 +800,7 @@ P* - If the CMD_FLAG_REPEAT bit is set, then this call is P* a repetition P* int argc P* - Argument count -P* char *argv[] +P* char * const argv[] P* - Array of the actual arguments P* P* Returnvalue: int @@ -816,7 +816,7 @@ D* Design: wd@denx.de C* Coding: wd@denx.de V* Verification: dzu@denx.de ***********************************************************************/ -int do_pic (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_pic (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { uchar reg, val; @@ -857,7 +857,7 @@ U_BOOT_CMD( /*********************************************************************** F* Function: int do_kbd (cmd_tbl_t *cmdtp, int flag, -F* int argc, char *argv[]) P*A*Z* +F* int argc, char * const argv[]) P*A*Z* * P* Parameters: cmd_tbl_t *cmdtp P* - Pointer to our command table entry @@ -866,7 +866,7 @@ P* - If the CMD_FLAG_REPEAT bit is set, then this call is P* a repetition P* int argc P* - Argument count -P* char *argv[] +P* char * const argv[] P* - Array of the actual arguments P* P* Returnvalue: int @@ -881,7 +881,7 @@ D* Design: wd@denx.de C* Coding: wd@denx.de V* Verification: dzu@denx.de ***********************************************************************/ -int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { uchar kbd_data[KEYBD_DATALEN]; char keybd_env[2 * KEYBD_DATALEN + 1]; @@ -918,7 +918,7 @@ U_BOOT_CMD( /*********************************************************************** F* Function: int do_lsb (cmd_tbl_t *cmdtp, int flag, -F* int argc, char *argv[]) P*A*Z* +F* int argc, char * const argv[]) P*A*Z* * P* Parameters: cmd_tbl_t *cmdtp P* - Pointer to our command table entry @@ -927,7 +927,7 @@ P* - If the CMD_FLAG_REPEAT bit is set, then this call is P* a repetition P* int argc P* - Argument count -P* char *argv[] +P* char * const argv[] P* - Array of the actual arguments P* P* Returnvalue: int @@ -944,7 +944,7 @@ D* Design: wd@denx.de C* Coding: wd@denx.de V* Verification: dzu@denx.de ***********************************************************************/ -int do_lsb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_lsb (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { uchar val; immap_t *immr = (immap_t *) CONFIG_SYS_IMMR; diff --git a/board/lwmon5/kbd.c b/board/lwmon5/kbd.c index be1a1dfeb5..0e26b890b2 100644 --- a/board/lwmon5/kbd.c +++ b/board/lwmon5/kbd.c @@ -380,7 +380,7 @@ static uchar *key_match (uchar *kbd_data) /*********************************************************************** F* Function: int do_kbd (cmd_tbl_t *cmdtp, int flag, -F* int argc, char *argv[]) P*A*Z* +F* int argc, char * const argv[]) P*A*Z* * P* Parameters: cmd_tbl_t *cmdtp P* - Pointer to our command table entry @@ -389,7 +389,7 @@ P* - If the CMD_FLAG_REPEAT bit is set, then this call is P* a repetition P* int argc P* - Argument count -P* char *argv[] +P* char * const argv[] P* - Array of the actual arguments P* P* Returnvalue: int @@ -404,7 +404,7 @@ D* Design: wd@denx.de C* Coding: wd@denx.de V* Verification: dzu@denx.de ***********************************************************************/ -int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { uchar kbd_data[KEYBD_DATALEN]; char keybd_env[2 * KEYBD_DATALEN + 1]; diff --git a/board/lwmon5/lwmon5.c b/board/lwmon5/lwmon5.c index 415e036c00..3948c13b64 100644 --- a/board/lwmon5/lwmon5.c +++ b/board/lwmon5/lwmon5.c @@ -304,7 +304,7 @@ void hw_watchdog_reset(void) gpio_write_bit(CONFIG_SYS_GPIO_WATCHDOG, val); } -int do_eeprom_wp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_eeprom_wp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc < 2) { cmd_usage(cmdtp); diff --git a/board/micronas/vct/smc_eeprom.c b/board/micronas/vct/smc_eeprom.c index 6587f13e2f..b5a552134e 100644 --- a/board/micronas/vct/smc_eeprom.c +++ b/board/micronas/vct/smc_eeprom.c @@ -316,7 +316,7 @@ DONE: return result; } -static int do_eeprom_dump(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_eeprom_dump(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unchar data = 0, index = 0; ulong gpio_old_val; @@ -337,14 +337,14 @@ static int do_eeprom_dump(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -static int do_eeprom_erase_all(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_eeprom_erase_all(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { eeprom_erase_all(); return 0; } -static int do_eeprom_save_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_eeprom_save_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong hi16, lo32; unchar ethaddr[6], i; diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c index 32bf244935..a3722b2024 100644 --- a/board/mpl/common/common_util.c +++ b/board/mpl/common/common_util.c @@ -428,7 +428,7 @@ void check_env(void) #endif /* #if !defined(CONFIG_PATI) */ -int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong size,src,ld_addr; int result; diff --git a/board/mpl/mip405/cmd_mip405.c b/board/mpl/mip405/cmd_mip405.c index cd93a7ca0b..8ddb54db1c 100644 --- a/board/mpl/mip405/cmd_mip405.c +++ b/board/mpl/mip405/cmd_mip405.c @@ -30,12 +30,12 @@ extern void print_mip405_info(void); -extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* ------------------------------------------------------------------------- */ -int do_mip405(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mip405(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong led_on; diff --git a/board/mpl/pati/cmd_pati.c b/board/mpl/pati/cmd_pati.c index 740881e6d4..aba11d5a75 100644 --- a/board/mpl/pati/cmd_pati.c +++ b/board/mpl/pati/cmd_pati.c @@ -31,7 +31,7 @@ #include "pci_eeprom.h" extern void show_pld_regs(void); -extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern void user_led0(int led_on); extern void user_led1(int led_on); @@ -355,7 +355,7 @@ static void display_pci_regs(void) } -int do_pati(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_pati(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (strcmp(argv[1], "info") == 0) { diff --git a/board/mpl/pip405/cmd_pip405.c b/board/mpl/pip405/cmd_pip405.c index 6bbae89e5d..554c8d1d72 100644 --- a/board/mpl/pip405/cmd_pip405.c +++ b/board/mpl/pip405/cmd_pip405.c @@ -30,12 +30,12 @@ extern void print_pip405_info(void); -extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* ------------------------------------------------------------------------- */ -int do_pip405(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_pip405(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong led_on,led_nr; diff --git a/board/mpl/vcma9/cmd_vcma9.c b/board/mpl/vcma9/cmd_vcma9.c index 0ee959507f..0d5f46e5cd 100644 --- a/board/mpl/vcma9/cmd_vcma9.c +++ b/board/mpl/vcma9/cmd_vcma9.c @@ -50,11 +50,11 @@ extern int vcma9_nanderase(void); extern int vcma9_nandread(ulong); extern int vcma9_nandwrite(ulong); extern int vcma9_dactest(int); -extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* ------------------------------------------------------------------------- */ -int do_vcma9(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_vcma9(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { struct eth_device *dev; char cs8900_name[10]; diff --git a/board/netstar/crcit.c b/board/netstar/crcit.c index 0eef41a11e..a16264914c 100644 --- a/board/netstar/crcit.c +++ b/board/netstar/crcit.c @@ -71,7 +71,7 @@ static int do_crc(char *path, unsigned version) return EXIT_SUCCESS; } -int main(int argc, char **argv) +int main(int argc, char * const *argv) { if (argc == 2) { return do_crc(argv[1], 0); diff --git a/board/netstar/eeprom.c b/board/netstar/eeprom.c index aca4458e29..aa375a4b1a 100644 --- a/board/netstar/eeprom.c +++ b/board/netstar/eeprom.c @@ -149,7 +149,7 @@ static int parse_element(char *s, unsigned char *buf, int len) return cnt; } -int eeprom(int argc, char *argv[]) +int eeprom(int argc, char * const argv[]) { int i, len, ret; unsigned char buf[58], *p; diff --git a/board/pcippc2/pcippc2.c b/board/pcippc2/pcippc2.c index 6ee44d691d..199def4678 100644 --- a/board/pcippc2/pcippc2.c +++ b/board/pcippc2/pcippc2.c @@ -69,7 +69,7 @@ phys_size_t initdram (int board_type) return cpc710_ram_init (); } -int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { out32 (REG (CPC0, SPOR), 0); iobarrier_rw (); @@ -206,7 +206,7 @@ void watchdog_reset (void) } #if defined(CONFIG_CMD_BSP) -int do_wd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_wd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { switch (argc) { case 1: diff --git a/board/pcs440ep/pcs440ep.c b/board/pcs440ep/pcs440ep.c index a6885d6895..d7adff2f8e 100644 --- a/board/pcs440ep/pcs440ep.c +++ b/board/pcs440ep/pcs440ep.c @@ -567,7 +567,7 @@ void hw_watchdog_reset(void) * "led" Commando for the U-Boot shell * ************************************************************************/ -int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int rcode = 0, i; ulong pattern = 0; @@ -611,7 +611,7 @@ U_BOOT_CMD( * "sha1" Commando for the U-Boot shell * ************************************************************************/ -int do_sha1 (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_sha1 (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int rcode = -1; diff --git a/board/pdm360ng/pdm360ng.c b/board/pdm360ng/pdm360ng.c index 8fe5ac874e..29a095d738 100644 --- a/board/pdm360ng/pdm360ng.c +++ b/board/pdm360ng/pdm360ng.c @@ -633,7 +633,7 @@ static int set_lcd_brightness(char *brightness) } static int cmd_lcd_brightness(cmd_tbl_t *cmdtp, int flag, - int argc, char *argv[]) + int argc, char * const argv[]) { if (argc < 2) { cmd_usage(cmdtp); diff --git a/board/pn62/cmd_pn62.c b/board/pn62/cmd_pn62.c index 43295d6e36..73294351ba 100644 --- a/board/pn62/cmd_pn62.c +++ b/board/pn62/cmd_pn62.c @@ -36,7 +36,7 @@ extern int do_bootm (cmd_tbl_t *, int, int, char *[]); /* * Command led: controls the various LEDs 0..11 on the PN62 card. */ -int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned int number, function; @@ -64,7 +64,7 @@ U_BOOT_CMD( #define CMD_MOVE_WINDOW 0x1 #define CMD_BOOT_IMAGE 0x2 -int do_loadpci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_loadpci (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *s; ulong addr = 0, count = 0; diff --git a/board/ppmc7xx/ppmc7xx.c b/board/ppmc7xx/ppmc7xx.c index 944cd4ddc6..0cad897349 100644 --- a/board/ppmc7xx/ppmc7xx.c +++ b/board/ppmc7xx/ppmc7xx.c @@ -89,7 +89,7 @@ int misc_init_r( void ) * * Shell command to reset the board. */ -void do_reset( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] ) +void do_reset( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] ) { printf( "Resetting...\n" ); diff --git a/board/prodrive/pdnb3/pdnb3.c b/board/prodrive/pdnb3/pdnb3.c index 69f8f9bbca..3f2deed1e2 100644 --- a/board/prodrive/pdnb3/pdnb3.c +++ b/board/prodrive/pdnb3/pdnb3.c @@ -29,7 +29,7 @@ DECLARE_GLOBAL_DATA_PTR; /* Prototypes */ -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +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) @@ -210,7 +210,7 @@ int do_fpga_boot(unsigned char *fpgadata) return (0); } -int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr; diff --git a/board/pxa255_idp/pxa_idp.c b/board/pxa255_idp/pxa_idp.c index 05e30ecf00..a54a95dca9 100644 --- a/board/pxa255_idp/pxa_idp.c +++ b/board/pxa255_idp/pxa_idp.c @@ -122,7 +122,7 @@ void blink_c(void) GPCR0 = led_bit; } -int do_idpcmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_idpcmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { printf("IDPCMD started\n"); return 0; diff --git a/board/r360mpi/r360mpi.c b/board/r360mpi/r360mpi.c index 703af73aad..b5315ad041 100644 --- a/board/r360mpi/r360mpi.c +++ b/board/r360mpi/r360mpi.c @@ -391,7 +391,7 @@ static uchar *key_match (uchar * kbd_str) #endif /* CONFIG_PREBOOT */ /* Read Keyboard status */ -int do_kbd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_kbd (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { uchar kbd_data[KEYBD_DATALEN]; uchar keybd_env[2 * KEYBD_DATALEN + 1]; diff --git a/board/renesas/sh7785lcr/rtl8169_mac.c b/board/renesas/sh7785lcr/rtl8169_mac.c index 634efb42a8..dae01ec773 100644 --- a/board/renesas/sh7785lcr/rtl8169_mac.c +++ b/board/renesas/sh7785lcr/rtl8169_mac.c @@ -298,7 +298,7 @@ void mac_read(void) data[0], data[1], data[2], data[3], data[4], data[5]); } -int do_set_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_set_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; unsigned char mac[6]; @@ -328,7 +328,7 @@ U_BOOT_CMD( "setmac - write MAC address for RTL8110SCL" ); -int do_print_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_print_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc != 1) { cmd_usage(cmdtp); diff --git a/board/renesas/sh7785lcr/selfcheck.c b/board/renesas/sh7785lcr/selfcheck.c index e803b3c9c1..44247c850f 100644 --- a/board/renesas/sh7785lcr/selfcheck.c +++ b/board/renesas/sh7785lcr/selfcheck.c @@ -108,7 +108,7 @@ static void test_pci(void) printf("PCI CN2 ID = %08x\n", readl(0xfe040220)); } -int do_hw_test(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_hw_test(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *cmd; diff --git a/board/renesas/sh7785lcr/sh7785lcr.c b/board/renesas/sh7785lcr/sh7785lcr.c index 9948d04eae..cad3905ff2 100644 --- a/board/renesas/sh7785lcr/sh7785lcr.c +++ b/board/renesas/sh7785lcr/sh7785lcr.c @@ -56,7 +56,7 @@ int board_eth_init(bd_t *bis) } #if defined(CONFIG_SH_32BIT) -int do_pmb(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_pmb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { /* clear ITLB */ writel(0x00000004, 0xff000010); diff --git a/board/sacsng/sacsng.c b/board/sacsng/sacsng.c index 49d8bba15d..8edca59c18 100644 --- a/board/sacsng/sacsng.c +++ b/board/sacsng/sacsng.c @@ -38,7 +38,7 @@ extern void eth_loopback_test(void); #endif /* CONFIG_ETHER_LOOPBACK_TEST */ -extern int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +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/sandburst/common/ppc440gx_i2c.c b/board/sandburst/common/ppc440gx_i2c.c index d286714919..68acdd8d14 100644 --- a/board/sandburst/common/ppc440gx_i2c.c +++ b/board/sandburst/common/ppc440gx_i2c.c @@ -465,7 +465,7 @@ void i2c_reg_write1(uchar i2c_addr, uchar reg, uchar val) } -int do_i2c1_probe(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_i2c1_probe(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int j; #if defined(CONFIG_SYS_I2C_NOPROBES) diff --git a/board/sandburst/karef/karef.c b/board/sandburst/karef/karef.c index 92b15aa50f..6457f9b1f8 100644 --- a/board/sandburst/karef/karef.c +++ b/board/sandburst/karef/karef.c @@ -518,7 +518,7 @@ void fpga_init(void) return; } -int karefSetupVars(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int karefSetupVars(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned short sernum; char envstr[255]; @@ -578,7 +578,7 @@ int karefSetupVars(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return(1); } -int karefRecover(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int karefRecover(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned short sernum; char envstr[255]; diff --git a/board/sandburst/metrobox/metrobox.c b/board/sandburst/metrobox/metrobox.c index 0c8e6dfb1e..76d8293fd6 100644 --- a/board/sandburst/metrobox/metrobox.c +++ b/board/sandburst/metrobox/metrobox.c @@ -485,7 +485,7 @@ void fpga_init(void) return; } -int metroboxSetupVars(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int metroboxSetupVars(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned short sernum; char envstr[255]; @@ -545,7 +545,7 @@ int metroboxSetupVars(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return(1); } -int metroboxRecover(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int metroboxRecover(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned short sernum; char envstr[255]; diff --git a/board/siemens/common/fpga.c b/board/siemens/common/fpga.c index 4b45902aa2..5660c09148 100644 --- a/board/siemens/common/fpga.c +++ b/board/siemens/common/fpga.c @@ -222,7 +222,7 @@ static int fpga_load (fpga_t* fpga, ulong addr, int checkall) /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */ -int do_fpga (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_fpga (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr = 0; int i; diff --git a/board/siemens/pcu_e/pcu_e.c b/board/siemens/pcu_e/pcu_e.c index 827578c3a9..14d75ea429 100644 --- a/board/siemens/pcu_e/pcu_e.c +++ b/board/siemens/pcu_e/pcu_e.c @@ -373,7 +373,7 @@ void reset_phy (void) #define PUMA_READ_MODE 0 #define PUMA_LOAD_MODE 1 -int do_puma (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_puma (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong addr, len; diff --git a/board/spear/common/spr_misc.c b/board/spear/common/spr_misc.c index e35691200d..d99036bef3 100644 --- a/board/spear/common/spr_misc.c +++ b/board/spear/common/spr_misc.c @@ -206,7 +206,7 @@ static int write_mac(uchar *mac) return -1; } -int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { void (*sram_setfreq) (unsigned int, unsigned int); struct chip_data *chip = &chip_data; diff --git a/board/tcm-bf537/flash.c b/board/tcm-bf537/flash.c index 52c5bd83c9..14055c6177 100644 --- a/board/tcm-bf537/flash.c +++ b/board/tcm-bf537/flash.c @@ -11,7 +11,7 @@ #include #include "gpio_cfi_flash.h" -int do_pf(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_pf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong faddr = CONFIG_SYS_FLASH_BASE; ushort data; diff --git a/board/tqc/tqm5200/cmd_stk52xx.c b/board/tqc/tqm5200/cmd_stk52xx.c index e309beb1dc..0db705049f 100644 --- a/board/tqc/tqm5200/cmd_stk52xx.c +++ b/board/tqc/tqm5200/cmd_stk52xx.c @@ -301,7 +301,7 @@ static int i2s_squarewave(unsigned long duration, unsigned int freq, return 0; } -static int cmd_sound(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int cmd_sound(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned long reg, val, duration; char *tmp; @@ -419,7 +419,7 @@ static int cmd_sound(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 1; } -static int cmd_wav(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int cmd_wav(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned long length, addr; unsigned char volume; @@ -484,7 +484,7 @@ static int cmd_wav(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return rcode; } -static int cmd_beep(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int cmd_beep(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned char volume; unsigned int channel; @@ -581,7 +581,7 @@ void led_init(void) * return 1 if led number unknown * return 0 else */ -int do_led(char *argv[]) +int do_led(char * const argv[]) { struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO; struct mpc5xxx_gpt_0_7 *gpt = (struct mpc5xxx_gpt_0_7 *)MPC5XXX_GPT; @@ -892,7 +892,7 @@ int can_init(void) * return 1 on CAN failure * return 0 if no failure */ -int do_can(char *argv[]) +int do_can(char * const argv[]) { int i; struct mpc5xxx_mscan *can1 = @@ -994,7 +994,7 @@ int do_can(char *argv[]) * return 3 on rts/cts failure * return 0 if no failure */ -int do_rs232(char *argv[]) +int do_rs232(char * const argv[]) { int error_status = 0; struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO; @@ -1123,7 +1123,7 @@ static void sm501_backlight (unsigned int state) } #endif /* !CONFIG_FO300 & !CONFIG_TQM5200S */ -int cmd_fkt(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int cmd_fkt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int rcode; diff --git a/board/tqc/tqm5200/cmd_tb5200.c b/board/tqc/tqm5200/cmd_tb5200.c index 578e716e7a..79c1b980a2 100644 --- a/board/tqc/tqm5200/cmd_tb5200.c +++ b/board/tqc/tqm5200/cmd_tb5200.c @@ -42,7 +42,7 @@ static void led_init(void) gpt->gpt4.emsr |= 0x00000024; } -int cmd_led(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int cmd_led(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { struct mpc5xxx_gpt_0_7 *gpt = (struct mpc5xxx_gpt_0_7 *)MPC5XXX_GPT; @@ -72,7 +72,7 @@ static void sm501_backlight (unsigned int state) ~((1 << 26) | (1 << 27)); } -int cmd_backlight(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int cmd_backlight(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (strcmp (argv[1], "on") == 0) { debug ("switch backlight on\n"); diff --git a/board/tqc/tqm8272/tqm8272.c b/board/tqc/tqm8272/tqm8272.c index 92f74a39cc..96ec078fd9 100644 --- a/board/tqc/tqm8272/tqm8272.c +++ b/board/tqc/tqm8272/tqm8272.c @@ -858,7 +858,7 @@ int board_early_init_r(void) } #endif -int do_hwib_dump (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_hwib_dump (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { dump_hwib (); return 0; diff --git a/board/trab/cmd_trab.c b/board/trab/cmd_trab.c index 472d7d81e9..6d23470f84 100644 --- a/board/trab/cmd_trab.c +++ b/board/trab/cmd_trab.c @@ -109,16 +109,16 @@ extern s32 tsc2000_contact_temp (void); extern void tsc2000_spi_init(void); /* function declarations */ -int do_dip (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); -int do_vcc5v (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); -int do_burn_in (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); -int do_contact_temp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); -int do_burn_in_status (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +int do_dip (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); +int do_vcc5v (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); +int do_burn_in (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); +int do_contact_temp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); +int do_burn_in_status (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); int i2c_write_multiple (uchar chip, uint addr, int alen, uchar *buffer, int len); int i2c_read_multiple (uchar chip, uint addr, int alen, uchar *buffer, int len); -int do_temp_log (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +int do_temp_log (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* helper functions */ static void adc_init (void); @@ -162,7 +162,7 @@ typedef struct test_function_s { test_function_t test_function[BIF_MAX]; -int do_burn_in (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_burn_in (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; int cycle_status; @@ -266,7 +266,7 @@ U_BOOT_CMD( ); -int do_dip (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_dip (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i, dip; @@ -299,7 +299,7 @@ U_BOOT_CMD( ); -int do_vcc5v (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_vcc5v (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int vcc5v; @@ -327,7 +327,7 @@ U_BOOT_CMD( ); -int do_contact_temp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_contact_temp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int contact_temp; @@ -352,7 +352,7 @@ U_BOOT_CMD( ); -int do_burn_in_status (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_burn_in_status (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc > 1) { cmd_usage(cmdtp); @@ -842,7 +842,7 @@ static int dummy(void) return (0); } -int do_temp_log (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_temp_log (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int contact_temp; int delay = 0; diff --git a/board/trab/trab.c b/board/trab/trab.c index 71fd22c158..12fe120eac 100644 --- a/board/trab/trab.c +++ b/board/trab/trab.c @@ -305,7 +305,7 @@ static char *key_match (ulong kbd_data) #endif /* CONFIG_PREBOOT */ /* Read Keyboard status */ -int do_kbd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_kbd (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong kbd_data = KBD_DATA; char keybd_env[KEYBD_KEY_NUM + 1]; diff --git a/board/trab/trab_fkt.c b/board/trab/trab_fkt.c index 2df9a04407..268162e53a 100644 --- a/board/trab/trab_fkt.c +++ b/board/trab/trab_fkt.c @@ -115,21 +115,21 @@ int do_rotary_switch (void); int do_pressure (void); int do_v_bat (void); int do_vfd_id (void); -int do_buzzer (char **); -int do_led (char **); -int do_full_bridge (char **); -int do_dac (char **); +int do_buzzer (char * const *); +int do_led (char * const *); +int do_full_bridge (char * const *); +int do_dac (char * const *); int do_motor_contact (void); -int do_motor (char **); -int do_pwm (char **); -int do_thermo (char **); -int do_touch (char **); -int do_rs485 (char **); -int do_serial_number (char **); +int do_motor (char * const *); +int do_pwm (char * const *); +int do_thermo (char * const *); +int do_touch (char * const *); +int do_rs485 (char * const *); +int do_serial_number (char * const *); int do_crc16 (void); int do_power_switch (void); -int do_gain (char **); -int do_eeprom (char **); +int do_gain (char * const *); +int do_eeprom (char * const *); /* helper functions */ static void adc_init (void); @@ -150,8 +150,8 @@ static unsigned short updcrc(unsigned short icrc, unsigned char *icp, unsigned int icnt); #if defined(CONFIG_CMD_I2C) -static int trab_eeprom_read (char **argv); -static int trab_eeprom_write (char **argv); +static int trab_eeprom_read (char * const *argv); +static int trab_eeprom_write (char * const *argv); int i2c_write_multiple (uchar chip, uint addr, int alen, uchar *buffer, int len); int i2c_read_multiple ( uchar chip, uint addr, int alen, uchar *buffer, @@ -163,7 +163,7 @@ int i2c_read_multiple ( uchar chip, uint addr, int alen, uchar *buffer, * test. */ -int trab_fkt (int argc, char *argv[]) +int trab_fkt (int argc, char * const argv[]) { int i; @@ -585,7 +585,7 @@ int do_vfd_id (void) return 0; } -int do_buzzer (char **argv) +int do_buzzer (char * const *argv) { int counter; @@ -635,7 +635,7 @@ int do_buzzer (char **argv) } -int do_led (char **argv) +int do_led (char * const *argv) { struct s3c24x0_gpio * const gpio = s3c24x0_get_base_gpio(); @@ -690,7 +690,7 @@ int do_led (char **argv) } -int do_full_bridge (char **argv) +int do_full_bridge (char * const *argv) { struct s3c24x0_gpio * const gpio = s3c24x0_get_base_gpio(); @@ -724,7 +724,7 @@ static inline unsigned long tsc2000_to_uv (u16 val) } -int do_dac (char **argv) +int do_dac (char * const *argv) { int brightness; @@ -799,7 +799,7 @@ int do_motor_contact (void) return 0; } -int do_motor (char **argv) +int do_motor (char * const *argv) { struct s3c24x0_gpio * const gpio = s3c24x0_get_base_gpio(); @@ -824,7 +824,7 @@ static void print_identifier (void) printf ("## FKT: "); } -int do_pwm (char **argv) +int do_pwm (char * const *argv) { int counter; struct s3c24x0_gpio * const gpio = s3c24x0_get_base_gpio(); @@ -869,7 +869,7 @@ int do_pwm (char **argv) } -int do_thermo (char **argv) +int do_thermo (char * const *argv) { int channel, res; @@ -892,7 +892,7 @@ int do_thermo (char **argv) } -int do_touch (char **argv) +int do_touch (char * const *argv) { int x, y; @@ -1045,7 +1045,7 @@ static void touch_read_x_y (int *px, int *py) } -int do_rs485 (char **argv) +int do_rs485 (char * const *argv) { int timeout; char data[RS485_MAX_RECEIVE_BUF_LEN]; @@ -1110,7 +1110,7 @@ static int rs485_receive_chars (char *data, int timeout) } -int do_serial_number (char **argv) +int do_serial_number (char * const *argv) { #if defined(CONFIG_CMD_I2C) unsigned int serial_number; @@ -1249,7 +1249,7 @@ static unsigned short updcrc(unsigned short icrc, unsigned char *icp, } -int do_gain (char **argv) +int do_gain (char * const *argv) { int range; @@ -1265,7 +1265,7 @@ int do_gain (char **argv) } -int do_eeprom (char **argv) +int do_eeprom (char * const *argv) { #if defined(CONFIG_CMD_I2C) if (strcmp (argv[2], "read") == 0) { @@ -1286,7 +1286,7 @@ int do_eeprom (char **argv) } #if defined(CONFIG_CMD_I2C) -static int trab_eeprom_read (char **argv) +static int trab_eeprom_read (char * const *argv) { int i; int len; @@ -1331,7 +1331,7 @@ static int trab_eeprom_read (char **argv) return (0); } -static int trab_eeprom_write (char **argv) +static int trab_eeprom_write (char * const *argv) { int i; int len; diff --git a/board/trizepsiv/eeprom.c b/board/trizepsiv/eeprom.c index b6b16bf680..fede2e0774 100644 --- a/board/trizepsiv/eeprom.c +++ b/board/trizepsiv/eeprom.c @@ -25,7 +25,7 @@ #include #include -static int do_read_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { +static int do_read_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned int i; u8 data[2]; @@ -39,7 +39,7 @@ static int do_read_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char *a return (0); } -static int do_write_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { +static int do_write_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int offset,value; if (argc < 4) { @@ -58,7 +58,7 @@ static int do_write_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char * return (0); } -int do_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { +int do_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc < 2) { cmd_usage(cmdtp); return 1; diff --git a/board/voiceblue/eeprom.c b/board/voiceblue/eeprom.c index f7e0ba56ab..aa6baca645 100644 --- a/board/voiceblue/eeprom.c +++ b/board/voiceblue/eeprom.c @@ -149,7 +149,7 @@ static int parse_element(char *s, unsigned char *buf, int len) return cnt; } -int eeprom(int argc, char *argv[]) +int eeprom(int argc, char * const argv[]) { int i, len, ret; unsigned char buf[58], *p; diff --git a/board/w7o/cmd_vpd.c b/board/w7o/cmd_vpd.c index 013fc791f2..44d40eed28 100644 --- a/board/w7o/cmd_vpd.c +++ b/board/w7o/cmd_vpd.c @@ -32,7 +32,7 @@ * Interpreter command to retrieve board specific Vital Product Data, "VPD" * ====================================================================== */ -int do_vpd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_vpd (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { VPD vpd; /* Board specific data struct */ uchar dev_addr = CONFIG_SYS_DEF_EEPROM_ADDR; diff --git a/board/zeus/update.c b/board/zeus/update.c index c8487e58f8..61196276d5 100644 --- a/board/zeus/update.c +++ b/board/zeus/update.c @@ -91,7 +91,7 @@ static int update_boot_eeprom(void) return 0; } -int do_update_boot_eeprom(cmd_tbl_t* cmdtp, int flag, int argc, char* argv[]) +int do_update_boot_eeprom(cmd_tbl_t* cmdtp, int flag, int argc, char * const argv[]) { return update_boot_eeprom(); } diff --git a/board/zeus/zeus.c b/board/zeus/zeus.c index 01273a1f7d..e2951512f8 100644 --- a/board/zeus/zeus.c +++ b/board/zeus/zeus.c @@ -44,7 +44,7 @@ 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 *argv[]); +int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); static u32 start_time; @@ -278,7 +278,7 @@ static int restore_default(void) return 0; } -int do_set_default(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_set_default(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *buf; char *buf_save; @@ -336,7 +336,7 @@ static inline int sw_reset_pressed(void) return !(in_be32((void *)GPIO0_IR) & GPIO_VAL(CONFIG_SYS_GPIO_SW_RESET)); } -int do_chkreset(cmd_tbl_t* cmdtp, int flag, int argc, char* argv[]) +int do_chkreset(cmd_tbl_t* cmdtp, int flag, int argc, char * const argv[]) { int delta; int count = 0; diff --git a/common/cmd_ambapp.c b/common/cmd_ambapp.c index bb20ab5149..283c433376 100644 --- a/common/cmd_ambapp.c +++ b/common/cmd_ambapp.c @@ -223,7 +223,7 @@ void ambapp_print_ahb(ahbctrl_pp_dev * ahb, int index) printf(" irq: %-2d (ver: %d)\n", irq, ver); } -int do_ambapp_print(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_ambapp_print(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { /* Print AHB Masters */ diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 710abdf877..fbe73f1b3d 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -42,7 +42,7 @@ static void print_lnum(const char *, u64); #if defined(CONFIG_PPC) static void print_str(const char *, const char *); -int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; char buf[32]; @@ -122,7 +122,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #elif defined(CONFIG_NIOS2) -int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; @@ -149,7 +149,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #elif defined(CONFIG_MICROBLAZE) -int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; print_num ("mem start ", (ulong)bd->bi_memstart); @@ -171,7 +171,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #elif defined(CONFIG_SPARC) -int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; @@ -206,7 +206,7 @@ int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) static void print_str(const char *, const char *); -int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; char buf[32]; @@ -256,7 +256,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) static void print_str(const char *, const char *); -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; char buf[32]; @@ -284,7 +284,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #elif defined(CONFIG_MIPS) -int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { bd_t *bd = gd->bd; @@ -324,7 +324,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #elif defined(CONFIG_ARM) -int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; bd_t *bd = gd->bd; diff --git a/common/cmd_bedbug.c b/common/cmd_bedbug.c index 8be1c25fd7..d01ee19ee5 100644 --- a/common/cmd_bedbug.c +++ b/common/cmd_bedbug.c @@ -73,7 +73,7 @@ void bedbug_init (void) * Entry point from the interpreter to the disassembler. Repeated calls * will resume from the last disassembled address. * ====================================================================== */ -int do_bedbug_dis (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_bedbug_dis (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong addr; /* Address to start disassembly from */ ulong len; /* # of instructions to disassemble */ @@ -115,7 +115,7 @@ U_BOOT_CMD (ds, 3, 1, do_bedbug_dis, * instructions in consecutive memory locations until a '.' (period) is * entered on a line by itself. * ====================================================================== */ -int do_bedbug_asm (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_bedbug_asm (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { long mem_addr; /* Address to assemble into */ unsigned long instr; /* Machine code for text */ @@ -167,7 +167,7 @@ U_BOOT_CMD (as, 2, 0, do_bedbug_asm, * CPU-specific break point set routine. * ====================================================================== */ -int do_bedbug_break (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_bedbug_break (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { /* -------------------------------------------------- */ if (bug_ctx.do_break) @@ -263,7 +263,7 @@ void bedbug_main_loop (unsigned long addr, struct pt_regs *regs) * stopped flag in the context so that the breakpoint routine will * return. * ====================================================================== */ -int do_bedbug_continue (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_bedbug_continue (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { /* -------------------------------------------------- */ @@ -286,7 +286,7 @@ U_BOOT_CMD (continue, 1, 0, do_bedbug_continue, * the address passes control to the CPU-specific set breakpoint routine * for the current breakpoint number. * ====================================================================== */ -int do_bedbug_step (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_bedbug_step (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { unsigned long addr; /* Address to stop at */ @@ -317,7 +317,7 @@ U_BOOT_CMD (step, 1, 1, do_bedbug_step, * the address passes control to the CPU-specific set breakpoint routine * for the current breakpoint number. * ====================================================================== */ -int do_bedbug_next (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_bedbug_next (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { unsigned long addr; /* Address to stop at */ @@ -346,7 +346,7 @@ U_BOOT_CMD (next, 1, 1, do_bedbug_next, * Interpreter command to print the current stack. This assumes an EABI * architecture, so it starts with GPR R1 and works back up the stack. * ====================================================================== */ -int do_bedbug_stack (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_bedbug_stack (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { unsigned long sp; /* Stack pointer */ unsigned long func; /* LR from stack */ @@ -391,7 +391,7 @@ U_BOOT_CMD (where, 1, 1, do_bedbug_stack, * Interpreter command to dump the registers. Calls the CPU-specific * show registers routine. * ====================================================================== */ -int do_bedbug_rdump (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_bedbug_rdump (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { /* -------------------------------------------------- */ diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c index 583b0090cb..5ec798c549 100644 --- a/common/cmd_bmp.c +++ b/common/cmd_bmp.c @@ -90,7 +90,7 @@ bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp) } #endif -static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong addr; @@ -109,7 +109,7 @@ static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return (bmp_info(addr)); } -static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong addr; int x = 0, y = 0; @@ -149,7 +149,7 @@ static cmd_tbl_t cmd_bmp_sub[] = { * Return: None * */ -static int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { cmd_tbl_t *c; diff --git a/common/cmd_boot.c b/common/cmd_boot.c index bfc1db21d2..9ccc8c798d 100644 --- a/common/cmd_boot.c +++ b/common/cmd_boot.c @@ -30,12 +30,12 @@ /* Allow ports to override the default behavior */ __attribute__((weak)) -unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[]) +unsigned long do_go_exec (ulong (*entry)(int, char * const []), int argc, char * const argv[]) { return entry (argc, argv); } -int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr, rc; int rcode = 0; @@ -69,7 +69,7 @@ U_BOOT_CMD( " passing 'arg' as arguments" ); -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); U_BOOT_CMD( reset, 1, 0, do_reset, diff --git a/common/cmd_bootldr.c b/common/cmd_bootldr.c index b2a8b0e190..c7f14d9e45 100644 --- a/common/cmd_bootldr.c +++ b/common/cmd_bootldr.c @@ -142,7 +142,7 @@ static void ldr_exec(void *addr) * to also add booting from SPI, or TWI, but this function does * not currently support that. */ -int do_bootldr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_bootldr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { void *addr; diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 74ff205d3e..bf77fb463d 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -78,7 +78,7 @@ static int image_info (unsigned long addr); #if defined(CONFIG_CMD_IMLS) #include extern flash_info_t flash_info[]; /* info for FLASH chips */ -static int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +static int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); #endif #ifdef CONFIG_SILENT_CONSOLE @@ -90,9 +90,9 @@ static image_header_t *image_get_kernel (ulong img_addr, int verify); static int fit_check_kernel (const void *fit, int os_noffset, int verify); #endif -static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag,int argc, char *argv[], +static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag,int argc, char * const argv[], bootm_headers_t *images, ulong *os_data, ulong *os_len); -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* * Continue booting an OS image; caller already has: @@ -102,7 +102,7 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); * - loaded (first part of) image to header load address, * - disabled interrupts. */ -typedef int boot_os_fn (int flag, int argc, char *argv[], +typedef int boot_os_fn (int flag, int argc, char * const argv[], bootm_headers_t *images); /* pointers to os/initrd/fdt */ #ifdef CONFIG_BOOTM_LINUX @@ -121,8 +121,8 @@ static boot_os_fn do_bootm_rtems; #if defined(CONFIG_CMD_ELF) static boot_os_fn do_bootm_vxworks; static boot_os_fn do_bootm_qnxelf; -int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); -int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); +int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); #endif #if defined(CONFIG_INTEGRITY) static boot_os_fn do_bootm_integrity; @@ -206,7 +206,7 @@ static void bootm_start_lmb(void) #endif } -static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { void *os_hdr; int ret; @@ -438,10 +438,10 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress) return 0; } -static int bootm_start_standalone(ulong iflag, int argc, char *argv[]) +static int bootm_start_standalone(ulong iflag, int argc, char * const argv[]) { char *s; - int (*appl)(int, char *[]); + int (*appl)(int, char * const []); /* Don't start if "autostart" is set to "no" */ if (((s = getenv("autostart")) != NULL) && (strcmp(s, "no") == 0)) { @@ -450,7 +450,7 @@ static int bootm_start_standalone(ulong iflag, int argc, char *argv[]) setenv("filesize", buf); return 0; } - appl = (int (*)(int, char *[]))ntohl(images.ep); + appl = (int (*)(int, char * const []))ntohl(images.ep); (*appl)(argc-1, &argv[1]); return 0; @@ -473,7 +473,7 @@ static cmd_tbl_t cmd_bootm_sub[] = { U_BOOT_CMD_MKENT(go, 0, 1, (void *)BOOTM_STATE_OS_GO, "", ""), }; -int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int ret = 0; int state; @@ -576,7 +576,7 @@ int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /* bootm - boot application image from image in memory */ /*******************************************************************/ -int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong iflag; ulong load_end = 0; @@ -811,7 +811,7 @@ static int fit_check_kernel (const void *fit, int os_noffset, int verify) * pointer to image header if valid image was found, plus kernel start * address and length, otherwise NULL */ -static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], +static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], bootm_headers_t *images, ulong *os_data, ulong *os_len) { image_header_t *hdr; @@ -1012,7 +1012,7 @@ U_BOOT_CMD( /* bootd - boot default image */ /*******************************************************************/ #if defined(CONFIG_CMD_BOOTD) -int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int rcode = 0; @@ -1047,7 +1047,7 @@ U_BOOT_CMD( /* iminfo - print header info for a requested image */ /*******************************************************************/ #if defined(CONFIG_CMD_IMI) -int do_iminfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_iminfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int arg; ulong addr; @@ -1134,7 +1134,7 @@ U_BOOT_CMD( /* imls - list all images found in flash */ /*******************************************************************/ #if defined(CONFIG_CMD_IMLS) -int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { flash_info_t *info; int i, j; @@ -1237,7 +1237,7 @@ static void fixup_silent_linux () /*******************************************************************/ #ifdef CONFIG_BOOTM_NETBSD -static int do_bootm_netbsd (int flag, int argc, char *argv[], +static int do_bootm_netbsd (int flag, int argc, char * const argv[], bootm_headers_t *images) { void (*loader)(bd_t *, image_header_t *, char *, char *); @@ -1325,7 +1325,7 @@ static int do_bootm_netbsd (int flag, int argc, char *argv[], #endif /* CONFIG_BOOTM_NETBSD*/ #ifdef CONFIG_LYNXKDI -static int do_bootm_lynxkdi (int flag, int argc, char *argv[], +static int do_bootm_lynxkdi (int flag, int argc, char * const argv[], bootm_headers_t *images) { image_header_t *hdr = &images->legacy_hdr_os_copy; @@ -1347,7 +1347,7 @@ static int do_bootm_lynxkdi (int flag, int argc, char *argv[], #endif /* CONFIG_LYNXKDI */ #ifdef CONFIG_BOOTM_RTEMS -static int do_bootm_rtems (int flag, int argc, char *argv[], +static int do_bootm_rtems (int flag, int argc, char * const argv[], bootm_headers_t *images) { void (*entry_point)(bd_t *); @@ -1380,7 +1380,7 @@ static int do_bootm_rtems (int flag, int argc, char *argv[], #endif /* CONFIG_BOOTM_RTEMS */ #if defined(CONFIG_CMD_ELF) -static int do_bootm_vxworks (int flag, int argc, char *argv[], +static int do_bootm_vxworks (int flag, int argc, char * const argv[], bootm_headers_t *images) { char str[80]; @@ -1402,7 +1402,7 @@ static int do_bootm_vxworks (int flag, int argc, char *argv[], return 1; } -static int do_bootm_qnxelf(int flag, int argc, char *argv[], +static int do_bootm_qnxelf(int flag, int argc, char * const argv[], bootm_headers_t *images) { char *local_args[2]; @@ -1428,7 +1428,7 @@ static int do_bootm_qnxelf(int flag, int argc, char *argv[], #endif #ifdef CONFIG_INTEGRITY -static int do_bootm_integrity (int flag, int argc, char *argv[], +static int do_bootm_integrity (int flag, int argc, char * const argv[], bootm_headers_t *images) { void (*entry_point)(void); diff --git a/common/cmd_cache.c b/common/cmd_cache.c index 1202258419..be87b5c2d7 100644 --- a/common/cmd_cache.c +++ b/common/cmd_cache.c @@ -29,7 +29,7 @@ static int on_off (const char *); -int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { switch (argc) { case 2: /* on / off */ @@ -55,7 +55,7 @@ int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -int do_dcache ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_dcache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { switch (argc) { case 2: /* on / off */ diff --git a/common/cmd_console.c b/common/cmd_console.c index 178fbfeaa8..d8cad6b917 100644 --- a/common/cmd_console.c +++ b/common/cmd_console.c @@ -29,7 +29,7 @@ #include extern void _do_coninfo (void); -int do_coninfo (cmd_tbl_t * cmd, int flag, int argc, char *argv[]) +int do_coninfo (cmd_tbl_t * cmd, int flag, int argc, char * const argv[]) { int l; struct list_head *list = stdio_get_list(); diff --git a/common/cmd_cplbinfo.c b/common/cmd_cplbinfo.c index 1a044d2901..fc6abffe6e 100644 --- a/common/cmd_cplbinfo.c +++ b/common/cmd_cplbinfo.c @@ -42,7 +42,7 @@ static void show_cplb_table(uint32_t *addr, uint32_t *data) /* * display current instruction and data cplb tables */ -int do_cplbinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_cplbinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { printf("%s CPLB table [%08x]:\n", "Instruction", *(uint32_t *)DMEM_CONTROL); show_cplb_table((uint32_t *)ICPLB_ADDR0, (uint32_t *)ICPLB_DATA0); diff --git a/common/cmd_cramfs.c b/common/cmd_cramfs.c index 55e2d36b51..ab10450a4c 100644 --- a/common/cmd_cramfs.c +++ b/common/cmd_cramfs.c @@ -98,7 +98,7 @@ extern int cramfs_info (struct part_info *info); * @param argv arguments list * @return 0 on success, 1 otherwise */ -int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename; int size; @@ -163,7 +163,7 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * @param argv arguments list * @return 0 on success, 1 otherwise */ -int do_cramfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_cramfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename = "/"; int ret; diff --git a/common/cmd_dataflash_mmc_mux.c b/common/cmd_dataflash_mmc_mux.c index 97e303e943..de4e676157 100644 --- a/common/cmd_dataflash_mmc_mux.c +++ b/common/cmd_dataflash_mmc_mux.c @@ -26,7 +26,7 @@ static int mmc_nspi (const char *); -int do_dataflash_mmc_mux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_dataflash_mmc_mux (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { switch (argc) { case 2: /* on / off */ diff --git a/common/cmd_date.c b/common/cmd_date.c index 3141a3968a..50b4240267 100644 --- a/common/cmd_date.c +++ b/common/cmd_date.c @@ -43,7 +43,7 @@ const char *weekdays[] = { int mk_date (char *, struct rtc_time *); -int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { struct rtc_time tm; int rcode = 0; diff --git a/common/cmd_dcr.c b/common/cmd_dcr.c index 4f23b8d591..45de8cd65a 100644 --- a/common/cmd_dcr.c +++ b/common/cmd_dcr.c @@ -36,7 +36,7 @@ unsigned long set_dcr (unsigned short, unsigned long); * Interpreter command to retrieve an AMCC PPC 4xx Device Control Register * ======================================================================= */ -int do_getdcr ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] ) +int do_getdcr ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] ) { unsigned short dcrn; /* Device Control Register Num */ unsigned long value; /* DCR's value */ @@ -63,7 +63,7 @@ int do_getdcr ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] ) * Interpreter command to set an AMCC PPC 4xx Device Control Register * ====================================================================== */ -int do_setdcr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_setdcr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { unsigned short dcrn; /* Device Control Register Num */ unsigned long value; @@ -110,7 +110,7 @@ int do_setdcr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) * Device Control Register inderect addressing. * ======================================================================= */ -int do_getidcr (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_getidcr (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned short adr_dcrn; /* Device Control Register Num for Address */ unsigned short dat_dcrn; /* Device Control Register Num for Data */ @@ -166,7 +166,7 @@ int do_getidcr (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * Device Control Register inderect addressing. * ======================================================================= */ -int do_setidcr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_setidcr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { unsigned short adr_dcrn; /* Device Control Register Num for Address */ unsigned short dat_dcrn; /* Device Control Register Num for Data */ diff --git a/common/cmd_df.c b/common/cmd_df.c index 7f957fed47..6a086663bf 100644 --- a/common/cmd_df.c +++ b/common/cmd_df.c @@ -6,7 +6,7 @@ #include #include -static int do_df(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_df(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { const char *cmd; diff --git a/common/cmd_diag.c b/common/cmd_diag.c index 0436c492f4..317ea6605f 100644 --- a/common/cmd_diag.c +++ b/common/cmd_diag.c @@ -28,7 +28,7 @@ #include #include -int do_diag (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_diag (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { unsigned int i; diff --git a/common/cmd_display.c b/common/cmd_display.c index 34223952ee..6c11aa6e3e 100644 --- a/common/cmd_display.c +++ b/common/cmd_display.c @@ -30,7 +30,7 @@ #define CWORD_CLEAR 0x80 #define CLEAR_DELAY (110 * 2) -int do_display (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_display (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; int pos; diff --git a/common/cmd_dtt.c b/common/cmd_dtt.c index 3cfd36ef73..3388e43ca0 100644 --- a/common/cmd_dtt.c +++ b/common/cmd_dtt.c @@ -28,7 +28,7 @@ #include #include -int do_dtt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_dtt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { int i; unsigned char sensors[] = CONFIG_DTT_SENSORS; diff --git a/common/cmd_echo.c b/common/cmd_echo.c index 3ec4d48563..43a6da5722 100644 --- a/common/cmd_echo.c +++ b/common/cmd_echo.c @@ -24,7 +24,7 @@ #include #include -int do_echo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_echo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; int putnl = 1; diff --git a/common/cmd_eeprom.c b/common/cmd_eeprom.c index 519b510c77..129162c015 100644 --- a/common/cmd_eeprom.c +++ b/common/cmd_eeprom.c @@ -60,7 +60,7 @@ extern int eeprom_write_enable (unsigned dev_addr, int state); /* ------------------------------------------------------------------------- */ #if defined(CONFIG_CMD_EEPROM) -int do_eeprom ( cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_eeprom ( cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { const char *const fmt = "\nEEPROM @0x%lX %s: addr %08lx off %04lx count %ld ... "; diff --git a/common/cmd_elf.c b/common/cmd_elf.c index 63f6fe7a1f..104d6e68b3 100644 --- a/common/cmd_elf.c +++ b/common/cmd_elf.c @@ -29,7 +29,8 @@ unsigned long load_elf_image (unsigned long addr); /* Allow ports to override the default behavior */ __attribute__((weak)) -unsigned long do_bootelf_exec (ulong (*entry)(int, char *[]), int argc, char *argv[]) +unsigned long do_bootelf_exec (ulong (*entry)(int, char * const[]), + int argc, char * const argv[]) { unsigned long ret; @@ -56,7 +57,7 @@ unsigned long do_bootelf_exec (ulong (*entry)(int, char *[]), int argc, char *ar /* ====================================================================== * Interpreter command to boot an arbitrary ELF image from memory. * ====================================================================== */ -int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned long addr; /* Address of the ELF image */ unsigned long rc; /* Return value from user code */ @@ -93,7 +94,7 @@ int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * be either an ELF image or a raw binary. Will attempt to setup the * bootline and other parameters correctly. * ====================================================================== */ -int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned long addr; /* Address of image */ unsigned long bootaddr; /* Address to put the bootline */ diff --git a/common/cmd_exit.c b/common/cmd_exit.c index ed876d8c9a..f3fc8f5e79 100644 --- a/common/cmd_exit.c +++ b/common/cmd_exit.c @@ -24,7 +24,7 @@ #include #include -int do_exit(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_exit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int r; diff --git a/common/cmd_ext2.c b/common/cmd_ext2.c index b7e4048d64..49021cdb86 100644 --- a/common/cmd_ext2.c +++ b/common/cmd_ext2.c @@ -56,7 +56,7 @@ #define PRINTF(fmt,args...) #endif -int do_ext2ls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ext2ls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename = "/"; int dev=0; @@ -123,7 +123,7 @@ U_BOOT_CMD( /****************************************************************************** * Ext2fs boot command intepreter. Derived from diskboot */ -int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename = NULL; char *ep; diff --git a/common/cmd_fat.c b/common/cmd_fat.c index f3089a296e..ede730804e 100644 --- a/common/cmd_fat.c +++ b/common/cmd_fat.c @@ -33,7 +33,7 @@ #include -int do_fat_fsload (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_fat_fsload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { long size; unsigned long offset; @@ -94,7 +94,7 @@ U_BOOT_CMD( " to address 'addr' from dos filesystem" ); -int do_fat_ls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_fat_ls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename = "/"; int ret; @@ -141,7 +141,7 @@ U_BOOT_CMD( " - list files from 'dev' on 'interface' in a 'directory'" ); -int do_fat_fsinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_fat_fsinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int dev=0; int part=1; @@ -227,7 +227,7 @@ int find_fat_partition (void) } int -do_fat_dump (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[]) +do_fat_dump (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char * const argv[]) { __u8 block[1024]; int ret; diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c index 4c16d19898..486d5d4844 100644 --- a/common/cmd_fdc.c +++ b/common/cmd_fdc.c @@ -713,7 +713,7 @@ int fdc_fdos_read (void *buffer, int len) /**************************************************************************** * main routine do_fdcboot */ -int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { FD_GEO_STRUCT *pFG = (FD_GEO_STRUCT *)floppy_type; FDC_COMMAND_STRUCT *pCMD = &cmd; diff --git a/common/cmd_fdos.c b/common/cmd_fdos.c index 3cc658624d..00f7e88e12 100644 --- a/common/cmd_fdos.c +++ b/common/cmd_fdos.c @@ -35,7 +35,7 @@ * do_fdosboot -- *----------------------------------------------------------------------------- */ -int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *name; char *ep; @@ -115,7 +115,7 @@ int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * do_fdosls -- *----------------------------------------------------------------------------- */ -int do_fdosls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_fdosls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *path = ""; int drive = CONFIG_SYS_FDC_DRIVE_NUMBER; diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c index 5df79ae3e1..cd4c6de6da 100644 --- a/common/cmd_fdt.c +++ b/common/cmd_fdt.c @@ -42,7 +42,7 @@ DECLARE_GLOBAL_DATA_PTR; static int fdt_valid(void); -static int fdt_parse_prop(char **newval, int count, char *data, int *len); +static int fdt_parse_prop(char *const*newval, int count, char *data, int *len); static int fdt_print(const char *pathp, char *prop, int depth); /* @@ -63,7 +63,7 @@ void set_working_fdt_addr(void *addr) /* * Flattened Device Tree command, see the help for parameter definitions. */ -int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { if (argc < 2) { cmd_usage(cmdtp); @@ -515,7 +515,7 @@ static int fdt_valid(void) * data: A bytestream to be placed in the property * len: The length of the resulting bytestream */ -static int fdt_parse_prop(char **newval, int count, char *data, int *len) +static int fdt_parse_prop(char * const *newval, int count, char *data, int *len) { char *cp; /* temporary char pointer */ char *newp; /* temporary newval char pointer */ diff --git a/common/cmd_flash.c b/common/cmd_flash.c index 6361c4ef9b..5d8fb7a836 100644 --- a/common/cmd_flash.c +++ b/common/cmd_flash.c @@ -287,7 +287,7 @@ flash_fill_sect_ranges (ulong addr_first, ulong addr_last, } #endif /* CONFIG_SYS_NO_FLASH */ -int do_flinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_flinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { #ifndef CONFIG_SYS_NO_FLASH ulong bank; @@ -319,7 +319,7 @@ int do_flinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { #ifndef CONFIG_SYS_NO_FLASH flash_info_t *info; @@ -461,7 +461,7 @@ int flash_sect_erase (ulong addr_first, ulong addr_last) } #endif /* CONFIG_SYS_NO_FLASH */ -int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { #ifndef CONFIG_SYS_NO_FLASH flash_info_t *info; diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c index 2e017b84d8..ddc7a05a5b 100644 --- a/common/cmd_fpga.c +++ b/common/cmd_fpga.c @@ -156,7 +156,7 @@ int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size) * If there is no data addr field, the fpgadata environment variable is used. * The info command requires no data address field. */ -int do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { int op, dev = FPGA_INVALID_DEVICE; size_t data_size = 0; diff --git a/common/cmd_help.c b/common/cmd_help.c index e860dfb57c..8c8178e41d 100644 --- a/common/cmd_help.c +++ b/common/cmd_help.c @@ -24,7 +24,7 @@ #include #include -int do_help(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_help(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { return _do_help(&__u_boot_cmd_start, &__u_boot_cmd_end - &__u_boot_cmd_start, diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index 8b9c2c9490..fb9d3b038f 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c @@ -178,7 +178,7 @@ static uint get_alen(char *arg) * i2c read {i2c_chip} {devaddr}{.0, .1, .2} {len} {memaddr} */ -static int do_i2c_read ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_i2c_read ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { u_char chip; uint devaddr, alen, length; @@ -226,7 +226,7 @@ static int do_i2c_read ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * Syntax: * i2c md {i2c_chip} {addr}{.0, .1, .2} {len} */ -static int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { u_char chip; uint addr, alen, length; @@ -324,7 +324,7 @@ static int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * Syntax: * i2c mw {i2c_chip} {addr}{.0, .1, .2} {data} [{count}] */ -static int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { uchar chip; ulong addr; @@ -388,7 +388,7 @@ static int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * Syntax: * i2c crc32 {i2c_chip} {addr}{.0, .1, .2} {count} */ -static int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { uchar chip; ulong addr; @@ -452,7 +452,7 @@ static int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) */ static int -mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[]) +mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[]) { uchar chip; ulong addr; @@ -575,7 +575,7 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[]) * Syntax: * i2c probe {addr}{.0, .1, .2} */ -static int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int j; #if defined(CONFIG_SYS_I2C_NOPROBES) @@ -619,7 +619,7 @@ static int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * {length} - Number of bytes to read * {delay} - A DECIMAL number and defaults to 1000 uSec */ -static int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { u_char chip; ulong alen; @@ -731,7 +731,7 @@ static void decode_bits (u_char const b, char const *str[], int const do_once) * Syntax: * i2c sdram {i2c_chip} */ -static int do_sdram (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_sdram (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { enum { unknown, EDO, SDRAM, DDR2 } type; @@ -1208,7 +1208,7 @@ static int do_sdram (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) #endif #if defined(CONFIG_I2C_MUX) -static int do_i2c_add_bus(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_i2c_add_bus(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { int ret=0; @@ -1239,7 +1239,7 @@ static int do_i2c_add_bus(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) #endif /* CONFIG_I2C_MUX */ #if defined(CONFIG_I2C_MULTI_BUS) -static int do_i2c_bus_num(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_i2c_bus_num(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { int bus_idx, ret=0; @@ -1257,7 +1257,7 @@ static int do_i2c_bus_num(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) } #endif /* CONFIG_I2C_MULTI_BUS */ -static int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { int speed, ret=0; @@ -1274,17 +1274,17 @@ static int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return ret; } -static int do_i2c_mm(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_i2c_mm(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { return mod_i2c_mem (cmdtp, 1, flag, argc, argv); } -static int do_i2c_nm(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_i2c_nm(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { return mod_i2c_mem (cmdtp, 0, flag, argc, argv); } -static int do_i2c_reset(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_i2c_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); return 0; @@ -1312,7 +1312,7 @@ static cmd_tbl_t cmd_i2c_sub[] = { U_BOOT_CMD_MKENT(speed, 1, 1, do_i2c_bus_speed, "", ""), }; -static int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { cmd_tbl_t *c; diff --git a/common/cmd_ide.c b/common/cmd_ide.c index 2e9f834978..d486697bb4 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -172,7 +172,7 @@ static void set_pcmcia_timing (int pmode); /* ------------------------------------------------------------------------- */ -int do_ide (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ide (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int rcode = 0; @@ -346,7 +346,7 @@ int do_ide (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } } -int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *boot_device = NULL; char *ep; diff --git a/common/cmd_immap.c b/common/cmd_immap.c index 37e60582f6..1f59c1e1d1 100644 --- a/common/cmd_immap.c +++ b/common/cmd_immap.c @@ -43,14 +43,14 @@ DECLARE_GLOBAL_DATA_PTR; static void -unimplemented ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +unimplemented ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { printf ("Sorry, but the '%s' command has not been implemented\n", cmdtp->name); } int -do_siuinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_siuinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; @@ -81,7 +81,7 @@ do_siuinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } int -do_memcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_memcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; @@ -133,7 +133,7 @@ do_memcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } int -do_sitinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_sitinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unimplemented (cmdtp, flag, argc, argv); return 0; @@ -141,7 +141,7 @@ do_sitinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #ifdef CONFIG_8260 int -do_icinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_icinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unimplemented (cmdtp, flag, argc, argv); return 0; @@ -149,7 +149,7 @@ do_icinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #endif int -do_carinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_carinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; @@ -233,7 +233,7 @@ static void binary (char *label, uint value, int nbits) #endif int -do_iopinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_iopinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; @@ -316,7 +316,7 @@ do_iopinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * use *uint and set the address based on cmd + port */ int -do_iopset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_iopset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { uint rcode = 0; iopin_t iopin; @@ -431,14 +431,14 @@ do_iopset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } int -do_dmainfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_dmainfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unimplemented (cmdtp, flag, argc, argv); return 0; } int -do_fccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_fccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unimplemented (cmdtp, flag, argc, argv); return 0; @@ -498,7 +498,7 @@ static void prbrg (int n, uint val) } int -do_brginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_brginfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; @@ -522,7 +522,7 @@ do_brginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } int -do_i2cinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_i2cinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; @@ -569,42 +569,42 @@ do_i2cinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } int -do_sccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_sccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unimplemented (cmdtp, flag, argc, argv); return 0; } int -do_smcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_smcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unimplemented (cmdtp, flag, argc, argv); return 0; } int -do_spiinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_spiinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unimplemented (cmdtp, flag, argc, argv); return 0; } int -do_muxinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_muxinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unimplemented (cmdtp, flag, argc, argv); return 0; } int -do_siinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_siinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unimplemented (cmdtp, flag, argc, argv); return 0; } int -do_mccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_mccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unimplemented (cmdtp, flag, argc, argv); return 0; diff --git a/common/cmd_irq.c b/common/cmd_irq.c index 2c7e6bbf0c..48883289fc 100644 --- a/common/cmd_irq.c +++ b/common/cmd_irq.c @@ -24,7 +24,7 @@ #include #include -int do_interrupts(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_interrupts(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc != 2) { @@ -49,7 +49,7 @@ U_BOOT_CMD( ); /* Implemented in $(CPU)/interrupts.c */ -int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); U_BOOT_CMD( irqinfo, 1, 1, do_irqinfo, diff --git a/common/cmd_itest.c b/common/cmd_itest.c index 58c5e7b3b5..e88d6e097c 100644 --- a/common/cmd_itest.c +++ b/common/cmd_itest.c @@ -160,7 +160,7 @@ int binary_test (char *op, char *arg1, char *arg2, int w) } /* command line interface to the shell test */ -int do_itest ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] ) +int do_itest ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] ) { int value, w; diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c index 6799ccaa0a..0e7a6b0f3b 100644 --- a/common/cmd_jffs2.c +++ b/common/cmd_jffs2.c @@ -485,7 +485,7 @@ static struct part_info* jffs2_part_info(struct mtd_device *dev, unsigned int pa * @param argv arguments list * @return 0 on success, 1 otherwise */ -int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *fsname; char *filename; @@ -549,7 +549,7 @@ int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * @param argv arguments list * @return 0 on success, 1 otherwise */ -int do_jffs2_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_jffs2_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename = "/"; int ret; @@ -587,7 +587,7 @@ int do_jffs2_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * @param argv arguments list * @return 0 on success, 1 otherwise */ -int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { struct part_info *part; char *fsname; diff --git a/common/cmd_license.c b/common/cmd_license.c index 85a4871de0..90fd57e25d 100644 --- a/common/cmd_license.c +++ b/common/cmd_license.c @@ -30,7 +30,7 @@ #include #include -int do_license(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_license(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *tok, *dst = malloc(LICENSE_MAX); unsigned long len = LICENSE_MAX; diff --git a/common/cmd_load.c b/common/cmd_load.c index d6bbb786da..52ed1fa70d 100644 --- a/common/cmd_load.c +++ b/common/cmd_load.c @@ -51,7 +51,7 @@ static int do_echo = 1; /* -------------------------------------------------------------------- */ #if defined(CONFIG_CMD_LOADS) -int do_load_serial (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_load_serial (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { long offset = 0; ulong addr; @@ -255,7 +255,7 @@ read_record (char *buf, ulong len) #if defined(CONFIG_CMD_SAVES) -int do_save_serial (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_save_serial (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong offset = 0; ulong size = 0; @@ -433,7 +433,7 @@ int his_pad_count; /* number of pad chars he needs */ char his_pad_char; /* pad chars he needs */ char his_quote; /* quote chars he'll use */ -int do_load_serial_bin (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_load_serial_bin (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong offset = 0; ulong addr; @@ -1091,7 +1091,7 @@ U_BOOT_CMD( /* -------------------------------------------------------------------- */ #if defined(CONFIG_CMD_HWFLOW) -int do_hwflow (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_hwflow (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { extern int hwflow_onoff(int); diff --git a/common/cmd_log.c b/common/cmd_log.c index 3653fe1a1e..49deddd7f9 100644 --- a/common/cmd_log.c +++ b/common/cmd_log.c @@ -193,7 +193,7 @@ void logbuff_log(char *msg) * Return: None * */ -int do_log (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_log (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *s; unsigned long i, start, size; diff --git a/common/cmd_mac.c b/common/cmd_mac.c index 20403da39d..1884c2aa8a 100644 --- a/common/cmd_mac.c +++ b/common/cmd_mac.c @@ -24,7 +24,7 @@ #include #include -extern int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); U_BOOT_CMD( mac, 3, 1, do_mac, diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 1839330760..bcea3992db 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -43,7 +43,7 @@ #define PRINTF(fmt,args...) #endif -static int mod_mem(cmd_tbl_t *, int, int, int, char *[]); +static int mod_mem(cmd_tbl_t *, int, int, int, char * const []); /* Display values from last command. * Memory modify remembered values are different from display memory. @@ -60,7 +60,7 @@ static ulong base_address = 0; * md{.b, .w, .l} {addr} {len} */ #define DISP_LINE_LEN 16 -int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr, length; #if defined(CONFIG_HAS_DATAFLASH) @@ -158,16 +158,16 @@ int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return (rc); } -int do_mem_mm ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mem_mm ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return mod_mem (cmdtp, 1, flag, argc, argv); } -int do_mem_nm ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mem_nm ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return mod_mem (cmdtp, 0, flag, argc, argv); } -int do_mem_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mem_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr, writeval, count; int size; @@ -211,7 +211,7 @@ int do_mem_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } #ifdef CONFIG_MX_CYCLIC -int do_mem_mdc ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mem_mdc ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; ulong count; @@ -240,7 +240,7 @@ int do_mem_mdc ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -int do_mem_mwc ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mem_mwc ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; ulong count; @@ -270,7 +270,7 @@ int do_mem_mwc ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } #endif /* CONFIG_MX_CYCLIC */ -int do_mem_cmp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mem_cmp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr1, addr2, count, ngood; int size; @@ -355,7 +355,7 @@ int do_mem_cmp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return rcode; } -int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr, dest, count; int size; @@ -463,7 +463,7 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -int do_mem_base (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mem_base (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc > 1) { /* Set new base address. @@ -476,7 +476,7 @@ int do_mem_base (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr, length, i, junk; int size; @@ -547,7 +547,7 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } #ifdef CONFIG_LOOPW -int do_mem_loopw (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mem_loopw (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr, length, i, data; int size; @@ -626,7 +626,7 @@ int do_mem_loopw (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * configured using CONFIG_SYS_ALT_MEMTEST. The complete test loops until * interrupted by ctrl-c or by a failure of one of the sub-tests. */ -int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { vu_long *addr, *start, *end; ulong val; @@ -984,7 +984,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * nm{.b, .w, .l} {addr} */ static int -mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[]) +mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[]) { ulong addr, i; int nbytes, size; @@ -1089,7 +1089,7 @@ mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[]) #ifndef CONFIG_CRC32_VERIFY -int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr, length; ulong crc; @@ -1120,7 +1120,7 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #else /* CONFIG_CRC32_VERIFY */ -int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr, length; ulong crc; @@ -1128,7 +1128,7 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ulong vcrc; int verify; int ac; - char **av; + char * const *av; if (argc < 3) { usage: @@ -1175,7 +1175,7 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #endif /* CONFIG_CRC32_VERIFY */ #ifdef CONFIG_CMD_MD5SUM -int do_md5sum(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_md5sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned long addr, len; unsigned int i; @@ -1200,7 +1200,7 @@ int do_md5sum(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #endif #ifdef CONFIG_CMD_SHA1 -int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned long addr, len; unsigned int i; @@ -1225,7 +1225,7 @@ int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #endif #ifdef CONFIG_CMD_UNZIP -int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned long src, dst; unsigned long src_len = ~0UL, dst_len = ~0UL; diff --git a/common/cmd_mfsl.c b/common/cmd_mfsl.c index b19ad0e638..eeef2cddab 100644 --- a/common/cmd_mfsl.c +++ b/common/cmd_mfsl.c @@ -31,7 +31,7 @@ #include #include -int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { unsigned int fslnum; unsigned int num; @@ -189,7 +189,7 @@ int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 0; } -int do_fwr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_fwr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { unsigned int fslnum; unsigned int num; @@ -348,7 +348,7 @@ int do_fwr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) } -int do_rspr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_rspr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { unsigned int reg = 0; unsigned int val = 0; diff --git a/common/cmd_mgdisk.c b/common/cmd_mgdisk.c index 3ba62f618c..c2d5217703 100644 --- a/common/cmd_mgdisk.c +++ b/common/cmd_mgdisk.c @@ -26,7 +26,7 @@ #include -int do_mg_disk_cmd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mg_disk_cmd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { u32 from, to, size; diff --git a/common/cmd_mii.c b/common/cmd_mii.c index 65e13c3eb2..1619a2583a 100644 --- a/common/cmd_mii.c +++ b/common/cmd_mii.c @@ -292,7 +292,7 @@ static void extract_range( } /* ---------------------------------------------------------------- */ -int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { char op[2]; unsigned char addrlo, addrhi, reglo, reghi; diff --git a/common/cmd_misc.c b/common/cmd_misc.c index b0ced2f3b8..8439da2f7d 100644 --- a/common/cmd_misc.c +++ b/common/cmd_misc.c @@ -27,7 +27,7 @@ #include #include -int do_sleep (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_sleep (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong start = get_timer(0); ulong delay; diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index c67c9cf728..698157f6b8 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -28,7 +28,7 @@ #ifndef CONFIG_GENERIC_MMC static int curr_device = -1; -int do_mmc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mmc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int dev; @@ -114,7 +114,7 @@ static void print_mmcinfo(struct mmc *mmc) printf("Bus Width: %d-bit\n", mmc->bus_width); } -int do_mmcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mmcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { struct mmc *mmc; int dev_num; @@ -140,7 +140,7 @@ U_BOOT_CMD(mmcinfo, 2, 0, do_mmcinfo, "" ); -int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int rc = 0; diff --git a/common/cmd_mp.c b/common/cmd_mp.c index d78c20951e..4d7b871528 100644 --- a/common/cmd_mp.c +++ b/common/cmd_mp.c @@ -24,7 +24,7 @@ #include int -cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned long cpuid; diff --git a/common/cmd_mtdparts.c b/common/cmd_mtdparts.c index 116e637d57..447486ba29 100644 --- a/common/cmd_mtdparts.c +++ b/common/cmd_mtdparts.c @@ -1713,7 +1713,7 @@ static struct part_info* mtd_part_info(struct mtd_device *dev, unsigned int part * @param argv arguments list * @return 0 on success, 1 otherwise */ -int do_chpart(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_chpart(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { /* command line only */ struct mtd_device *dev; @@ -1751,7 +1751,7 @@ int do_chpart(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * @param argv arguments list * @return 0 on success, 1 otherwise */ -int do_mtdparts(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_mtdparts(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc == 2) { if (strcmp(argv[1], "default") == 0) { diff --git a/common/cmd_nand.c b/common/cmd_nand.c index f611fd7717..ea80555ef8 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -90,7 +90,7 @@ static inline int str2long(char *p, ulong *num) } static int -arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, size_t *size) +arg_off_size(int argc, char * const argv[], nand_info_t *nand, ulong *off, size_t *size) { int idx = nand_curr_device; #if defined(CONFIG_CMD_MTDPARTS) @@ -204,7 +204,7 @@ static void nand_print_info(int idx) nand->name, nand->erasesize >> 10); } -int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { int i, dev, ret = 0; ulong addr, off; @@ -599,7 +599,7 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand, return 0; } -int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { char *boot_device = NULL; int idx; diff --git a/common/cmd_net.c b/common/cmd_net.c index b80a7ad8e3..3cdb07fdc7 100644 --- a/common/cmd_net.c +++ b/common/cmd_net.c @@ -28,11 +28,11 @@ #include #include -extern int do_bootm (cmd_tbl_t *, int, int, char *[]); +extern int do_bootm (cmd_tbl_t *, int, int, char * const []); -static int netboot_common (proto_t, cmd_tbl_t *, int , char *[]); +static int netboot_common (proto_t, cmd_tbl_t *, int , char * const []); -int do_bootp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_bootp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return netboot_common (BOOTP, cmdtp, argc, argv); } @@ -43,7 +43,7 @@ U_BOOT_CMD( "[loadAddress] [[hostIPaddr:]bootfilename]" ); -int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return netboot_common (TFTP, cmdtp, argc, argv); } @@ -54,7 +54,7 @@ U_BOOT_CMD( "[loadAddress] [[hostIPaddr:]bootfilename]" ); -int do_rarpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_rarpb (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return netboot_common (RARP, cmdtp, argc, argv); } @@ -66,7 +66,7 @@ U_BOOT_CMD( ); #if defined(CONFIG_CMD_DHCP) -int do_dhcp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_dhcp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return netboot_common(DHCP, cmdtp, argc, argv); } @@ -79,7 +79,7 @@ U_BOOT_CMD( #endif #if defined(CONFIG_CMD_NFS) -int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return netboot_common(NFS, cmdtp, argc, argv); } @@ -151,7 +151,7 @@ static void netboot_update_env (void) } static int -netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[]) +netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char * const argv[]) { char *s; char *end; @@ -230,7 +230,7 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[]) } #if defined(CONFIG_CMD_PING) -int do_ping (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ping (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc < 2) return -1; @@ -280,7 +280,7 @@ static void cdp_update_env(void) } -int do_cdp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_cdp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int r; @@ -302,7 +302,7 @@ U_BOOT_CMD( #endif #if defined(CONFIG_CMD_SNTP) -int do_sntp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_sntp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *toff; @@ -340,7 +340,7 @@ U_BOOT_CMD( #endif #if defined(CONFIG_CMD_DNS) -int do_dns(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_dns(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc == 1) { cmd_usage(cmdtp); diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index d2ef217603..13325bc836 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -139,7 +139,7 @@ static int printenv(char *name, int state) return i; } -int do_printenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_printenv (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; int rcode = 0; @@ -173,7 +173,7 @@ int do_printenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * This function will ONLY work with a in-RAM copy of the environment */ -int _do_setenv (int flag, int argc, char *argv[]) +int _do_setenv (int flag, int argc, char * const argv[]) { int i, len, oldval; int console = -1; @@ -390,7 +390,7 @@ int _do_setenv (int flag, int argc, char *argv[]) int setenv (char *varname, char *varvalue) { - char *argv[4] = { "setenv", varname, varvalue, NULL }; + char * const argv[4] = { "setenv", varname, varvalue, NULL }; if ((varvalue == NULL) || (varvalue[0] == '\0')) return _do_setenv (0, 2, argv); else @@ -400,12 +400,12 @@ int setenv (char *varname, char *varvalue) #ifdef CONFIG_HAS_UID void forceenv (char *varname, char *varvalue) { - char *argv[4] = { "forceenv", varname, varvalue, NULL }; + char * const argv[4] = { "forceenv", varname, varvalue, NULL }; _do_setenv (0xdeaf4add, 3, argv); } #endif -int do_setenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_setenv (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc < 2) { cmd_usage(cmdtp); @@ -420,7 +420,7 @@ int do_setenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) */ #if defined(CONFIG_CMD_ASKENV) -int do_askenv ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_askenv ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { extern char console_buffer[CONFIG_SYS_CBSIZE]; char message[CONFIG_SYS_CBSIZE]; @@ -497,7 +497,7 @@ int do_askenv ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * Interactively edit an environment variable */ #if defined(CONFIG_CMD_EDITENV) -int do_editenv(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_editenv(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char buffer[CONFIG_SYS_CBSIZE]; char *init_val; @@ -576,7 +576,7 @@ int getenv_r (char *name, char *buf, unsigned len) #if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_ENV_IS_NOWHERE) -int do_saveenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_saveenv (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { extern char * env_name_spec; @@ -660,7 +660,7 @@ U_BOOT_CMD( #endif #if defined(CONFIG_CMD_RUN) -int do_run (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +int do_run (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); U_BOOT_CMD( run, CONFIG_SYS_MAXARGS, 1, do_run, "run commands in an environment variable", diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c index 2646ae91d2..a3e46a338f 100644 --- a/common/cmd_onenand.c +++ b/common/cmd_onenand.c @@ -32,7 +32,7 @@ static inline int str2long(char *p, ulong *num) return (*p != '\0' && *endptr == '\0') ? 1 : 0; } -static int arg_off_size(int argc, char *argv[], ulong *off, size_t *size) +static int arg_off_size(int argc, char * const argv[], ulong *off, size_t *size) { if (argc >= 1) { if (!(str2long(argv[0], off))) { @@ -330,13 +330,13 @@ static int onenand_dump(struct mtd_info *mtd, ulong off, int only_oob) return 0; } -static int do_onenand_info(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_onenand_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { printf("%s\n", mtd->name); return 0; } -static int do_onenand_bad(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_onenand_bad(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong ofs; @@ -351,7 +351,7 @@ static int do_onenand_bad(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 0; } -static int do_onenand_read(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_onenand_read(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { char *s; int oob = 0; @@ -383,7 +383,7 @@ static int do_onenand_read(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return ret == 0 ? 0 : 1; } -static int do_onenand_write(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_onenand_write(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong addr, ofs; size_t len; @@ -409,7 +409,7 @@ static int do_onenand_write(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return ret == 0 ? 0 : 1; } -static int do_onenand_erase(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_onenand_erase(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong ofs; int ret = 0; @@ -445,7 +445,7 @@ static int do_onenand_erase(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return ret == 0 ? 0 : 1; } -static int do_onenand_test(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_onenand_test(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong ofs; int ret = 0; @@ -470,7 +470,7 @@ static int do_onenand_test(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return ret == 0 ? 0 : 1; } -static int do_onenand_dump(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_onenand_dump(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong ofs; int ret = 0; @@ -493,7 +493,7 @@ static int do_onenand_dump(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return ret == 0 ? 1 : 0; } -static int do_onenand_markbad(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_onenand_markbad(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { int ret = 0; ulong addr; @@ -537,7 +537,7 @@ static cmd_tbl_t cmd_onenand_sub[] = { U_BOOT_CMD_MKENT(markbad, CONFIG_SYS_MAXARGS, 0, do_onenand_markbad, "", ""), }; -static int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { cmd_tbl_t *c; diff --git a/common/cmd_otp.c b/common/cmd_otp.c index 30af5a31a8..a8c73b5a86 100644 --- a/common/cmd_otp.c +++ b/common/cmd_otp.c @@ -80,7 +80,7 @@ static void set_otp_timing(bool write) bfrom_OtpCommand(OTP_INIT, write ? timing : timing & ~(-1 << 15)); } -int do_otp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_otp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { uint32_t ret, base_flags; bool prompt_user, force_read; diff --git a/common/cmd_pci.c b/common/cmd_pci.c index 8a260df8bb..358ca60b81 100644 --- a/common/cmd_pci.c +++ b/common/cmd_pci.c @@ -471,7 +471,7 @@ pci_cfg_modify (pci_dev_t bdf, ulong addr, ulong size, ulong value, int incrflag * pci modify[.b, .w, .l] bus.device.function [addr] * pci write[.b, .w, .l] bus.device.function addr value */ -int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr = 0, value = 0, size = 0; pci_dev_t bdf = 0; diff --git a/common/cmd_pcmcia.c b/common/cmd_pcmcia.c index e576b0c597..70e52104f5 100644 --- a/common/cmd_pcmcia.c +++ b/common/cmd_pcmcia.c @@ -66,7 +66,7 @@ extern int pcmcia_on (void); extern int pcmcia_off (void); -int do_pinit (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_pinit (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int rcode = 0; diff --git a/common/cmd_portio.c b/common/cmd_portio.c index f8befee296..92d61d206f 100644 --- a/common/cmd_portio.c +++ b/common/cmd_portio.c @@ -37,7 +37,7 @@ static uint in_last_addr, in_last_size; static uint out_last_addr, out_last_size, out_last_value; -int do_portio_out (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_portio_out (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { uint addr = out_last_addr; uint size = out_last_size; @@ -97,7 +97,7 @@ U_BOOT_CMD( "[.b, .w, .l] port value\n - output to IO port" ); -int do_portio_in (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_portio_in (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { uint addr = in_last_addr; uint size = in_last_size; diff --git a/common/cmd_reginfo.c b/common/cmd_reginfo.c index 89fd9ec4e9..94b8d58698 100644 --- a/common/cmd_reginfo.c +++ b/common/cmd_reginfo.c @@ -35,7 +35,7 @@ extern void ppc4xx_reginfo(void); extern void mpc86xx_reginfo(void); #endif -int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { #if defined(CONFIG_8xx) volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; diff --git a/common/cmd_reiser.c b/common/cmd_reiser.c index 8ede782316..2133a1fa4f 100644 --- a/common/cmd_reiser.c +++ b/common/cmd_reiser.c @@ -47,7 +47,7 @@ #define PRINTF(fmt,args...) #endif -int do_reiserls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reiserls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename = "/"; int dev=0; @@ -110,7 +110,7 @@ U_BOOT_CMD( /****************************************************************************** * Reiserfs boot command intepreter. Derived from diskboot */ -int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename = NULL; char *ep; diff --git a/common/cmd_sata.c b/common/cmd_sata.c index 1693a7e312..7be58e57c6 100644 --- a/common/cmd_sata.c +++ b/common/cmd_sata.c @@ -62,7 +62,7 @@ block_dev_desc_t *sata_get_dev(int dev) return (dev < CONFIG_SYS_SATA_MAX_DEVICE) ? &sata_dev_desc[dev] : NULL; } -int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int rc = 0; diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c index f89492fe22..5b2df28dd2 100644 --- a/common/cmd_scsi.c +++ b/common/cmd_scsi.c @@ -202,7 +202,7 @@ block_dev_desc_t * scsi_get_dev(int dev) /****************************************************************************** * scsi boot command intepreter. Derived from diskboot */ -int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *boot_device = NULL; char *ep; @@ -342,7 +342,7 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /********************************************************************************* * scsi command intepreter */ -int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { switch (argc) { case 0: diff --git a/common/cmd_setexpr.c b/common/cmd_setexpr.c index da9e844a86..b3e489fbe3 100644 --- a/common/cmd_setexpr.c +++ b/common/cmd_setexpr.c @@ -50,7 +50,7 @@ static ulong get_arg(char *s, int w) } } -int do_setexpr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_setexpr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong a, b; char buf[16]; diff --git a/common/cmd_sf.c b/common/cmd_sf.c index d69ae6a1ba..4826e9f5ff 100644 --- a/common/cmd_sf.c +++ b/common/cmd_sf.c @@ -19,7 +19,7 @@ static struct spi_flash *flash; -static int do_spi_flash_probe(int argc, char *argv[]) +static int do_spi_flash_probe(int argc, char * const argv[]) { unsigned int bus = 0; unsigned int cs; @@ -75,7 +75,7 @@ usage: return 1; } -static int do_spi_flash_read_write(int argc, char *argv[]) +static int do_spi_flash_read_write(int argc, char * const argv[]) { unsigned long addr; unsigned long offset; @@ -122,7 +122,7 @@ usage: return 1; } -static int do_spi_flash_erase(int argc, char *argv[]) +static int do_spi_flash_erase(int argc, char * const argv[]) { unsigned long offset; unsigned long len; @@ -152,7 +152,7 @@ usage: return 1; } -static int do_spi_flash(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int do_spi_flash(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { const char *cmd; diff --git a/common/cmd_source.c b/common/cmd_source.c index 1424d3038c..16a627a3dd 100644 --- a/common/cmd_source.c +++ b/common/cmd_source.c @@ -199,7 +199,7 @@ source (ulong addr, const char *fit_uname) /**************************************************/ #if defined(CONFIG_CMD_SOURCE) int -do_source (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_source (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr; int rcode; diff --git a/common/cmd_spi.c b/common/cmd_spi.c index ab7aac780d..bafa217d03 100644 --- a/common/cmd_spi.c +++ b/common/cmd_spi.c @@ -63,7 +63,7 @@ static uchar din[MAX_SPI_BYTES]; * The command prints out the hexadecimal string received via SPI. */ -int do_spi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_spi (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { struct spi_slave *slave; char *cp = 0; diff --git a/common/cmd_spibootldr.c b/common/cmd_spibootldr.c index d29ed2bd85..68aa618320 100644 --- a/common/cmd_spibootldr.c +++ b/common/cmd_spibootldr.c @@ -15,7 +15,7 @@ #include #include -int do_spibootldr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_spibootldr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { s32 addr; diff --git a/common/cmd_strings.c b/common/cmd_strings.c index 3a0d8ff43a..bbbb6b4da9 100644 --- a/common/cmd_strings.c +++ b/common/cmd_strings.c @@ -12,7 +12,7 @@ static char *start_addr, *last_addr; -int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc == 1) { cmd_usage(cmdtp); diff --git a/common/cmd_terminal.c b/common/cmd_terminal.c index 60ec378b3c..7cc1a6c6a0 100644 --- a/common/cmd_terminal.c +++ b/common/cmd_terminal.c @@ -29,7 +29,7 @@ #include #include -int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char *argv[]) +int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char * const argv[]) { int last_tilde = 0; struct stdio_dev *dev = NULL; diff --git a/common/cmd_test.c b/common/cmd_test.c index d886f893c7..fcb5ef2f71 100644 --- a/common/cmd_test.c +++ b/common/cmd_test.c @@ -24,9 +24,9 @@ #include #include -int do_test(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_test(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { - char **ap; + char * const *ap; int left, adv, expr, last_expr, neg, last_cmp; /* args? */ @@ -150,7 +150,7 @@ U_BOOT_CMD( "[args..]" ); -int do_false(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_false(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return 1; } @@ -161,7 +161,7 @@ U_BOOT_CMD( NULL ); -int do_true(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_true(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return 0; } diff --git a/common/cmd_tsi148.c b/common/cmd_tsi148.c index f2097fddd9..1e83c886e5 100644 --- a/common/cmd_tsi148.c +++ b/common/cmd_tsi148.c @@ -402,7 +402,7 @@ int tsi148_vme_crg_window(unsigned int vmeAddr, int vam) /* * Tundra Tsi148 configuration */ -int do_tsi148(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_tsi148(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr1 = 0, addr2 = 0, size = 0, vam = 0, vdw = 0; char cmd = 'x'; diff --git a/common/cmd_ubi.c b/common/cmd_ubi.c index 2484b40491..2faf8d82ce 100644 --- a/common/cmd_ubi.c +++ b/common/cmd_ubi.c @@ -436,7 +436,7 @@ static int ubi_dev_scan(struct mtd_info *info, char *ubidev, return 0; } -static int do_ubi(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int do_ubi(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { size_t size = 0; ulong addr = 0; diff --git a/common/cmd_ubifs.c b/common/cmd_ubifs.c index ed0e9db2ac..9017041af4 100644 --- a/common/cmd_ubifs.c +++ b/common/cmd_ubifs.c @@ -42,7 +42,7 @@ int ubifs_mount(char *vol_name); int ubifs_ls(char *dir_name); int ubifs_load(char *filename, u32 addr, u32 size); -int do_ubifs_mount(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ubifs_mount(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *vol_name; int ret; @@ -68,7 +68,7 @@ int do_ubifs_mount(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -int do_ubifs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ubifs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename = "/"; int ret; @@ -89,7 +89,7 @@ int do_ubifs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return ret; } -int do_ubifs_load(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ubifs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename; char *endp; diff --git a/common/cmd_universe.c b/common/cmd_universe.c index 0a6d722a0e..a86a5746b0 100644 --- a/common/cmd_universe.c +++ b/common/cmd_universe.c @@ -317,7 +317,7 @@ int universe_vme_slave_window(unsigned int vmeAddr, unsigned int pciAddr, int si /* * Tundra Universe configuration */ -int do_universe(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_universe(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr1 = 0, addr2 = 0, size = 0, vam = 0, pms = 0, vdw = 0; char cmd = 'x'; diff --git a/common/cmd_usb.c b/common/cmd_usb.c index fcb5f763c0..73d74ac055 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -349,7 +349,7 @@ void usb_show_tree(struct usb_device *dev) * usb boot command intepreter. Derived from diskboot */ #ifdef CONFIG_USB_STORAGE -int do_usbboot(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_usbboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *boot_device = NULL; char *ep; @@ -506,7 +506,7 @@ int do_usbboot(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /****************************************************************************** * usb command intepreter */ -int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i; diff --git a/common/cmd_version.c b/common/cmd_version.c index 7f165c7b70..7d1b495c51 100644 --- a/common/cmd_version.c +++ b/common/cmd_version.c @@ -26,7 +26,7 @@ extern char version_string[]; -int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { printf("\n%s\n", version_string); diff --git a/common/cmd_vfd.c b/common/cmd_vfd.c index 9c5b0385b5..1429d31167 100644 --- a/common/cmd_vfd.c +++ b/common/cmd_vfd.c @@ -45,7 +45,7 @@ extern int transfer_pic(unsigned char, unsigned char *, int, int); int trab_vfd (ulong bitmap); -int do_vfd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_vfd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong bitmap; diff --git a/common/cmd_ximg.c b/common/cmd_ximg.c index 75499b4b84..8a2cf835d8 100644 --- a/common/cmd_ximg.c +++ b/common/cmd_ximg.c @@ -43,7 +43,7 @@ #endif int -do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { ulong addr = load_addr; ulong dest = 0; diff --git a/common/cmd_yaffs2.c b/common/cmd_yaffs2.c index d448d04831..7c01ea2a25 100644 --- a/common/cmd_yaffs2.c +++ b/common/cmd_yaffs2.c @@ -24,7 +24,7 @@ extern void cmd_yaffs_mv(const char *oldPath, const char *newPath); extern int yaffs_DumpDevStruct(const char *path); -int do_ymount (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ymount (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *mtpoint = argv[1]; cmd_yaffs_mount(mtpoint); @@ -32,7 +32,7 @@ int do_ymount (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return(0); } -int do_yumount (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_yumount (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *mtpoint = argv[1]; cmd_yaffs_umount(mtpoint); @@ -40,7 +40,7 @@ int do_yumount (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return(0); } -int do_yls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_yls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *dirname = argv[argc-1]; @@ -49,7 +49,7 @@ int do_yls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return(0); } -int do_yrd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_yrd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename = argv[1]; printf ("Reading file %s ", filename); @@ -60,7 +60,7 @@ int do_yrd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return(0); } -int do_ywr (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ywr (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename = argv[1]; ulong value = simple_strtoul(argv[2], NULL, 16); @@ -74,7 +74,7 @@ int do_ywr (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return(0); } -int do_yrdm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_yrdm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename = argv[1]; ulong addr = simple_strtoul(argv[2], NULL, 16); @@ -84,7 +84,7 @@ int do_yrdm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return(0); } -int do_ywrm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ywrm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *filename = argv[1]; ulong addr = simple_strtoul(argv[2], NULL, 16); @@ -95,7 +95,7 @@ int do_ywrm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return(0); } -int do_ymkdir (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ymkdir (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *dirname = argv[1]; @@ -104,7 +104,7 @@ int do_ymkdir (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return(0); } -int do_yrmdir (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_yrmdir (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *dirname = argv[1]; @@ -113,7 +113,7 @@ int do_yrmdir (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return(0); } -int do_yrm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_yrm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *path = argv[1]; @@ -122,7 +122,7 @@ int do_yrm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return(0); } -int do_ymv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ymv (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *oldPath = argv[1]; char *newPath = argv[2]; @@ -132,7 +132,7 @@ int do_ymv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return(0); } -int do_ydump (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ydump (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *dirname = argv[1]; if (yaffs_DumpDevStruct(dirname) != 0) diff --git a/common/command.c b/common/command.c index 67ad692004..a1fc592c24 100644 --- a/common/command.c +++ b/common/command.c @@ -34,7 +34,7 @@ */ int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, int - flag, int argc, char *argv[]) + flag, int argc, char * const argv[]) { int i; int rcode = 0; @@ -158,7 +158,7 @@ int cmd_usage(cmd_tbl_t *cmdtp) #ifdef CONFIG_AUTO_COMPLETE -int var_complete(int argc, char *argv[], char last_char, int maxv, char *cmdv[]) +int var_complete(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]) { static char tmp_buf[512]; int space; @@ -175,7 +175,7 @@ int var_complete(int argc, char *argv[], char last_char, int maxv, char *cmdv[]) } static void install_auto_complete_handler(const char *cmd, - int (*complete)(int argc, char *argv[], char last_char, int maxv, char *cmdv[])) + int (*complete)(int argc, char * const argv[], char last_char, int maxv, char *cmdv[])) { cmd_tbl_t *cmdtp; @@ -200,7 +200,7 @@ void install_auto_complete(void) /*************************************************************************************/ -static int complete_cmdv(int argc, char *argv[], char last_char, int maxv, char *cmdv[]) +static int complete_cmdv(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]) { cmd_tbl_t *cmdtp; const char *p; @@ -301,7 +301,7 @@ static int make_argv(char *s, int argvsz, char *argv[]) return argc; } -static void print_argv(const char *banner, const char *leader, const char *sep, int linemax, char *argv[]) +static void print_argv(const char *banner, const char *leader, const char *sep, int linemax, char * const argv[]) { int ll = leader != NULL ? strlen(leader) : 0; int sl = sep != NULL ? strlen(sep) : 0; @@ -328,7 +328,7 @@ static void print_argv(const char *banner, const char *leader, const char *sep, printf("\n"); } -static int find_common_prefix(char *argv[]) +static int find_common_prefix(char * const argv[]) { int i, len; char *anchor, *s, *t; diff --git a/common/hush.c b/common/hush.c index 9eea90f428..8a74d225e9 100644 --- a/common/hush.c +++ b/common/hush.c @@ -94,7 +94,7 @@ #include #include /* find_cmd */ /*cmd_boot.c*/ -extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); /* do_bootd */ +extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* do_bootd */ #endif #ifndef __U_BOOT__ #include /* isalpha, isdigit */ @@ -1024,7 +1024,7 @@ static void get_user_input(struct in_str *i) #ifdef CONFIG_BOOT_RETRY_TIME # ifdef CONFIG_RESET_TO_RETRY - extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); + extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); # else # error "This currently only works with CONFIG_RESET_TO_RETRY enabled" # endif @@ -1681,7 +1681,7 @@ static int run_pipe_real(struct pipe *pi) } else { int rcode; #if defined(CONFIG_CMD_BOOTD) - extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); + extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* avoid "bootd" recursion */ if (cmdtp->cmd == do_bootd) { @@ -3351,7 +3351,7 @@ static void setup_job_control(void) tcsetpgrp(shell_terminal, shell_pgrp); } -int hush_main(int argc, char **argv) +int hush_main(int argc, char * const *argv) { int opt; FILE *input; @@ -3588,7 +3588,7 @@ static char * make_string(char ** inp) } #ifdef __U_BOOT__ -int do_showvar (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_showvar (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i, k; int rcode = 0; diff --git a/common/image.c b/common/image.c index 2b6007e9c6..6d8833e814 100644 --- a/common/image.c +++ b/common/image.c @@ -60,7 +60,7 @@ static int fit_check_ramdisk (const void *fit, int os_noffset, #endif #ifdef CONFIG_CMD_BDI -extern int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); #endif DECLARE_GLOBAL_DATA_PTR; @@ -756,7 +756,7 @@ int genimg_has_config (bootm_headers_t *images) * 1, if ramdisk image is found but corrupted, or invalid * rd_start and rd_end are set to 0 if no ramdisk exists */ -int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images, +int boot_get_ramdisk (int argc, char * const argv[], bootm_headers_t *images, uint8_t arch, ulong *rd_start, ulong *rd_end) { ulong rd_addr, rd_load; @@ -1279,7 +1279,7 @@ error: * 1, if fdt image is found but corrupted * of_flat_tree and of_size are set to 0 if no fdt exists */ -int boot_get_fdt (int flag, int argc, char *argv[], bootm_headers_t *images, +int boot_get_fdt (int flag, int argc, char * const argv[], bootm_headers_t *images, char **of_flat_tree, ulong *of_size) { const image_header_t *fdt_hdr; diff --git a/common/kgdb.c b/common/kgdb.c index 9e3b64c379..8a621ad1fc 100644 --- a/common/kgdb.c +++ b/common/kgdb.c @@ -584,7 +584,7 @@ breakpoint(void) } int -do_kgdb(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_kgdb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { printf("Entering KGDB mode via exception handler...\n\n"); kgdb_breakpoint(argc - 1, argv + 1); diff --git a/common/lcd.c b/common/lcd.c index 64fb1c6408..93ddedf01e 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -78,7 +78,7 @@ static inline void lcd_putc_xy (ushort x, ushort y, uchar c); static int lcd_init (void *lcdbase); -static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]); +static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]); static void *lcd_logo (void); static int lcd_getbgcolor (void); @@ -350,7 +350,7 @@ int drv_lcd_init (void) } /*----------------------------------------------------------------------*/ -static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { #if LCD_BPP == LCD_MONOCHROME /* Setting the palette */ diff --git a/common/main.c b/common/main.c index 3760ba3d6b..20090ee6aa 100644 --- a/common/main.c +++ b/common/main.c @@ -51,10 +51,10 @@ void inline __show_boot_progress (int val) {} void show_boot_progress (int val) __attribute__((weak, alias("__show_boot_progress"))); #if defined(CONFIG_BOOT_RETRY_TIME) && defined(CONFIG_RESET_TO_RETRY) -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); /* for do_reset() prototype */ +extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* for do_reset() prototype */ #endif -extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); #if defined(CONFIG_UPDATE_TFTP) void update_tftp (void); @@ -1414,7 +1414,7 @@ int run_command (const char *cmd, int flag) /****************************************************************************/ #if defined(CONFIG_CMD_RUN) -int do_run (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int do_run (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { int i; diff --git a/doc/README.standalone b/doc/README.standalone index 6381087493..6e6b65fe77 100644 --- a/doc/README.standalone +++ b/doc/README.standalone @@ -40,7 +40,7 @@ Design Notes on Exporting U-Boot Functions to Standalone Applications: that returns the ABI version of the running U-Boot. I.e., a typical application startup may look like this: - int my_app (int argc, char *argv[]) + int my_app (int argc, char * const argv[]) { app_startup (argv); if (get_version () != XF_VERSION) diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index e8273ee363..d1065f4f8e 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c @@ -150,7 +150,7 @@ cmd_tbl_t cmd_pca953x[] = { #endif }; -int do_pca953x(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_pca953x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { static uint8_t chip = CONFIG_SYS_I2C_PCA953X_ADDR; int val; diff --git a/drivers/misc/ds4510.c b/drivers/misc/ds4510.c index f2510a38fd..5b33c1ffce 100644 --- a/drivers/misc/ds4510.c +++ b/drivers/misc/ds4510.c @@ -273,7 +273,7 @@ cmd_tbl_t cmd_ds4510[] = { #endif }; -int do_ds4510(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_ds4510(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { static uint8_t chip = CONFIG_SYS_I2C_DS4510_ADDR; cmd_tbl_t *c; diff --git a/drivers/misc/fsl_pmic.c b/drivers/misc/fsl_pmic.c index 87f0aedeb6..274327f470 100644 --- a/drivers/misc/fsl_pmic.c +++ b/drivers/misc/fsl_pmic.c @@ -156,7 +156,7 @@ static void pmic_dump(int numregs) puts("\n"); } -int do_pmic(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +int do_pmic(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *cmd; int nregs; diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c index 8882c4f627..63cc68e307 100644 --- a/drivers/qe/qe.c +++ b/drivers/qe/qe.c @@ -436,7 +436,7 @@ struct qe_firmware_info *qe_get_firmware_info(void) return qe_firmware_uploaded ? &qe_firmware_info : NULL; } -static int qe_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +static int qe_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr; diff --git a/examples/api/demo.c b/examples/api/demo.c index df9c4bd8bc..65e7491847 100644 --- a/examples/api/demo.c +++ b/examples/api/demo.c @@ -41,7 +41,7 @@ void test_dump_sig(struct api_signature *); static char buf[BUF_SZ]; -int main(int argc, char *argv[]) +int main(int argc, char * const argv[]) { int rv = 0, h, i, j, devs_no; struct api_signature *sig = NULL; diff --git a/examples/standalone/82559_eeprom.c b/examples/standalone/82559_eeprom.c index 5e2eee9e98..8dd7079ae7 100644 --- a/examples/standalone/82559_eeprom.c +++ b/examples/standalone/82559_eeprom.c @@ -305,7 +305,7 @@ write_config_word(int bus, int dev, int func, int reg, u16 data) } -int main (int argc, char *argv[]) +int main (int argc, char * const argv[]) { unsigned char *eth_addr; uchar buf[6]; diff --git a/examples/standalone/atmel_df_pow2.c b/examples/standalone/atmel_df_pow2.c index db0cd693a9..b5b450317d 100644 --- a/examples/standalone/atmel_df_pow2.c +++ b/examples/standalone/atmel_df_pow2.c @@ -114,7 +114,7 @@ static char *getline(void) } } -int atmel_df_pow2(int argc, char *argv[]) +int atmel_df_pow2(int argc, char * const argv[]) { /* Print the ABI version */ app_startup(argv); diff --git a/examples/standalone/eepro100_eeprom.c b/examples/standalone/eepro100_eeprom.c index 771a7e887e..3c7f380977 100644 --- a/examples/standalone/eepro100_eeprom.c +++ b/examples/standalone/eepro100_eeprom.c @@ -25,7 +25,7 @@ static int reset_eeprom(unsigned long ioaddr, unsigned char *hwaddr); -int eepro100_eeprom(int argc, char *argv[]) +int eepro100_eeprom(int argc, char * const argv[]) { int ret = 0; diff --git a/examples/standalone/hello_world.c b/examples/standalone/hello_world.c index 9317f6d8c0..067c39046d 100644 --- a/examples/standalone/hello_world.c +++ b/examples/standalone/hello_world.c @@ -24,7 +24,7 @@ #include #include -int hello_world (int argc, char *argv[]) +int hello_world (int argc, char * const argv[]) { int i; diff --git a/examples/standalone/interrupt.c b/examples/standalone/interrupt.c index f3061d1ec0..a5b58a1a08 100644 --- a/examples/standalone/interrupt.c +++ b/examples/standalone/interrupt.c @@ -44,7 +44,7 @@ static void irq_handler (void *arg); -int interrupt (int argc, char *argv[]) +int interrupt (int argc, char * const argv[]) { int c, irq = -1; diff --git a/examples/standalone/mem_to_mem_idma2intr.c b/examples/standalone/mem_to_mem_idma2intr.c index f35f1ba5f6..d0a75eadfd 100644 --- a/examples/standalone/mem_to_mem_idma2intr.c +++ b/examples/standalone/mem_to_mem_idma2intr.c @@ -204,9 +204,9 @@ int memcmp(const void * cs,const void * ct,size_t count) #endif /* STANDALONE */ #ifdef STANDALONE -int mem_to_mem_idma2intr (int argc, char *argv[]) +int mem_to_mem_idma2intr (int argc, char * const argv[]) #else -int do_idma (bd_t * bd, int argc, char *argv[]) +int do_idma (bd_t * bd, int argc, char * const argv[]) #endif /* STANDALONE */ { int i; diff --git a/examples/standalone/smc91111_eeprom.c b/examples/standalone/smc91111_eeprom.c index b91f34c3af..c98b0fc075 100644 --- a/examples/standalone/smc91111_eeprom.c +++ b/examples/standalone/smc91111_eeprom.c @@ -48,7 +48,7 @@ void print_MAC (struct eth_device *dev); int read_eeprom_reg (struct eth_device *dev, int reg); void print_macaddr (struct eth_device *dev); -int smc91111_eeprom (int argc, char *argv[]) +int smc91111_eeprom (int argc, char * const argv[]) { int c, i, j, done, line, reg, value, start, what; char input[50]; diff --git a/examples/standalone/smc911x_eeprom.c b/examples/standalone/smc911x_eeprom.c index 104047f5a5..c51a05028a 100644 --- a/examples/standalone/smc911x_eeprom.c +++ b/examples/standalone/smc911x_eeprom.c @@ -313,7 +313,7 @@ static char *getline(void) /** * smc911x_eeprom - our application's main() function */ -int smc911x_eeprom(int argc, char *argv[]) +int smc911x_eeprom(int argc, char * const argv[]) { /* Avoid initializing on stack as gcc likes to call memset() */ struct eth_device dev; diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c index f3e1ab5c6a..2d2e7098b7 100644 --- a/examples/standalone/stubs.c +++ b/examples/standalone/stubs.c @@ -189,7 +189,7 @@ void __attribute__((unused)) dummy(void) extern unsigned long __bss_start, _end; -void app_startup(char **argv) +void app_startup(char * const *argv) { unsigned char * cp = (unsigned char *) &__bss_start; diff --git a/examples/standalone/test_burst.c b/examples/standalone/test_burst.c index 7109c098ef..2b101b74e6 100644 --- a/examples/standalone/test_burst.c +++ b/examples/standalone/test_burst.c @@ -85,7 +85,7 @@ static unsigned long test_pattern [] = { }; -int test_burst (int argc, char *argv[]) +int test_burst (int argc, char * const argv[]) { unsigned long size = CACHE_LINE_SIZE; unsigned int pass = 0; diff --git a/examples/standalone/timer.c b/examples/standalone/timer.c index 6628b21de9..834cc9a49e 100644 --- a/examples/standalone/timer.c +++ b/examples/standalone/timer.c @@ -115,7 +115,7 @@ void setPeriod (tid_8xx_cpmtimer_t *hwp, ulong interval); static char *usage = "\n[q, b, e, ?] "; -int timer (int argc, char *argv[]) +int timer (int argc, char * const argv[]) { cpmtimer8xx_t *cpmtimerp; /* Pointer to the CPM Timer structure */ tid_8xx_cpmtimer_t hw; diff --git a/include/bedbug/type.h b/include/bedbug/type.h index 38ee9ded73..b7b447b1fe 100644 --- a/include/bedbug/type.h +++ b/include/bedbug/type.h @@ -15,7 +15,7 @@ typedef struct { int current_bp; struct pt_regs *regs; - void (*do_break) (cmd_tbl_t *, int, int, char *[]); + void (*do_break) (cmd_tbl_t *, int, int, char * const []); void (*break_isr) (struct pt_regs *); int (*find_empty) (void); int (*set) (int, unsigned long); diff --git a/include/command.h b/include/command.h index 55caa6eaf8..9144d69206 100644 --- a/include/command.h +++ b/include/command.h @@ -48,14 +48,14 @@ struct cmd_tbl_s { int maxargs; /* maximum number of arguments */ int repeatable; /* autorepeat allowed? */ /* Implementation function */ - int (*cmd)(struct cmd_tbl_s *, int, int, char *[]); + int (*cmd)(struct cmd_tbl_s *, int, int, char * const []); char *usage; /* Usage message (short) */ #ifdef CONFIG_SYS_LONGHELP char *help; /* Help message (long) */ #endif #ifdef CONFIG_AUTO_COMPLETE /* do auto completion on the arguments */ - int (*complete)(int argc, char *argv[], char last_char, int maxv, char *cmdv[]); + int (*complete)(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]); #endif }; @@ -67,7 +67,7 @@ extern cmd_tbl_t __u_boot_cmd_end; /* common/command.c */ int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, int - flag, int argc, char *argv[]); + flag, int argc, char * const argv[]); cmd_tbl_t *find_cmd(const char *cmd); cmd_tbl_t *find_cmd_tbl (const char *cmd, cmd_tbl_t *table, int table_len); @@ -83,7 +83,7 @@ extern int cmd_auto_complete(const char *const prompt, char *buf, int *np, int * * * All commands use a common argument format: * - * void function (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); + * void function (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); */ typedef void command_t (cmd_tbl_t *, int, int, char *[]); diff --git a/include/common.h b/include/common.h index 48f6a1a074..eddec22752 100644 --- a/include/common.h +++ b/include/common.h @@ -718,7 +718,7 @@ void show_boot_progress(int val); int cpu_status(int nr); int cpu_reset(int nr); int cpu_disable(int nr); -int cpu_release(int nr, int argc, char *argv[]); +int cpu_release(int nr, int argc, char * const argv[]); #endif #endif /* __ASSEMBLY__ */ diff --git a/include/exports.h b/include/exports.h index 9588bc94e4..1d79a3162c 100644 --- a/include/exports.h +++ b/include/exports.h @@ -35,7 +35,7 @@ int i2c_read (uchar, uint, int , uchar* , int); #endif #include -void app_startup(char **); +void app_startup(char * const *); #endif /* ifndef __ASSEMBLY__ */ diff --git a/include/image.h b/include/image.h index 366b622ccf..bcc08d1a73 100644 --- a/include/image.h +++ b/include/image.h @@ -328,12 +328,12 @@ int genimg_get_format (void *img_addr); int genimg_has_config (bootm_headers_t *images); ulong genimg_get_image (ulong img_addr); -int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images, +int boot_get_ramdisk (int argc, char * const argv[], bootm_headers_t *images, uint8_t arch, ulong *rd_start, ulong *rd_end); #ifdef CONFIG_OF_LIBFDT -int boot_get_fdt (int flag, int argc, char *argv[], bootm_headers_t *images, +int boot_get_fdt (int flag, int argc, char * const argv[], bootm_headers_t *images, char **of_flat_tree, ulong *of_size); int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base, char **of_flat_tree, ulong *of_size); diff --git a/include/kgdb.h b/include/kgdb.h index f543cd6e18..b6ba742ad3 100644 --- a/include/kgdb.h +++ b/include/kgdb.h @@ -55,7 +55,7 @@ extern int kgdb_getregs(struct pt_regs *, char *, int); extern void kgdb_putreg(struct pt_regs *, int, char *, int); extern void kgdb_putregs(struct pt_regs *, char *, int); extern int kgdb_trap(struct pt_regs *); -extern void kgdb_breakpoint(int argc, char *argv[]); +extern void kgdb_breakpoint(int argc, char * const argv[]); /* these functions are provided by the platform serial driver */ extern void kgdb_serial_init(void); diff --git a/include/vxworks.h b/include/vxworks.h index 1633904bd8..917a9ff856 100644 --- a/include/vxworks.h +++ b/include/vxworks.h @@ -24,7 +24,7 @@ #ifndef _VXWORKS_H_ #define _VXWORKS_H_ -int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* * Use bootaddr to find the location in memory that VxWorks diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 8c58a93662..aa214dd06f 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -18,7 +18,7 @@ #if !defined (CONFIG_PANIC_HANG) #include /*cmd_boot.c*/ -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); #endif #include