summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-08-04 22:34:39 (GMT)
committerTom Rini <trini@konsulko.com>2017-08-11 19:41:53 (GMT)
commitb75dfd2d4675e660ab20806641a063cdb65e99a0 (patch)
tree3c9c226c8cf36c4487a610e7291e2643b4d262cb /cmd
parent6f62d7c4f7a2242a76e19b09dccca6f68776e788 (diff)
downloadu-boot-fsl-qoriq-b75dfd2d4675e660ab20806641a063cdb65e99a0.tar.xz
Kconfig: Convert CMD_READ to Kconfig
Convert this option and enable it in sandbox. Also correct a bug which was introduced with the block-device driver model conversion. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Kconfig5
-rw-r--r--cmd/read.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index ef614a6..0d9292b 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -749,6 +749,11 @@ config CMD_PCMCIA
about 1990. These devices are typically removable memory or network
cards using a standard 68-pin connector.
+config CMD_READ
+ bool "read - Read binary data from a partition"
+ help
+ Provides low-level access to the data in a partition.
+
config CMD_REMOTEPROC
bool "remoteproc"
depends on REMOTEPROC
diff --git a/cmd/read.c b/cmd/read.c
index 61d8ce7..ecf9254 100644
--- a/cmd/read.c
+++ b/cmd/read.c
@@ -66,7 +66,7 @@ int do_read(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 1;
}
- if (blk_read(dev_desc, offset + blk, cnt, addr) < 0) {
+ if (blk_dread(dev_desc, offset + blk, cnt, addr) < 0) {
printf("Error reading blocks\n");
return 1;
}