diff options
author | Tom Rini <trini@ti.com> | 2014-01-09 16:05:32 (GMT) |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-01-09 16:05:32 (GMT) |
commit | 8401bfa91ef57e331e2a3abdf768d41803bec88e (patch) | |
tree | 144e43bb5db26b33fcbadbb52d80760af2f70d04 /common | |
parent | 33d413fc91e0bbbb92962a80f5333d6f1f628c5b (diff) | |
parent | c5c1af21764d9423b45c1d03e835c4547a8bc5cb (diff) | |
download | u-boot-8401bfa91ef57e331e2a3abdf768d41803bec88e.tar.xz |
Merge branch 'master' of git://git.denx.de/u-boot-mmc
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_mmc.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index 67a94a7..da5fef9 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -340,6 +340,28 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } #endif /* CONFIG_SUPPORT_EMMC_BOOT */ } + + else if (argc == 3 && strcmp(argv[1], "setdsr") == 0) { + struct mmc *mmc = find_mmc_device(curr_device); + u32 val = simple_strtoul(argv[2], NULL, 16); + int ret; + + if (!mmc) { + printf("no mmc device at slot %x\n", curr_device); + return 1; + } + ret = mmc_set_dsr(mmc, val); + printf("set dsr %s\n", (!ret) ? "OK, force rescan" : "ERROR"); + if (!ret) { + mmc->has_init = 0; + if (mmc_init(mmc)) + return 1; + else + return 0; + } + return ret; + } + state = MMC_INVALID; if (argc == 5 && strcmp(argv[1], "read") == 0) state = MMC_READ; @@ -423,5 +445,6 @@ U_BOOT_CMD( "mmc bootpart <device num> <boot part size MB> <RPMB part size MB>\n" " - change sizes of boot and RPMB partitions of specified device\n" #endif + "mmc setdsr - set DSR register value\n" ); #endif /* !CONFIG_GENERIC_MMC */ |