mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
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>
This commit is contained in:
parent
b218ccb543
commit
54841ab50c
295 changed files with 671 additions and 670 deletions
|
@ -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[]);
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include <common.h>
|
||||
|
||||
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");
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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[])
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <asm/zimage.h>
|
||||
|
||||
/*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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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 ();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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[])
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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) || \
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 ();
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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\
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue