diff options
Diffstat (limited to 'cmd/disk.c')
-rw-r--r-- | cmd/disk.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/disk.c b/cmd/disk.c index 106f2d1a3b5..2fd1717e6a4 100644 --- a/cmd/disk.c +++ b/cmd/disk.c @@ -20,7 +20,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, #if defined(CONFIG_IMAGE_FORMAT_LEGACY) image_header_t *hdr; #endif - block_dev_desc_t *dev_desc; + struct blk_desc *dev_desc; #if CONFIG_IS_ENABLED(FIT) const void *fit_hdr = NULL; @@ -38,14 +38,14 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, bootstage_mark(BOOTSTAGE_ID_IDE_BOOT_DEVICE); - part = get_device_and_partition(intf, (argc == 3) ? argv[2] : NULL, + part = blk_get_device_part_str(intf, (argc == 3) ? argv[2] : NULL, &dev_desc, &info, 1); if (part < 0) { bootstage_error(BOOTSTAGE_ID_IDE_TYPE); return 1; } - dev = dev_desc->dev; + dev = dev_desc->devnum; bootstage_mark(BOOTSTAGE_ID_IDE_TYPE); printf("\nLoading from %s device %d, partition %d: " @@ -56,7 +56,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, ", Block Size: %ld\n", info.start, info.size, info.blksz); - if (dev_desc->block_read(dev_desc, info.start, 1, (ulong *)addr) != 1) { + if (blk_dread(dev_desc, info.start, 1, (ulong *)addr) != 1) { printf("** Read error on %d:%d\n", dev, part); bootstage_error(BOOTSTAGE_ID_IDE_PART_READ); return 1; @@ -100,8 +100,8 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, cnt /= info.blksz; cnt -= 1; - if (dev_desc->block_read(dev_desc, info.start + 1, cnt, - (ulong *)(addr + info.blksz)) != cnt) { + if (blk_dread(dev_desc, info.start + 1, cnt, + (ulong *)(addr + info.blksz)) != cnt) { printf("** Read error on %d:%d\n", dev, part); bootstage_error(BOOTSTAGE_ID_IDE_READ); return 1; |