summaryrefslogtreecommitdiffstats
path: root/disk/part_iso.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-02-29 15:25:52 -0700
committerSimon Glass <sjg@chromium.org>2016-03-14 15:34:50 -0600
commit2a981dc2c62c500110aad297fa70503aec36e689 (patch)
treea2098718e857b136986ee0401a40037b16e51a3a /disk/part_iso.c
parentbcce53d048de7f41078d25e39aa2f26d752d3658 (diff)
downloadblackbird-obmc-uboot-2a981dc2c62c500110aad297fa70503aec36e689.tar.gz
blackbird-obmc-uboot-2a981dc2c62c500110aad297fa70503aec36e689.zip
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 'disk/part_iso.c')
-rw-r--r--disk/part_iso.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/disk/part_iso.c b/disk/part_iso.c
index c78ae21bf3..76eab3915f 100644
--- a/disk/part_iso.c
+++ b/disk/part_iso.c
@@ -63,7 +63,7 @@ int part_get_info_iso_verb(struct blk_desc *dev_desc, int part_num,
/* the first sector (sector 0x10) must be a primary volume desc */
blkaddr=PVD_OFFSET;
- if (dev_desc->block_read(dev_desc, PVD_OFFSET, 1, (ulong *)tmpbuf) != 1)
+ if (blk_dread(dev_desc, PVD_OFFSET, 1, (ulong *)tmpbuf) != 1)
return -1;
if(ppr->desctype!=0x01) {
if(verb)
@@ -85,7 +85,7 @@ int part_get_info_iso_verb(struct blk_desc *dev_desc, int part_num,
PRINTF(" Lastsect:%08lx\n",lastsect);
for(i=blkaddr;i<lastsect;i++) {
PRINTF("Reading block %d\n", i);
- if (dev_desc->block_read(dev_desc, i, 1, (ulong *)tmpbuf) != 1)
+ if (blk_dread(dev_desc, i, 1, (ulong *)tmpbuf) != 1)
return -1;
if(ppr->desctype==0x00)
break; /* boot entry found */
@@ -105,7 +105,7 @@ int part_get_info_iso_verb(struct blk_desc *dev_desc, int part_num,
}
bootaddr=le32_to_int(pbr->pointer);
PRINTF(" Boot Entry at: %08lX\n",bootaddr);
- if (dev_desc->block_read(dev_desc, bootaddr, 1, (ulong *)tmpbuf) != 1) {
+ if (blk_dread(dev_desc, bootaddr, 1, (ulong *)tmpbuf) != 1) {
if(verb)
printf ("** Can't read Boot Entry at %lX on %d:%d **\n",
bootaddr, dev_desc->devnum, part_num);
OpenPOWER on IntegriCloud