diff options
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/bootm.c | 2 | ||||
| -rw-r--r-- | cmd/mem.c | 40 | ||||
| -rw-r--r-- | cmd/spl.c | 23 | ||||
| -rw-r--r-- | cmd/terminal.c | 2 |
4 files changed, 25 insertions, 42 deletions
diff --git a/cmd/bootm.c b/cmd/bootm.c index bee683d0580..2c5aea26d98 100644 --- a/cmd/bootm.c +++ b/cmd/bootm.c @@ -572,7 +572,7 @@ static int do_imls(struct cmd_tbl *cmdtp, int flag, int argc, if (ret_nand) return ret_nand; - return (0); + return 0; } U_BOOT_CMD( diff --git a/cmd/mem.c b/cmd/mem.c index b8afe62e474..d5d7ca2790b 100644 --- a/cmd/mem.c +++ b/cmd/mem.c @@ -712,19 +712,16 @@ static int do_mem_loopw(struct cmd_tbl *cmdtp, int flag, int argc, #endif /* CONFIG_LOOPW */ #ifdef CONFIG_CMD_MEMTEST -static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr, - vu_long *dummy) +static ulong mem_test_alt(volatile ulong *buf, ulong start_addr, ulong end_addr, + volatile ulong *dummy) { - vu_long *addr; + volatile ulong *addr; ulong errs = 0; ulong val, readback; int j; - vu_long offset; - vu_long test_offset; - vu_long pattern; - vu_long temp; - vu_long anti_pattern; - vu_long num_words; + ulong offset, test_offset; + ulong pattern, anti_pattern; + ulong temp, num_words; static const ulong bitpattern[] = { 0x00000001, /* single bit */ 0x00000003, /* two adjacent bits */ @@ -735,8 +732,10 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr, 0x00000055, /* four non-adjacent bits */ 0xaaaaaaaa, /* alternating 1/0 */ }; + /* Rate-limit schedule() calls to one for every 256 words. */ + u8 count = 0; - num_words = (end_addr - start_addr) / sizeof(vu_long); + num_words = (end_addr - start_addr) / sizeof(ulong); /* * Data line test: write a pattern to the first @@ -818,8 +817,8 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr, * * Returns: 0 if the test succeeds, 1 if the test fails. */ - pattern = (vu_long)0xaaaaaaaaaaaaaaaa; - anti_pattern = (vu_long)0x5555555555555555; + pattern = (ulong)0xaaaaaaaaaaaaaaaa; + anti_pattern = (ulong)0x5555555555555555; debug("%s:%d: length = 0x%.8lx\n", __func__, __LINE__, num_words); /* @@ -840,7 +839,7 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr, if (temp != pattern) { printf("\nFAILURE: Address bit stuck high @ 0x%.8lx:" " expected 0x%.8lx, actual 0x%.8lx\n", - start_addr + offset*sizeof(vu_long), + start_addr + offset*sizeof(ulong), pattern, temp); errs++; if (ctrlc()) @@ -862,7 +861,7 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr, printf("\nFAILURE: Address bit stuck low or" " shorted @ 0x%.8lx: expected 0x%.8lx," " actual 0x%.8lx\n", - start_addr + offset*sizeof(vu_long), + start_addr + offset*sizeof(ulong), pattern, temp); errs++; if (ctrlc()) @@ -890,7 +889,8 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr, * Fill memory with a known pattern. */ for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) { - schedule(); + if (!count++) + schedule(); addr[offset] = pattern; } @@ -898,12 +898,13 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr, * Check each location and invert it for the second pass. */ for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) { - schedule(); + if (!count++) + schedule(); temp = addr[offset]; if (temp != pattern) { printf("\nFAILURE (read/write) @ 0x%.8lx:" " expected 0x%.8lx, actual 0x%.8lx)\n", - start_addr + offset*sizeof(vu_long), + start_addr + offset*sizeof(ulong), pattern, temp); errs++; if (ctrlc()) @@ -918,13 +919,14 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr, * Check each location for the inverted pattern and zero it. */ for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) { - schedule(); + if (!count++) + schedule(); anti_pattern = ~pattern; temp = addr[offset]; if (temp != anti_pattern) { printf("\nFAILURE (read/write): @ 0x%.8lx:" " expected 0x%.8lx, actual 0x%.8lx)\n", - start_addr + offset*sizeof(vu_long), + start_addr + offset*sizeof(ulong), anti_pattern, temp); errs++; if (ctrlc()) diff --git a/cmd/spl.c b/cmd/spl.c index 379b512f1ff..f591dc07fb6 100644 --- a/cmd/spl.c +++ b/cmd/spl.c @@ -30,19 +30,6 @@ static const char **subcmd_list[] = { #endif NULL, }, - [SPL_EXPORT_ATAGS] = (const char * []) { -#ifdef CONFIG_SUPPORT_PASSING_ATAGS - "start", - "loados", -#ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH - "ramdisk", -#endif - "cmdline", - "bdt", - "prep", -#endif - NULL, - }, NULL }; @@ -96,7 +83,6 @@ static int call_bootm(int argc, char *const argv[], const char *subcommand[]) static struct cmd_tbl cmd_spl_export_sub[] = { U_BOOT_CMD_MKENT(fdt, 0, 1, (void *)SPL_EXPORT_FDT, "", ""), - U_BOOT_CMD_MKENT(atags, 0, 1, (void *)SPL_EXPORT_ATAGS, "", ""), }; static int spl_export(struct cmd_tbl *cmdtp, int flag, int argc, @@ -128,10 +114,6 @@ static int spl_export(struct cmd_tbl *cmdtp, int flag, int argc, #endif break; #endif - case SPL_EXPORT_ATAGS: - printf("Argument image is now in RAM at: 0x%p\n", - (void *)gd->bd->bi_boot_params); - break; } } else { /* Unrecognized command */ @@ -176,11 +158,10 @@ static int do_spl(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) U_BOOT_CMD( spl, 6 , 1, do_spl, "SPL configuration", - "export <img=atags|fdt> [kernel_addr] [initrd_addr] [fdt_addr]\n" - "\timg\t\t\"atags\" or \"fdt\"\n" + "export fdt [kernel_addr] [initrd_addr] [fdt_addr]\n" "\tkernel_addr\taddress where a kernel image is stored.\n" "\t\t\tkernel is loaded as part of the boot process, but it is not started.\n" "\tinitrd_addr\taddress of initial ramdisk\n" "\t\t\tcan be set to \"-\" if fdt_addr without initrd_addr is used.\n" - "\tfdt_addr\tin case of fdt, the address of the device tree.\n" + "\tfdt_addr\tthe address of the device tree.\n" ); diff --git a/cmd/terminal.c b/cmd/terminal.c index d803bc6c896..14610694255 100644 --- a/cmd/terminal.c +++ b/cmd/terminal.c @@ -24,7 +24,7 @@ int do_terminal(struct cmd_tbl *cmd, int flag, int argc, char *const argv[]) if (!dev) return -1; - if (IS_ENABLED(CONFIG_SERIAL)) + if (IS_ENABLED(CONFIG_SERIAL) && !IS_ENABLED(CONFIG_DM_SERIAL)) serial_reinit_all(); printf("Entering terminal mode for port %s\n", dev->name); |
