diff options
author | Wolfgang Denk <wd@denx.de> | 2010-06-28 22:00:46 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-07-04 23:55:42 +0200 |
commit | 54841ab50c20d6fa6c9cc3eb826989da3a22d934 (patch) | |
tree | 400f22f0a12ff0ae6c472bed6ac648befc1744a2 /board | |
parent | b218ccb5435e64ac2318bb8b6c9594ef1cc724cd (diff) | |
download | u-boot-imx-54841ab50c20d6fa6c9cc3eb826989da3a22d934.zip u-boot-imx-54841ab50c20d6fa6c9cc3eb826989da3a22d934.tar.gz u-boot-imx-54841ab50c20d6fa6c9cc3eb826989da3a22d934.tar.bz2 |
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 <wd@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'board')
108 files changed, 275 insertions, 275 deletions
diff --git a/board/BuS/EB+MCF-EV123/EB+MCF-EV123.c b/board/BuS/EB+MCF-EV123/EB+MCF-EV123.c index 2fc3eaf..1f76dd9 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 1f22275..bbceaf3 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 c427f9e..86f86e2 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 4e12e9a..c0368c0 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 9bae67e..3c0dc5f 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 c3dc983..595dee3 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 be381d6..1682cf7 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 f9c31b3..b87eac4 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 d432cc3..6a049df 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 a9a80e5..587fe74 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 aab3a65..3f063a0 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 ed6daa3..cde13e4 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 cadfe0b..c8dd99e 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 * </pre> */ -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 28e2bbc..55451b1 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 c5fe8c4..b8d968b 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 271ffb1..a9e4902 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 317f088..7d8f3ea 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 dcf641b..7e0babe 100644 --- a/board/cm-bf527/gpio.c +++ b/board/cm-bf527/gpio.c @@ -11,7 +11,7 @@ #include <asm/blackfin.h> -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 25aeed2..a4c1ec0 100644 --- a/board/cm-bf537e/flash.c +++ b/board/cm-bf537e/flash.c @@ -11,7 +11,7 @@ #include <asm/blackfin.h> #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 ebe17b6..52abe79 100644 --- a/board/cm-bf537u/flash.c +++ b/board/cm-bf537u/flash.c @@ -11,7 +11,7 @@ #include <asm/blackfin.h> #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 cd98ae2..df372d9 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 5a27191..c1a4a19 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 a294213..68c39d2 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 ecea5b3..621980d 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 1f78f8d..f5c9777 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 e73c712..cb9ab86 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 72c0907..b58c1eb 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 a632cb4..21b2432 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 0615959..03c4098 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 5a3f61d..bfec548 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 391fbf4..20346e1 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 c4a49e2..4dfea71 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 eecae0a..87da27d 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 5c50b4c..9109b64 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 414e821..9823e5e 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 6d9814f..00456a7 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 24db883..51d3355 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 36fcf7f..abac217 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 a199d46..f9f7c7f 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 5347958..615e32a 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 ee90e2c..dcea50e 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 675e507..aa74376 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 f475d11..aa7ee92 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 111cce5..ba3c97c 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 4251d51..ca7868c 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 5f3254d..b59689b 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 1d14611..2fc9fda 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 5364857..b0d7663 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 4e64e83..83dbfcb 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 0f7fa69..3a8a4cf 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 3725ece..b84e08a 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 <environment.h> 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 476e940..200d7ee 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 <environment.h> 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 bd9fb2f..270caac 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 bda4117..ca8357d 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 a5600de..6ed493e 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 01966ee..704cd02 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 cab4fca..aa15fa0 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 bb6794e..a135fbe 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 119eaf9..a35b5cf 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 661015e..5a8f4f5 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 b1ccbeb..ac1937b 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 a7b7f45..0b7f787 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 8c4abdd..889ba3f 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 03cd6b8..8b15e51 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 262070f..5dd0311 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 0a75abd..637bb5a 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 53cf474..3a33b5a 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 8e27778..61a1e14 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 be1a1df..0e26b89 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 415e036..3948c13 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 6587f13..b5a5521 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 32bf244..a3722b2 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 cd93a7c..8ddb54d 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 740881e..aba11d5 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 6bbae89..554c8d1 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 0ee9595..0d5f46e 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 0eef41a..a162649 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 aca4458..aa375a4 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 6ee44d6..199def4 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 a6885d6..d7adff2 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 8fe5ac8..29a095d 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 43295d6..7329435 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 944cd4d..0cad897 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 69f8f9b..3f2deed 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 05e30ec..a54a95d 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 703af73..b5315ad 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 634efb4..dae01ec 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 <mac address> - 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 e803b3c..44247c8 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 9948d04..cad3905 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 49d8bba..8edca59 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 d286714..68acdd8 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 92b15aa..6457f9b 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 0c8e6df..76d8293 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 4b45902..5660c09 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 827578c..14d75ea 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 e356912..d99036b 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 52c5bd8..14055c6 100644 --- a/board/tcm-bf537/flash.c +++ b/board/tcm-bf537/flash.c @@ -11,7 +11,7 @@ #include <asm/blackfin.h> #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 e309beb..0db7050 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 578e716..79c1b98 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 92f74a3..96ec078 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 472d7d8..6d23470 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 71fd22c..12fe120 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 2df9a04..268162e 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 b6b16bf..fede2e0 100644 --- a/board/trizepsiv/eeprom.c +++ b/board/trizepsiv/eeprom.c @@ -25,7 +25,7 @@ #include <command.h> #include <dm9000.h> -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 f7e0ba5..aa6baca 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 013fc79..44d40ee 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 c8487e5..6119627 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 01273a1..e295151 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; |