ARRAY_SIZE(cmd_mtc_sub), cmdtp, flag, argc, argv);
}
-/* Relocate the command table function pointers when running in RAM */
-int mtc_cmd_init_r(void)
-{
- cmd_tbl_t *cmdtp;
-
- for (cmdtp = &cmd_mtc_sub[0]; cmdtp !=
- &cmd_mtc_sub[ARRAY_SIZE(cmd_mtc_sub)]; cmdtp++) {
- ulong addr;
-
- addr = (ulong)(cmdtp->cmd) + gd->reloc_off;
- cmdtp->cmd =
- (int (*)(struct cmd_tbl_s *, int, int, char *[]))addr;
-
- addr = (ulong)(cmdtp->name) + gd->reloc_off;
- cmdtp->name = (char *)addr;
-
- if (cmdtp->usage) {
- addr = (ulong)(cmdtp->usage) + gd->reloc_off;
- cmdtp->usage = (char *)addr;
- }
-#ifdef CONFIG_SYS_LONGHELP
- if (cmdtp->help) {
- addr = (ulong)(cmdtp->help) + gd->reloc_off;
- cmdtp->help = (char *)addr;
- }
-#endif
- }
- return 0;
-}
-
int cmd_mtc(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
cmd_tbl_t *c;
int misc_init_r(void)
{
- extern int mtc_cmd_init_r (void);
uchar enetaddr[6];
if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
eth_setenv_enetaddr("ethaddr", enetaddr);
}
- mtc_cmd_init_r();
return 0;
}
clrbits_be32(&lpb->cs0_cfg, 0x1); /* clear RO */
}
-int misc_init_r (void) {
- extern int inkadiag_init_r (void);
-
- /*
- * The command table used for the subcommands of inkadiag
- * needs to be relocated manually.
- */
- return inkadiag_init_r();
-}
-
int misc_init_f (void)
{
volatile struct mpc5xxx_gpio *gpio =
"[inkadiag what ...]\n"
" - perform a diagnosis on inka hardware\n"
"'inkadiag' performs hardware tests.");
-
-/* Relocate the command table function pointers when running in RAM */
-int inkadiag_init_r (void) {
- cmd_tbl_t *cmdtp;
-
- for (cmdtp = &cmd_inkadiag_sub[0]; cmdtp !=
- &cmd_inkadiag_sub[ARRAY_SIZE(cmd_inkadiag_sub)]; cmdtp++) {
- ulong addr;
-
- addr = (ulong) (cmdtp->cmd) + gd->reloc_off;
- cmdtp->cmd = (int (*)(struct cmd_tbl_s *, int, int, char *[]))addr;
-
- addr = (ulong)(cmdtp->name) + gd->reloc_off;
- cmdtp->name = (char *)addr;
-
- if (cmdtp->usage) {
- addr = (ulong)(cmdtp->usage) + gd->reloc_off;
- cmdtp->usage = (char *)addr;
- }
-#ifdef CONFIG_SYS_LONGHELP
- if (cmdtp->help) {
- addr = (ulong)(cmdtp->help) + gd->reloc_off;
- cmdtp->help = (char *)addr;
- }
-#endif
- }
- return 0;
-}
#define BOOTFLAG_WARM 0x02 /* Software reboot */
#define CONFIG_MISC_INIT_F 1 /* Use misc_init_f() */
-#define CONFIG_MISC_INIT_R 1 /* Use misc_init_r() */
#define CONFIG_HIGH_BATS 1 /* High BATs supported */