diff options
author | Simon Glass <sjg@chromium.org> | 2016-02-29 15:25:52 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-03-14 15:34:50 -0600 |
commit | 2a981dc2c62c500110aad297fa70503aec36e689 (patch) | |
tree | a2098718e857b136986ee0401a40037b16e51a3a /cmd/ide.c | |
parent | bcce53d048de7f41078d25e39aa2f26d752d3658 (diff) |
dm: block: Adjust device calls to go through helpers function
To ease conversion to driver model, add helper functions which deal with
calling each block device method. With driver model we can reimplement these
functions with the same arguments.
Use inline functions to avoid increasing code size on some boards.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'cmd/ide.c')
-rw-r--r-- | cmd/ide.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/ide.c b/cmd/ide.c index dfd55480b7c..c4c08c8855d 100644 --- a/cmd/ide.c +++ b/cmd/ide.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <blk.h> #include <config.h> #include <watchdog.h> #include <command.h> @@ -203,8 +204,7 @@ int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) #endif dev_desc = &ide_dev_desc[curr_device]; - n = dev_desc->block_read(dev_desc, blk, cnt, - (ulong *)addr); + n = blk_dread(dev_desc, blk, cnt, (ulong *)addr); /* flush cache after read */ flush_cache(addr, cnt * ide_dev_desc[curr_device].blksz); |