#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[]);
/*****************************************************************************
*
/*
* 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;
/******************************************************************************
* 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;
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;
#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");
"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 */
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;
#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[])
#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;
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;
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();
"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;
}
-void kgdb_breakpoint(int argc, char *argv[])
+void kgdb_breakpoint(int argc, char * const argv[])
{
asm volatile ("excpt 0x1\n");
}
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 */
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
#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;
}
#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;
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;
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);
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;
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);
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) {
#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);
#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);
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;
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);
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);
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);
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);
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);
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;
#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;
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");
}
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);
{
}
-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();
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");
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");
* 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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
/*-----------------------------------------------------------------------*/
-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 ();
/*************************************************************************/
#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;
}
-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);
#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");
!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 */
/****************************************************************************/
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");
}
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;
}
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;
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;
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];
/*
* 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;
* 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;
/* ------------------------------------------------------------------------- */
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 */
/****************************************************************************/
#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;
/* ------------------------------------------------------------------------- */
-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;
/****************************************************************************/
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");
}
/*------------------------------------------------------------------- */
-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;
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));
* ====================================================================== */
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 */
#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;
*
*/
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;
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
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;
*/
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[])
{
}
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];
/* ------------------------------------------------------------------------- */
-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) || \
#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;
}
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;
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;
/*
* 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;
}
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 */
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));
* ====================================================================== */
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 */
#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;
* 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 ();
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)
{
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));
* 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 */
}
-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;
/* ------------------------------------------------------------------------- */
-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();
}
#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;
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);
}
__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;
the debugger. */
void
-kgdb_breakpoint(int argc, char *argv[])
+kgdb_breakpoint(int argc, char * const argv[])
{
asm(" .globl breakinst\n\
breakinst: .long 0x7d821008\n\
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);
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);
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);
}
#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;
_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();
/****************************************************************************/
#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();
_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();
/****************************************************************************/
#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();
/* 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;
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)
}
/* 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;
/*---------------------------------------------------------------------------*/
#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;
/*---------------------------------------------------------------------------*/
-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;
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;
* 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 */
}
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;
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);
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);
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);
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;
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;
""
);
-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;
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;
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);
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);
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;
}
#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);
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);
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;
}
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;
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;
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();
}
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);
}
* 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;
/*
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;
* -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;
#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;
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)));
#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;
&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;
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;
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) {
* 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;
* 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");
/*
* 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 ();
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;
* 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 =
/*
* 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;
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;
#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:
#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;
#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;
#ifdef CONFIG_CMD_BSP
-static int do_i2c_test(char *argv[])
+static int do_i2c_test(char * const argv[])
{
unsigned char temp, temp1;
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 */
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;
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;
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;
#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);
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")) {
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;
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];
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;
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;
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;
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;
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;
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;
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;
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,
"[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
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;
* 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 */
* 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);
#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);
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);
/* ------------------------------------------------------------------------- */
/*
* 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;
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;
}
-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;
#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 */
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[]);
/* ------------------------------------------------------------------------- */
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;
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();
/*
* 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;
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
* 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;
#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;
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
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;
/*
* 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;
/*
* 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];
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;
/*
* 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;
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;
"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));
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;
/*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);
/* ------------------------------------------------------------------------- */
int do_pci9054 (cmd_tbl_t * cmdtp, int flag, int argc,
- char *argv[])
+ char * const argv[])
{
if (strcmp (argv[1], "info") == 0) {
showPci9054 ();
/*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);
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;
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;
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];
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;
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;
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;
* 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];
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;
#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 */
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;
/*
* 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;
/*
* 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];
/*
* 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;
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);
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) {
}
}
-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);
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;
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;
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 */
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;
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;
#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;
);
#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);
""
);
-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;
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;
}
}
-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;
"'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;
#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;
);
#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;
""
);
-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;
""
);
-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");
);
/* 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;
);
#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;
/* 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);
/*
*/
-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;
/*
*/
-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];
/*
*/
-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;
/*
*/
-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;
/*
*/
-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;
/*
*/
-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];
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;
#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 */
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;
#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[] =
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);
}
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;
}
-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;
*
*/
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);
/* 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;
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;
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;
/* 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;
}
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;
#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;
}
#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;
);
-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;
);
-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));
/* ------------------------------------------------------------------------- */
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;
);
/* ------------------------------------------------------------------------- */
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;
/* ------------------------------------------------------------------------- */
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;
}
static int do_inkadiag_io(cmd_tbl_t *cmdtp, int flag, int argc,
- char *argv[]) {
+ char * const argv[]) {
unsigned int state, val;
switch (argc) {
}
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;
}
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;
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",
};
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 ");
}
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));
}
#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) {
#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
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
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;
/***********************************************************************
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
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
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];
/***********************************************************************
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
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
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;
/***********************************************************************
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
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
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];
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);
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;
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;
#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;
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;
#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);
}
-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)
{
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;
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];
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);
return cnt;
}
-int eeprom(int argc, char *argv[])
+int eeprom(int argc, char * const argv[])
{
int i, len, ret;
unsigned char buf[58], *p;
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 ();
}
#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:
* "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;
* "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;
}
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);
/*
* 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;
#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;
*
* 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" );
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)
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;
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;
#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];
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];
"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);
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;
}
#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);
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 */
}
-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)
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];
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];
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];
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];
/* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-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;
#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;
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;
#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;
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;
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;
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;
* 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;
* 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 =
* 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;
}
#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;
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;
~((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");
}
#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;
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);
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;
);
-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;
);
-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;
);
-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;
);
-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);
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;
#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];
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);
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,
* test.
*/
-int trab_fkt (int argc, char *argv[])
+int trab_fkt (int argc, char * const argv[])
{
int i;
return 0;
}
-int do_buzzer (char **argv)
+int do_buzzer (char * const *argv)
{
int counter;
}
-int do_led (char **argv)
+int do_led (char * const *argv)
{
struct s3c24x0_gpio * const gpio = s3c24x0_get_base_gpio();
}
-int do_full_bridge (char **argv)
+int do_full_bridge (char * const *argv)
{
struct s3c24x0_gpio * const gpio = s3c24x0_get_base_gpio();
}
-int do_dac (char **argv)
+int do_dac (char * const *argv)
{
int brightness;
return 0;
}
-int do_motor (char **argv)
+int do_motor (char * const *argv)
{
struct s3c24x0_gpio * const gpio = s3c24x0_get_base_gpio();
printf ("## FKT: ");
}
-int do_pwm (char **argv)
+int do_pwm (char * const *argv)
{
int counter;
struct s3c24x0_gpio * const gpio = s3c24x0_get_base_gpio();
}
-int do_thermo (char **argv)
+int do_thermo (char * const *argv)
{
int channel, res;
}
-int do_touch (char **argv)
+int do_touch (char * const *argv)
{
int x, y;
}
-int do_rs485 (char **argv)
+int do_rs485 (char * const *argv)
{
int timeout;
char data[RS485_MAX_RECEIVE_BUF_LEN];
}
-int do_serial_number (char **argv)
+int do_serial_number (char * const *argv)
{
#if defined(CONFIG_CMD_I2C)
unsigned int serial_number;
}
-int do_gain (char **argv)
+int do_gain (char * const *argv)
{
int range;
}
-int do_eeprom (char **argv)
+int do_eeprom (char * const *argv)
{
#if defined(CONFIG_CMD_I2C)
if (strcmp (argv[2], "read") == 0) {
}
#if defined(CONFIG_CMD_I2C)
-static int trab_eeprom_read (char **argv)
+static int trab_eeprom_read (char * const *argv)
{
int i;
int len;
return (0);
}
-static int trab_eeprom_write (char **argv)
+static int trab_eeprom_write (char * const *argv)
{
int i;
int len;
#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];
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) {
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;
return cnt;
}
-int eeprom(int argc, char *argv[])
+int eeprom(int argc, char * const argv[])
{
int i, len, ret;
unsigned char buf[58], *p;
* 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;
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();
}
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;
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;
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;
printf(" irq: %-2d (ver: %d)\n", irq, ver);
}
-int do_ambapp_print(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_ambapp_print(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
/* Print AHB Masters */
#if defined(CONFIG_PPC)
static void print_str(const char *, const char *);
-int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
bd_t *bd = gd->bd;
char buf[32];
#elif defined(CONFIG_NIOS2)
-int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
bd_t *bd = gd->bd;
#elif defined(CONFIG_MICROBLAZE)
-int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
bd_t *bd = gd->bd;
print_num ("mem start ", (ulong)bd->bi_memstart);
#elif defined(CONFIG_SPARC)
-int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
bd_t *bd = gd->bd;
static void print_str(const char *, const char *);
-int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
bd_t *bd = gd->bd;
char buf[32];
static void print_str(const char *, const char *);
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
bd_t *bd = gd->bd;
char buf[32];
#elif defined(CONFIG_MIPS)
-int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
bd_t *bd = gd->bd;
#elif defined(CONFIG_ARM)
-int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int i;
bd_t *bd = gd->bd;
* Entry point from the interpreter to the disassembler. Repeated calls
* will resume from the last disassembled address.
* ====================================================================== */
-int do_bedbug_dis (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_bedbug_dis (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
ulong addr; /* Address to start disassembly from */
ulong len; /* # of instructions to disassemble */
* instructions in consecutive memory locations until a '.' (period) is
* entered on a line by itself.
* ====================================================================== */
-int do_bedbug_asm (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_bedbug_asm (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
long mem_addr; /* Address to assemble into */
unsigned long instr; /* Machine code for text */
* CPU-specific break point set routine.
* ====================================================================== */
-int do_bedbug_break (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_bedbug_break (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
/* -------------------------------------------------- */
if (bug_ctx.do_break)
* stopped flag in the context so that the breakpoint routine will
* return.
* ====================================================================== */
-int do_bedbug_continue (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_bedbug_continue (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
/* -------------------------------------------------- */
* the address passes control to the CPU-specific set breakpoint routine
* for the current breakpoint number.
* ====================================================================== */
-int do_bedbug_step (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_bedbug_step (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
unsigned long addr; /* Address to stop at */
* the address passes control to the CPU-specific set breakpoint routine
* for the current breakpoint number.
* ====================================================================== */
-int do_bedbug_next (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_bedbug_next (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
unsigned long addr; /* Address to stop at */
* Interpreter command to print the current stack. This assumes an EABI
* architecture, so it starts with GPR R1 and works back up the stack.
* ====================================================================== */
-int do_bedbug_stack (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_bedbug_stack (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
unsigned long sp; /* Stack pointer */
unsigned long func; /* LR from stack */
* Interpreter command to dump the registers. Calls the CPU-specific
* show registers routine.
* ====================================================================== */
-int do_bedbug_rdump (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_bedbug_rdump (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
/* -------------------------------------------------- */
}
#endif
-static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
ulong addr;
return (bmp_info(addr));
}
-static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
ulong addr;
int x = 0, y = 0;
* Return: None
*
*/
-static int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
cmd_tbl_t *c;
/* Allow ports to override the default behavior */
__attribute__((weak))
-unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[])
+unsigned long do_go_exec (ulong (*entry)(int, char * const []), int argc, char * const argv[])
{
return entry (argc, argv);
}
-int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr, rc;
int rcode = 0;
" passing 'arg' as arguments"
);
-extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
U_BOOT_CMD(
reset, 1, 0, do_reset,
* to also add booting from SPI, or TWI, but this function does
* not currently support that.
*/
-int do_bootldr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bootldr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
void *addr;
#if defined(CONFIG_CMD_IMLS)
#include <flash.h>
extern flash_info_t flash_info[]; /* info for FLASH chips */
-static int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+static int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
#endif
#ifdef CONFIG_SILENT_CONSOLE
static int fit_check_kernel (const void *fit, int os_noffset, int verify);
#endif
-static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag,int argc, char *argv[],
+static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag,int argc, char * const argv[],
bootm_headers_t *images, ulong *os_data, ulong *os_len);
-extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
/*
* Continue booting an OS image; caller already has:
* - loaded (first part of) image to header load address,
* - disabled interrupts.
*/
-typedef int boot_os_fn (int flag, int argc, char *argv[],
+typedef int boot_os_fn (int flag, int argc, char * const argv[],
bootm_headers_t *images); /* pointers to os/initrd/fdt */
#ifdef CONFIG_BOOTM_LINUX
#if defined(CONFIG_CMD_ELF)
static boot_os_fn do_bootm_vxworks;
static boot_os_fn do_bootm_qnxelf;
-int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
#endif
#if defined(CONFIG_INTEGRITY)
static boot_os_fn do_bootm_integrity;
#endif
}
-static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
void *os_hdr;
int ret;
return 0;
}
-static int bootm_start_standalone(ulong iflag, int argc, char *argv[])
+static int bootm_start_standalone(ulong iflag, int argc, char * const argv[])
{
char *s;
- int (*appl)(int, char *[]);
+ int (*appl)(int, char * const []);
/* Don't start if "autostart" is set to "no" */
if (((s = getenv("autostart")) != NULL) && (strcmp(s, "no") == 0)) {
setenv("filesize", buf);
return 0;
}
- appl = (int (*)(int, char *[]))ntohl(images.ep);
+ appl = (int (*)(int, char * const []))ntohl(images.ep);
(*appl)(argc-1, &argv[1]);
return 0;
U_BOOT_CMD_MKENT(go, 0, 1, (void *)BOOTM_STATE_OS_GO, "", ""),
};
-int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int ret = 0;
int state;
/* bootm - boot application image from image in memory */
/*******************************************************************/
-int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong iflag;
ulong load_end = 0;
* pointer to image header if valid image was found, plus kernel start
* address and length, otherwise NULL
*/
-static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
+static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
bootm_headers_t *images, ulong *os_data, ulong *os_len)
{
image_header_t *hdr;
/* bootd - boot default image */
/*******************************************************************/
#if defined(CONFIG_CMD_BOOTD)
-int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int rcode = 0;
/* iminfo - print header info for a requested image */
/*******************************************************************/
#if defined(CONFIG_CMD_IMI)
-int do_iminfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_iminfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int arg;
ulong addr;
/* imls - list all images found in flash */
/*******************************************************************/
#if defined(CONFIG_CMD_IMLS)
-int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
flash_info_t *info;
int i, j;
/*******************************************************************/
#ifdef CONFIG_BOOTM_NETBSD
-static int do_bootm_netbsd (int flag, int argc, char *argv[],
+static int do_bootm_netbsd (int flag, int argc, char * const argv[],
bootm_headers_t *images)
{
void (*loader)(bd_t *, image_header_t *, char *, char *);
#endif /* CONFIG_BOOTM_NETBSD*/
#ifdef CONFIG_LYNXKDI
-static int do_bootm_lynxkdi (int flag, int argc, char *argv[],
+static int do_bootm_lynxkdi (int flag, int argc, char * const argv[],
bootm_headers_t *images)
{
image_header_t *hdr = &images->legacy_hdr_os_copy;
#endif /* CONFIG_LYNXKDI */
#ifdef CONFIG_BOOTM_RTEMS
-static int do_bootm_rtems (int flag, int argc, char *argv[],
+static int do_bootm_rtems (int flag, int argc, char * const argv[],
bootm_headers_t *images)
{
void (*entry_point)(bd_t *);
#endif /* CONFIG_BOOTM_RTEMS */
#if defined(CONFIG_CMD_ELF)
-static int do_bootm_vxworks (int flag, int argc, char *argv[],
+static int do_bootm_vxworks (int flag, int argc, char * const argv[],
bootm_headers_t *images)
{
char str[80];
return 1;
}
-static int do_bootm_qnxelf(int flag, int argc, char *argv[],
+static int do_bootm_qnxelf(int flag, int argc, char * const argv[],
bootm_headers_t *images)
{
char *local_args[2];
#endif
#ifdef CONFIG_INTEGRITY
-static int do_bootm_integrity (int flag, int argc, char *argv[],
+static int do_bootm_integrity (int flag, int argc, char * const argv[],
bootm_headers_t *images)
{
void (*entry_point)(void);
static int on_off (const char *);
-int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
switch (argc) {
case 2: /* on / off */
return 0;
}
-int do_dcache ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_dcache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
switch (argc) {
case 2: /* on / off */
#include <stdio_dev.h>
extern void _do_coninfo (void);
-int do_coninfo (cmd_tbl_t * cmd, int flag, int argc, char *argv[])
+int do_coninfo (cmd_tbl_t * cmd, int flag, int argc, char * const argv[])
{
int l;
struct list_head *list = stdio_get_list();
/*
* display current instruction and data cplb tables
*/
-int do_cplbinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_cplbinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
printf("%s CPLB table [%08x]:\n", "Instruction", *(uint32_t *)DMEM_CONTROL);
show_cplb_table((uint32_t *)ICPLB_ADDR0, (uint32_t *)ICPLB_DATA0);
* @param argv arguments list
* @return 0 on success, 1 otherwise
*/
-int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *filename;
int size;
* @param argv arguments list
* @return 0 on success, 1 otherwise
*/
-int do_cramfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_cramfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *filename = "/";
int ret;
static int mmc_nspi (const char *);
-int do_dataflash_mmc_mux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_dataflash_mmc_mux (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
switch (argc) {
case 2: /* on / off */
int mk_date (char *, struct rtc_time *);
-int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
struct rtc_time tm;
int rcode = 0;
* Interpreter command to retrieve an AMCC PPC 4xx Device Control Register
* =======================================================================
*/
-int do_getdcr ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] )
+int do_getdcr ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] )
{
unsigned short dcrn; /* Device Control Register Num */
unsigned long value; /* DCR's value */
* Interpreter command to set an AMCC PPC 4xx Device Control Register
* ======================================================================
*/
-int do_setdcr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_setdcr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
unsigned short dcrn; /* Device Control Register Num */
unsigned long value;
* Device Control Register inderect addressing.
* =======================================================================
*/
-int do_getidcr (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_getidcr (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unsigned short adr_dcrn; /* Device Control Register Num for Address */
unsigned short dat_dcrn; /* Device Control Register Num for Data */
* Device Control Register inderect addressing.
* =======================================================================
*/
-int do_setidcr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_setidcr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
unsigned short adr_dcrn; /* Device Control Register Num for Address */
unsigned short dat_dcrn; /* Device Control Register Num for Data */
#include <common.h>
#include <df.h>
-static int do_df(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_df(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
const char *cmd;
#include <command.h>
#include <post.h>
-int do_diag (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_diag (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
unsigned int i;
#define CWORD_CLEAR 0x80
#define CLEAR_DELAY (110 * 2)
-int do_display (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_display (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int i;
int pos;
#include <dtt.h>
#include <i2c.h>
-int do_dtt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_dtt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
int i;
unsigned char sensors[] = CONFIG_DTT_SENSORS;
#include <common.h>
#include <command.h>
-int do_echo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_echo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int i;
int putnl = 1;
/* ------------------------------------------------------------------------- */
#if defined(CONFIG_CMD_EEPROM)
-int do_eeprom ( cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_eeprom ( cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
const char *const fmt =
"\nEEPROM @0x%lX %s: addr %08lx off %04lx count %ld ... ";
/* Allow ports to override the default behavior */
__attribute__((weak))
-unsigned long do_bootelf_exec (ulong (*entry)(int, char *[]), int argc, char *argv[])
+unsigned long do_bootelf_exec (ulong (*entry)(int, char * const[]),
+ int argc, char * const argv[])
{
unsigned long ret;
/* ======================================================================
* Interpreter command to boot an arbitrary ELF image from memory.
* ====================================================================== */
-int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unsigned long addr; /* Address of the ELF image */
unsigned long rc; /* Return value from user code */
* be either an ELF image or a raw binary. Will attempt to setup the
* bootline and other parameters correctly.
* ====================================================================== */
-int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unsigned long addr; /* Address of image */
unsigned long bootaddr; /* Address to put the bootline */
#include <common.h>
#include <command.h>
-int do_exit(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_exit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int r;
#define PRINTF(fmt,args...)
#endif
-int do_ext2ls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ext2ls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *filename = "/";
int dev=0;
/******************************************************************************
* Ext2fs boot command intepreter. Derived from diskboot
*/
-int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *filename = NULL;
char *ep;
#include <fat.h>
-int do_fat_fsload (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_fat_fsload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
long size;
unsigned long offset;
" to address 'addr' from dos filesystem"
);
-int do_fat_ls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_fat_ls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *filename = "/";
int ret;
" - list files from 'dev' on 'interface' in a 'directory'"
);
-int do_fat_fsinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_fat_fsinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int dev=0;
int part=1;
}
int
-do_fat_dump (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
+do_fat_dump (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char * const argv[])
{
__u8 block[1024];
int ret;
/****************************************************************************
* main routine do_fdcboot
*/
-int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
FD_GEO_STRUCT *pFG = (FD_GEO_STRUCT *)floppy_type;
FDC_COMMAND_STRUCT *pCMD = &cmd;
* do_fdosboot --
*-----------------------------------------------------------------------------
*/
-int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *name;
char *ep;
* do_fdosls --
*-----------------------------------------------------------------------------
*/
-int do_fdosls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_fdosls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *path = "";
int drive = CONFIG_SYS_FDC_DRIVE_NUMBER;
DECLARE_GLOBAL_DATA_PTR;
static int fdt_valid(void);
-static int fdt_parse_prop(char **newval, int count, char *data, int *len);
+static int fdt_parse_prop(char *const*newval, int count, char *data, int *len);
static int fdt_print(const char *pathp, char *prop, int depth);
/*
/*
* Flattened Device Tree command, see the help for parameter definitions.
*/
-int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
if (argc < 2) {
cmd_usage(cmdtp);
* data: A bytestream to be placed in the property
* len: The length of the resulting bytestream
*/
-static int fdt_parse_prop(char **newval, int count, char *data, int *len)
+static int fdt_parse_prop(char * const *newval, int count, char *data, int *len)
{
char *cp; /* temporary char pointer */
char *newp; /* temporary newval char pointer */
}
#endif /* CONFIG_SYS_NO_FLASH */
-int do_flinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_flinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
#ifndef CONFIG_SYS_NO_FLASH
ulong bank;
return 0;
}
-int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
#ifndef CONFIG_SYS_NO_FLASH
flash_info_t *info;
}
#endif /* CONFIG_SYS_NO_FLASH */
-int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
#ifndef CONFIG_SYS_NO_FLASH
flash_info_t *info;
* If there is no data addr field, the fpgadata environment variable is used.
* The info command requires no data address field.
*/
-int do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
int op, dev = FPGA_INVALID_DEVICE;
size_t data_size = 0;
#include <common.h>
#include <command.h>
-int do_help(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_help(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
return _do_help(&__u_boot_cmd_start,
&__u_boot_cmd_end - &__u_boot_cmd_start,
* i2c read {i2c_chip} {devaddr}{.0, .1, .2} {len} {memaddr}
*/
-static int do_i2c_read ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_i2c_read ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
u_char chip;
uint devaddr, alen, length;
* Syntax:
* i2c md {i2c_chip} {addr}{.0, .1, .2} {len}
*/
-static int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
u_char chip;
uint addr, alen, length;
* Syntax:
* i2c mw {i2c_chip} {addr}{.0, .1, .2} {data} [{count}]
*/
-static int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
uchar chip;
ulong addr;
* Syntax:
* i2c crc32 {i2c_chip} {addr}{.0, .1, .2} {count}
*/
-static int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
uchar chip;
ulong addr;
*/
static int
-mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[])
+mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[])
{
uchar chip;
ulong addr;
* Syntax:
* i2c probe {addr}{.0, .1, .2}
*/
-static int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int j;
#if defined(CONFIG_SYS_I2C_NOPROBES)
* {length} - Number of bytes to read
* {delay} - A DECIMAL number and defaults to 1000 uSec
*/
-static int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
u_char chip;
ulong alen;
* Syntax:
* i2c sdram {i2c_chip}
*/
-static int do_sdram (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_sdram (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
enum { unknown, EDO, SDRAM, DDR2 } type;
#endif
#if defined(CONFIG_I2C_MUX)
-static int do_i2c_add_bus(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_i2c_add_bus(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
int ret=0;
#endif /* CONFIG_I2C_MUX */
#if defined(CONFIG_I2C_MULTI_BUS)
-static int do_i2c_bus_num(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_i2c_bus_num(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
int bus_idx, ret=0;
}
#endif /* CONFIG_I2C_MULTI_BUS */
-static int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
int speed, ret=0;
return ret;
}
-static int do_i2c_mm(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_i2c_mm(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
return mod_i2c_mem (cmdtp, 1, flag, argc, argv);
}
-static int do_i2c_nm(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_i2c_nm(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
return mod_i2c_mem (cmdtp, 0, flag, argc, argv);
}
-static int do_i2c_reset(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_i2c_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
return 0;
U_BOOT_CMD_MKENT(speed, 1, 1, do_i2c_bus_speed, "", ""),
};
-static int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
cmd_tbl_t *c;
/* ------------------------------------------------------------------------- */
-int do_ide (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ide (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int rcode = 0;
}
}
-int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *boot_device = NULL;
char *ep;
DECLARE_GLOBAL_DATA_PTR;
static void
-unimplemented ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+unimplemented ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
printf ("Sorry, but the '%s' command has not been implemented\n",
cmdtp->name);
}
int
-do_siuinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_siuinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
}
int
-do_memcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_memcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
}
int
-do_sitinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_sitinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unimplemented (cmdtp, flag, argc, argv);
return 0;
#ifdef CONFIG_8260
int
-do_icinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_icinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unimplemented (cmdtp, flag, argc, argv);
return 0;
#endif
int
-do_carinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_carinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
#endif
int
-do_iopinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_iopinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
* use *uint and set the address based on cmd + port
*/
int
-do_iopset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_iopset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
uint rcode = 0;
iopin_t iopin;
}
int
-do_dmainfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_dmainfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unimplemented (cmdtp, flag, argc, argv);
return 0;
}
int
-do_fccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_fccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unimplemented (cmdtp, flag, argc, argv);
return 0;
}
int
-do_brginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_brginfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
}
int
-do_i2cinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_i2cinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
}
int
-do_sccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_sccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unimplemented (cmdtp, flag, argc, argv);
return 0;
}
int
-do_smcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_smcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unimplemented (cmdtp, flag, argc, argv);
return 0;
}
int
-do_spiinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_spiinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unimplemented (cmdtp, flag, argc, argv);
return 0;
}
int
-do_muxinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_muxinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unimplemented (cmdtp, flag, argc, argv);
return 0;
}
int
-do_siinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_siinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unimplemented (cmdtp, flag, argc, argv);
return 0;
}
int
-do_mccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_mccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unimplemented (cmdtp, flag, argc, argv);
return 0;
#include <config.h>
#include <command.h>
-int do_interrupts(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_interrupts(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
if (argc != 2) {
);
/* Implemented in $(CPU)/interrupts.c */
-int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
U_BOOT_CMD(
irqinfo, 1, 1, do_irqinfo,
}
/* command line interface to the shell test */
-int do_itest ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] )
+int do_itest ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] )
{
int value, w;
* @param argv arguments list
* @return 0 on success, 1 otherwise
*/
-int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *fsname;
char *filename;
* @param argv arguments list
* @return 0 on success, 1 otherwise
*/
-int do_jffs2_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_jffs2_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *filename = "/";
int ret;
* @param argv arguments list
* @return 0 on success, 1 otherwise
*/
-int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
struct part_info *part;
char *fsname;
#include <malloc.h>
#include <license.h>
-int do_license(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_license(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *tok, *dst = malloc(LICENSE_MAX);
unsigned long len = LICENSE_MAX;
/* -------------------------------------------------------------------- */
#if defined(CONFIG_CMD_LOADS)
-int do_load_serial (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_load_serial (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
long offset = 0;
ulong addr;
#if defined(CONFIG_CMD_SAVES)
-int do_save_serial (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_save_serial (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong offset = 0;
ulong size = 0;
char his_pad_char; /* pad chars he needs */
char his_quote; /* quote chars he'll use */
-int do_load_serial_bin (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_load_serial_bin (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong offset = 0;
ulong addr;
/* -------------------------------------------------------------------- */
#if defined(CONFIG_CMD_HWFLOW)
-int do_hwflow (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_hwflow (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
extern int hwflow_onoff(int);
* Return: None
*
*/
-int do_log (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_log (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *s;
unsigned long i, start, size;
#include <common.h>
#include <command.h>
-extern int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+extern int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
U_BOOT_CMD(
mac, 3, 1, do_mac,
#define PRINTF(fmt,args...)
#endif
-static int mod_mem(cmd_tbl_t *, int, int, int, char *[]);
+static int mod_mem(cmd_tbl_t *, int, int, int, char * const []);
/* Display values from last command.
* Memory modify remembered values are different from display memory.
* md{.b, .w, .l} {addr} {len}
*/
#define DISP_LINE_LEN 16
-int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr, length;
#if defined(CONFIG_HAS_DATAFLASH)
return (rc);
}
-int do_mem_mm ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_mm ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
return mod_mem (cmdtp, 1, flag, argc, argv);
}
-int do_mem_nm ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_nm ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
return mod_mem (cmdtp, 0, flag, argc, argv);
}
-int do_mem_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr, writeval, count;
int size;
}
#ifdef CONFIG_MX_CYCLIC
-int do_mem_mdc ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_mdc ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int i;
ulong count;
return 0;
}
-int do_mem_mwc ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_mwc ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int i;
ulong count;
}
#endif /* CONFIG_MX_CYCLIC */
-int do_mem_cmp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_cmp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr1, addr2, count, ngood;
int size;
return rcode;
}
-int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr, dest, count;
int size;
return 0;
}
-int do_mem_base (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_base (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
if (argc > 1) {
/* Set new base address.
return 0;
}
-int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr, length, i, junk;
int size;
}
#ifdef CONFIG_LOOPW
-int do_mem_loopw (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_loopw (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr, length, i, data;
int size;
* configured using CONFIG_SYS_ALT_MEMTEST. The complete test loops until
* interrupted by ctrl-c or by a failure of one of the sub-tests.
*/
-int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
vu_long *addr, *start, *end;
ulong val;
* nm{.b, .w, .l} {addr}
*/
static int
-mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[])
+mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[])
{
ulong addr, i;
int nbytes, size;
#ifndef CONFIG_CRC32_VERIFY
-int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr, length;
ulong crc;
#else /* CONFIG_CRC32_VERIFY */
-int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr, length;
ulong crc;
ulong vcrc;
int verify;
int ac;
- char **av;
+ char * const *av;
if (argc < 3) {
usage:
#endif /* CONFIG_CRC32_VERIFY */
#ifdef CONFIG_CMD_MD5SUM
-int do_md5sum(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_md5sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unsigned long addr, len;
unsigned int i;
#endif
#ifdef CONFIG_CMD_SHA1
-int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unsigned long addr, len;
unsigned int i;
#endif
#ifdef CONFIG_CMD_UNZIP
-int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unsigned long src, dst;
unsigned long src_len = ~0UL, dst_len = ~0UL;
#include <command.h>
#include <asm/asm.h>
-int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
unsigned int fslnum;
unsigned int num;
return 0;
}
-int do_fwr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_fwr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
unsigned int fslnum;
unsigned int num;
}
-int do_rspr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_rspr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
unsigned int reg = 0;
unsigned int val = 0;
#include <mg_disk.h>
-int do_mg_disk_cmd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mg_disk_cmd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
u32 from, to, size;
}
/* ---------------------------------------------------------------- */
-int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
char op[2];
unsigned char addrlo, addrhi, reglo, reghi;
#include <common.h>
#include <command.h>
-int do_sleep (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_sleep (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong start = get_timer(0);
ulong delay;
#ifndef CONFIG_GENERIC_MMC
static int curr_device = -1;
-int do_mmc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mmc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int dev;
printf("Bus Width: %d-bit\n", mmc->bus_width);
}
-int do_mmcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mmcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
struct mmc *mmc;
int dev_num;
""
);
-int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int rc = 0;
#include <command.h>
int
-cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unsigned long cpuid;
* @param argv arguments list
* @return 0 on success, 1 otherwise
*/
-int do_chpart(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_chpart(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
/* command line only */
struct mtd_device *dev;
* @param argv arguments list
* @return 0 on success, 1 otherwise
*/
-int do_mtdparts(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mtdparts(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
if (argc == 2) {
if (strcmp(argv[1], "default") == 0) {
}
static int
-arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, size_t *size)
+arg_off_size(int argc, char * const argv[], nand_info_t *nand, ulong *off, size_t *size)
{
int idx = nand_curr_device;
#if defined(CONFIG_CMD_MTDPARTS)
nand->name, nand->erasesize >> 10);
}
-int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
int i, dev, ret = 0;
ulong addr, off;
return 0;
}
-int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
char *boot_device = NULL;
int idx;
#include <command.h>
#include <net.h>
-extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
+extern int do_bootm (cmd_tbl_t *, int, int, char * const []);
-static int netboot_common (proto_t, cmd_tbl_t *, int , char *[]);
+static int netboot_common (proto_t, cmd_tbl_t *, int , char * const []);
-int do_bootp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bootp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
return netboot_common (BOOTP, cmdtp, argc, argv);
}
"[loadAddress] [[hostIPaddr:]bootfilename]"
);
-int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
return netboot_common (TFTP, cmdtp, argc, argv);
}
"[loadAddress] [[hostIPaddr:]bootfilename]"
);
-int do_rarpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_rarpb (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
return netboot_common (RARP, cmdtp, argc, argv);
}
);
#if defined(CONFIG_CMD_DHCP)
-int do_dhcp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_dhcp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
return netboot_common(DHCP, cmdtp, argc, argv);
}
#endif
#if defined(CONFIG_CMD_NFS)
-int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
return netboot_common(NFS, cmdtp, argc, argv);
}
}
static int
-netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
+netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char * const argv[])
{
char *s;
char *end;
}
#if defined(CONFIG_CMD_PING)
-int do_ping (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ping (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
if (argc < 2)
return -1;
}
-int do_cdp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_cdp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int r;
#endif
#if defined(CONFIG_CMD_SNTP)
-int do_sntp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_sntp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *toff;
#endif
#if defined(CONFIG_CMD_DNS)
-int do_dns(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_dns(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
if (argc == 1) {
cmd_usage(cmdtp);
return i;
}
-int do_printenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_printenv (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int i;
int rcode = 0;
* This function will ONLY work with a in-RAM copy of the environment
*/
-int _do_setenv (int flag, int argc, char *argv[])
+int _do_setenv (int flag, int argc, char * const argv[])
{
int i, len, oldval;
int console = -1;
int setenv (char *varname, char *varvalue)
{
- char *argv[4] = { "setenv", varname, varvalue, NULL };
+ char * const argv[4] = { "setenv", varname, varvalue, NULL };
if ((varvalue == NULL) || (varvalue[0] == '\0'))
return _do_setenv (0, 2, argv);
else
#ifdef CONFIG_HAS_UID
void forceenv (char *varname, char *varvalue)
{
- char *argv[4] = { "forceenv", varname, varvalue, NULL };
+ char * const argv[4] = { "forceenv", varname, varvalue, NULL };
_do_setenv (0xdeaf4add, 3, argv);
}
#endif
-int do_setenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_setenv (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
if (argc < 2) {
cmd_usage(cmdtp);
*/
#if defined(CONFIG_CMD_ASKENV)
-int do_askenv ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_askenv ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
extern char console_buffer[CONFIG_SYS_CBSIZE];
char message[CONFIG_SYS_CBSIZE];
* Interactively edit an environment variable
*/
#if defined(CONFIG_CMD_EDITENV)
-int do_editenv(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_editenv(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char buffer[CONFIG_SYS_CBSIZE];
char *init_val;
#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_ENV_IS_NOWHERE)
-int do_saveenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_saveenv (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
extern char * env_name_spec;
#endif
#if defined(CONFIG_CMD_RUN)
-int do_run (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+int do_run (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
U_BOOT_CMD(
run, CONFIG_SYS_MAXARGS, 1, do_run,
"run commands in an environment variable",
return (*p != '\0' && *endptr == '\0') ? 1 : 0;
}
-static int arg_off_size(int argc, char *argv[], ulong *off, size_t *size)
+static int arg_off_size(int argc, char * const argv[], ulong *off, size_t *size)
{
if (argc >= 1) {
if (!(str2long(argv[0], off))) {
return 0;
}
-static int do_onenand_info(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_onenand_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
printf("%s\n", mtd->name);
return 0;
}
-static int do_onenand_bad(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_onenand_bad(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
ulong ofs;
return 0;
}
-static int do_onenand_read(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_onenand_read(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
char *s;
int oob = 0;
return ret == 0 ? 0 : 1;
}
-static int do_onenand_write(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_onenand_write(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
ulong addr, ofs;
size_t len;
return ret == 0 ? 0 : 1;
}
-static int do_onenand_erase(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_onenand_erase(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
ulong ofs;
int ret = 0;
return ret == 0 ? 0 : 1;
}
-static int do_onenand_test(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_onenand_test(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
ulong ofs;
int ret = 0;
return ret == 0 ? 0 : 1;
}
-static int do_onenand_dump(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_onenand_dump(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
ulong ofs;
int ret = 0;
return ret == 0 ? 1 : 0;
}
-static int do_onenand_markbad(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_onenand_markbad(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
int ret = 0;
ulong addr;
U_BOOT_CMD_MKENT(markbad, CONFIG_SYS_MAXARGS, 0, do_onenand_markbad, "", ""),
};
-static int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
cmd_tbl_t *c;
bfrom_OtpCommand(OTP_INIT, write ? timing : timing & ~(-1 << 15));
}
-int do_otp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_otp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
uint32_t ret, base_flags;
bool prompt_user, force_read;
* pci modify[.b, .w, .l] bus.device.function [addr]
* pci write[.b, .w, .l] bus.device.function addr value
*/
-int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr = 0, value = 0, size = 0;
pci_dev_t bdf = 0;
extern int pcmcia_on (void);
extern int pcmcia_off (void);
-int do_pinit (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_pinit (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int rcode = 0;
static uint out_last_addr, out_last_size, out_last_value;
-int do_portio_out (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_portio_out (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
uint addr = out_last_addr;
uint size = out_last_size;
"[.b, .w, .l] port value\n - output to IO port"
);
-int do_portio_in (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_portio_in (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
uint addr = in_last_addr;
uint size = in_last_size;
extern void mpc86xx_reginfo(void);
#endif
-int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
#if defined(CONFIG_8xx)
volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
#define PRINTF(fmt,args...)
#endif
-int do_reiserls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_reiserls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *filename = "/";
int dev=0;
/******************************************************************************
* Reiserfs boot command intepreter. Derived from diskboot
*/
-int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *filename = NULL;
char *ep;
return (dev < CONFIG_SYS_SATA_MAX_DEVICE) ? &sata_dev_desc[dev] : NULL;
}
-int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int rc = 0;
/******************************************************************************
* scsi boot command intepreter. Derived from diskboot
*/
-int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *boot_device = NULL;
char *ep;
/*********************************************************************************
* scsi command intepreter
*/
-int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
switch (argc) {
case 0:
}
}
-int do_setexpr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_setexpr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong a, b;
char buf[16];
static struct spi_flash *flash;
-static int do_spi_flash_probe(int argc, char *argv[])
+static int do_spi_flash_probe(int argc, char * const argv[])
{
unsigned int bus = 0;
unsigned int cs;
return 1;
}
-static int do_spi_flash_read_write(int argc, char *argv[])
+static int do_spi_flash_read_write(int argc, char * const argv[])
{
unsigned long addr;
unsigned long offset;
return 1;
}
-static int do_spi_flash_erase(int argc, char *argv[])
+static int do_spi_flash_erase(int argc, char * const argv[])
{
unsigned long offset;
unsigned long len;
return 1;
}
-static int do_spi_flash(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_spi_flash(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
const char *cmd;
/**************************************************/
#if defined(CONFIG_CMD_SOURCE)
int
-do_source (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_source (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr;
int rcode;
* The command prints out the hexadecimal string received via SPI.
*/
-int do_spi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_spi (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
struct spi_slave *slave;
char *cp = 0;
#include <asm/blackfin.h>
#include <asm/mach-common/bits/bootrom.h>
-int do_spibootldr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_spibootldr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
s32 addr;
static char *start_addr, *last_addr;
-int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
if (argc == 1) {
cmd_usage(cmdtp);
#include <stdio_dev.h>
#include <serial.h>
-int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char *argv[])
+int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char * const argv[])
{
int last_tilde = 0;
struct stdio_dev *dev = NULL;
#include <common.h>
#include <command.h>
-int do_test(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_test(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
- char **ap;
+ char * const *ap;
int left, adv, expr, last_expr, neg, last_cmp;
/* args? */
"[args..]"
);
-int do_false(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_false(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
return 1;
}
NULL
);
-int do_true(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_true(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
return 0;
}
/*
* Tundra Tsi148 configuration
*/
-int do_tsi148(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_tsi148(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr1 = 0, addr2 = 0, size = 0, vam = 0, vdw = 0;
char cmd = 'x';
return 0;
}
-static int do_ubi(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_ubi(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
size_t size = 0;
ulong addr = 0;
int ubifs_ls(char *dir_name);
int ubifs_load(char *filename, u32 addr, u32 size);
-int do_ubifs_mount(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ubifs_mount(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *vol_name;
int ret;
return 0;
}
-int do_ubifs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ubifs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *filename = "/";
int ret;
return ret;
}
-int do_ubifs_load(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ubifs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *filename;
char *endp;
/*
* Tundra Universe configuration
*/
-int do_universe(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_universe(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr1 = 0, addr2 = 0, size = 0, vam = 0, pms = 0, vdw = 0;
char cmd = 'x';
* usb boot command intepreter. Derived from diskboot
*/
#ifdef CONFIG_USB_STORAGE
-int do_usbboot(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_usbboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *boot_device = NULL;
char *ep;
/******************************************************************************
* usb command intepreter
*/
-int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int i;
extern char version_string[];
-int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
printf("\n%s\n", version_string);
int trab_vfd (ulong bitmap);
-int do_vfd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_vfd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong bitmap;
#endif
int
-do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
ulong addr = load_addr;
ulong dest = 0;
extern int yaffs_DumpDevStruct(const char *path);
-int do_ymount (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ymount (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *mtpoint = argv[1];
cmd_yaffs_mount(mtpoint);
return(0);
}
-int do_yumount (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_yumount (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *mtpoint = argv[1];
cmd_yaffs_umount(mtpoint);
return(0);
}
-int do_yls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_yls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *dirname = argv[argc-1];
return(0);
}
-int do_yrd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_yrd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *filename = argv[1];
printf ("Reading file %s ", filename);
return(0);
}
-int do_ywr (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ywr (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *filename = argv[1];
ulong value = simple_strtoul(argv[2], NULL, 16);
return(0);
}
-int do_yrdm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_yrdm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *filename = argv[1];
ulong addr = simple_strtoul(argv[2], NULL, 16);
return(0);
}
-int do_ywrm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ywrm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *filename = argv[1];
ulong addr = simple_strtoul(argv[2], NULL, 16);
return(0);
}
-int do_ymkdir (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ymkdir (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *dirname = argv[1];
return(0);
}
-int do_yrmdir (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_yrmdir (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *dirname = argv[1];
return(0);
}
-int do_yrm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_yrm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *path = argv[1];
return(0);
}
-int do_ymv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ymv (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *oldPath = argv[1];
char *newPath = argv[2];
return(0);
}
-int do_ydump (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ydump (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *dirname = argv[1];
if (yaffs_DumpDevStruct(dirname) != 0)
*/
int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, int
- flag, int argc, char *argv[])
+ flag, int argc, char * const argv[])
{
int i;
int rcode = 0;
#ifdef CONFIG_AUTO_COMPLETE
-int var_complete(int argc, char *argv[], char last_char, int maxv, char *cmdv[])
+int var_complete(int argc, char * const argv[], char last_char, int maxv, char *cmdv[])
{
static char tmp_buf[512];
int space;
}
static void install_auto_complete_handler(const char *cmd,
- int (*complete)(int argc, char *argv[], char last_char, int maxv, char *cmdv[]))
+ int (*complete)(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]))
{
cmd_tbl_t *cmdtp;
/*************************************************************************************/
-static int complete_cmdv(int argc, char *argv[], char last_char, int maxv, char *cmdv[])
+static int complete_cmdv(int argc, char * const argv[], char last_char, int maxv, char *cmdv[])
{
cmd_tbl_t *cmdtp;
const char *p;
return argc;
}
-static void print_argv(const char *banner, const char *leader, const char *sep, int linemax, char *argv[])
+static void print_argv(const char *banner, const char *leader, const char *sep, int linemax, char * const argv[])
{
int ll = leader != NULL ? strlen(leader) : 0;
int sl = sep != NULL ? strlen(sep) : 0;
printf("\n");
}
-static int find_common_prefix(char *argv[])
+static int find_common_prefix(char * const argv[])
{
int i, len;
char *anchor, *s, *t;
#include <hush.h>
#include <command.h> /* find_cmd */
/*cmd_boot.c*/
-extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); /* do_bootd */
+extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* do_bootd */
#endif
#ifndef __U_BOOT__
#include <ctype.h> /* isalpha, isdigit */
#ifdef CONFIG_BOOT_RETRY_TIME
# ifdef CONFIG_RESET_TO_RETRY
- extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
# else
# error "This currently only works with CONFIG_RESET_TO_RETRY enabled"
# endif
} else {
int rcode;
#if defined(CONFIG_CMD_BOOTD)
- extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+ extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
/* avoid "bootd" recursion */
if (cmdtp->cmd == do_bootd) {
tcsetpgrp(shell_terminal, shell_pgrp);
}
-int hush_main(int argc, char **argv)
+int hush_main(int argc, char * const *argv)
{
int opt;
FILE *input;
}
#ifdef __U_BOOT__
-int do_showvar (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_showvar (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int i, k;
int rcode = 0;
#endif
#ifdef CONFIG_CMD_BDI
-extern int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+extern int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
#endif
DECLARE_GLOBAL_DATA_PTR;
* 1, if ramdisk image is found but corrupted, or invalid
* rd_start and rd_end are set to 0 if no ramdisk exists
*/
-int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images,
+int boot_get_ramdisk (int argc, char * const argv[], bootm_headers_t *images,
uint8_t arch, ulong *rd_start, ulong *rd_end)
{
ulong rd_addr, rd_load;
* 1, if fdt image is found but corrupted
* of_flat_tree and of_size are set to 0 if no fdt exists
*/
-int boot_get_fdt (int flag, int argc, char *argv[], bootm_headers_t *images,
+int boot_get_fdt (int flag, int argc, char * const argv[], bootm_headers_t *images,
char **of_flat_tree, ulong *of_size)
{
const image_header_t *fdt_hdr;
}
int
-do_kgdb(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_kgdb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
printf("Entering KGDB mode via exception handler...\n\n");
kgdb_breakpoint(argc - 1, argv + 1);
static int lcd_init (void *lcdbase);
-static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]);
+static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]);
static void *lcd_logo (void);
static int lcd_getbgcolor (void);
}
/*----------------------------------------------------------------------*/
-static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
#if LCD_BPP == LCD_MONOCHROME
/* Setting the palette */
void show_boot_progress (int val) __attribute__((weak, alias("__show_boot_progress")));
#if defined(CONFIG_BOOT_RETRY_TIME) && defined(CONFIG_RESET_TO_RETRY)
-extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); /* for do_reset() prototype */
+extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* for do_reset() prototype */
#endif
-extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
#if defined(CONFIG_UPDATE_TFTP)
void update_tftp (void);
/****************************************************************************/
#if defined(CONFIG_CMD_RUN)
-int do_run (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_run (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
int i;
that returns the ABI version of the running U-Boot. I.e., a
typical application startup may look like this:
- int my_app (int argc, char *argv[])
+ int my_app (int argc, char * const argv[])
{
app_startup (argv);
if (get_version () != XF_VERSION)
#endif
};
-int do_pca953x(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_pca953x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
static uint8_t chip = CONFIG_SYS_I2C_PCA953X_ADDR;
int val;
#endif
};
-int do_ds4510(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ds4510(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
static uint8_t chip = CONFIG_SYS_I2C_DS4510_ADDR;
cmd_tbl_t *c;
puts("\n");
}
-int do_pmic(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_pmic(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
char *cmd;
int nregs;
return qe_firmware_uploaded ? &qe_firmware_info : NULL;
}
-static int qe_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int qe_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr;
static char buf[BUF_SZ];
-int main(int argc, char *argv[])
+int main(int argc, char * const argv[])
{
int rv = 0, h, i, j, devs_no;
struct api_signature *sig = NULL;
}
-int main (int argc, char *argv[])
+int main (int argc, char * const argv[])
{
unsigned char *eth_addr;
uchar buf[6];
}
}
-int atmel_df_pow2(int argc, char *argv[])
+int atmel_df_pow2(int argc, char * const argv[])
{
/* Print the ABI version */
app_startup(argv);
static int reset_eeprom(unsigned long ioaddr, unsigned char *hwaddr);
-int eepro100_eeprom(int argc, char *argv[])
+int eepro100_eeprom(int argc, char * const argv[])
{
int ret = 0;
#include <common.h>
#include <exports.h>
-int hello_world (int argc, char *argv[])
+int hello_world (int argc, char * const argv[])
{
int i;
static void irq_handler (void *arg);
-int interrupt (int argc, char *argv[])
+int interrupt (int argc, char * const argv[])
{
int c, irq = -1;
#endif /* STANDALONE */
#ifdef STANDALONE
-int mem_to_mem_idma2intr (int argc, char *argv[])
+int mem_to_mem_idma2intr (int argc, char * const argv[])
#else
-int do_idma (bd_t * bd, int argc, char *argv[])
+int do_idma (bd_t * bd, int argc, char * const argv[])
#endif /* STANDALONE */
{
int i;
int read_eeprom_reg (struct eth_device *dev, int reg);
void print_macaddr (struct eth_device *dev);
-int smc91111_eeprom (int argc, char *argv[])
+int smc91111_eeprom (int argc, char * const argv[])
{
int c, i, j, done, line, reg, value, start, what;
char input[50];
/**
* smc911x_eeprom - our application's main() function
*/
-int smc911x_eeprom(int argc, char *argv[])
+int smc911x_eeprom(int argc, char * const argv[])
{
/* Avoid initializing on stack as gcc likes to call memset() */
struct eth_device dev;
extern unsigned long __bss_start, _end;
-void app_startup(char **argv)
+void app_startup(char * const *argv)
{
unsigned char * cp = (unsigned char *) &__bss_start;
};
-int test_burst (int argc, char *argv[])
+int test_burst (int argc, char * const argv[])
{
unsigned long size = CACHE_LINE_SIZE;
unsigned int pass = 0;
static char *usage = "\n[q, b, e, ?] ";
-int timer (int argc, char *argv[])
+int timer (int argc, char * const argv[])
{
cpmtimer8xx_t *cpmtimerp; /* Pointer to the CPM Timer structure */
tid_8xx_cpmtimer_t hw;
int current_bp;
struct pt_regs *regs;
- void (*do_break) (cmd_tbl_t *, int, int, char *[]);
+ void (*do_break) (cmd_tbl_t *, int, int, char * const []);
void (*break_isr) (struct pt_regs *);
int (*find_empty) (void);
int (*set) (int, unsigned long);
int maxargs; /* maximum number of arguments */
int repeatable; /* autorepeat allowed? */
/* Implementation function */
- int (*cmd)(struct cmd_tbl_s *, int, int, char *[]);
+ int (*cmd)(struct cmd_tbl_s *, int, int, char * const []);
char *usage; /* Usage message (short) */
#ifdef CONFIG_SYS_LONGHELP
char *help; /* Help message (long) */
#endif
#ifdef CONFIG_AUTO_COMPLETE
/* do auto completion on the arguments */
- int (*complete)(int argc, char *argv[], char last_char, int maxv, char *cmdv[]);
+ int (*complete)(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]);
#endif
};
/* common/command.c */
int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, int
- flag, int argc, char *argv[]);
+ flag, int argc, char * const argv[]);
cmd_tbl_t *find_cmd(const char *cmd);
cmd_tbl_t *find_cmd_tbl (const char *cmd, cmd_tbl_t *table, int table_len);
*
* All commands use a common argument format:
*
- * void function (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+ * void function (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
*/
typedef void command_t (cmd_tbl_t *, int, int, char *[]);
int cpu_status(int nr);
int cpu_reset(int nr);
int cpu_disable(int nr);
-int cpu_release(int nr, int argc, char *argv[]);
+int cpu_release(int nr, int argc, char * const argv[]);
#endif
#endif /* __ASSEMBLY__ */
#endif
#include <spi.h>
-void app_startup(char **);
+void app_startup(char * const *);
#endif /* ifndef __ASSEMBLY__ */
int genimg_has_config (bootm_headers_t *images);
ulong genimg_get_image (ulong img_addr);
-int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images,
+int boot_get_ramdisk (int argc, char * const argv[], bootm_headers_t *images,
uint8_t arch, ulong *rd_start, ulong *rd_end);
#ifdef CONFIG_OF_LIBFDT
-int boot_get_fdt (int flag, int argc, char *argv[], bootm_headers_t *images,
+int boot_get_fdt (int flag, int argc, char * const argv[], bootm_headers_t *images,
char **of_flat_tree, ulong *of_size);
int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base,
char **of_flat_tree, ulong *of_size);
extern void kgdb_putreg(struct pt_regs *, int, char *, int);
extern void kgdb_putregs(struct pt_regs *, char *, int);
extern int kgdb_trap(struct pt_regs *);
-extern void kgdb_breakpoint(int argc, char *argv[]);
+extern void kgdb_breakpoint(int argc, char * const argv[]);
/* these functions are provided by the platform serial driver */
extern void kgdb_serial_init(void);
#ifndef _VXWORKS_H_
#define _VXWORKS_H_
-int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
/*
* Use bootaddr to find the location in memory that VxWorks
#if !defined (CONFIG_PANIC_HANG)
#include <command.h>
/*cmd_boot.c*/
-extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
#endif
#include <div64.h>