diff options
author | Tom Rini <trini@konsulko.com> | 2020-05-08 13:48:37 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-05-08 13:48:37 -0400 |
commit | ea02cfb6495eb5f54bf239405316746a19d303b2 (patch) | |
tree | e72e4ac835a56441cc6a698342717bcf690ea69a /cmd | |
parent | 67887903afc3615070dd878f6e0420d34b30274c (diff) | |
parent | 702de89cc6a34c1c23dd3d987b0472b2cecdb63c (diff) | |
download | u-boot-ea02cfb6495eb5f54bf239405316746a19d303b2.zip u-boot-ea02cfb6495eb5f54bf239405316746a19d303b2.tar.gz u-boot-ea02cfb6495eb5f54bf239405316746a19d303b2.tar.bz2 |
Merge branch '2020-05-07-more-kconfig-migrations'
- Migrate CONFIG_SET_DFU_ALT_INFO, CONFIG_SYS_MTDPARTS_RUNTIME and
finish the rest of the memtest related options.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/Kconfig | 16 | ||||
-rw-r--r-- | cmd/mem.c | 9 |
2 files changed, 18 insertions, 7 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig index 157a330..f9be198 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -750,6 +750,22 @@ config SYS_ALT_MEMTEST help Use a more complete alternative memory test. +config SYS_MEMTEST_START + hex "default start address for mtest" + default 0 + help + This is the default start address for mtest for simple read/write + test. If no arguments are given to mtest, default address is used + as start address. + +config SYS_MEMTEST_END + hex "default end address for mtest" + default 0x1000 + help + This is the default end address for mtest for simple read/write + test. If no arguments are given to mtest, default address is used + as end address. + endif config CMD_SHA1SUM @@ -25,10 +25,6 @@ DECLARE_GLOBAL_DATA_PTR; -#ifndef CONFIG_SYS_MEMTEST_SCRATCH -#define CONFIG_SYS_MEMTEST_SCRATCH 0 -#endif - static int mod_mem(cmd_tbl_t *, int, int, int, char * const []); /* Display values from last command. @@ -922,7 +918,8 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong start, end; - vu_long *buf, *dummy; + vu_long scratch_space; + vu_long *buf, *dummy = &scratch_space; ulong iteration_limit = 0; ulong count = 0; ulong errs = 0; /* number of errors, or -1 if interrupted */ @@ -958,7 +955,6 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc, start, end); buf = map_sysmem(start, end - start); - dummy = map_sysmem(CONFIG_SYS_MEMTEST_SCRATCH, sizeof(vu_long)); for (iteration = 0; !iteration_limit || iteration < iteration_limit; iteration++) { @@ -988,7 +984,6 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc, } unmap_sysmem((void *)buf); - unmap_sysmem((void *)dummy); if (errs == -1UL) { /* Memory test was aborted - write a newline to finish off */ |