summaryrefslogtreecommitdiff
path: root/disk/part_amiga.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_amiga.c
parentbcce53d048de7f41078d25e39aa2f26d752d3658 (diff)
downloadu-boot-imx-2a981dc2c62c500110aad297fa70503aec36e689.zip
u-boot-imx-2a981dc2c62c500110aad297fa70503aec36e689.tar.gz
u-boot-imx-2a981dc2c62c500110aad297fa70503aec36e689.tar.bz2
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_amiga.c')
-rw-r--r--disk/part_amiga.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/disk/part_amiga.c b/disk/part_amiga.c
index d323b4b..4a67689 100644
--- a/disk/part_amiga.c
+++ b/disk/part_amiga.c
@@ -140,7 +140,7 @@ struct rigid_disk_block *get_rdisk(struct blk_desc *dev_desc)
for (i=0; i<limit; i++)
{
- ulong res = dev_desc->block_read(dev_desc, i, 1, (ulong *)block_buffer);
+ ulong res = blk_dread(dev_desc, i, 1, (ulong *)block_buffer);
if (res == 1)
{
struct rigid_disk_block *trdb = (struct rigid_disk_block *)block_buffer;
@@ -182,7 +182,7 @@ struct bootcode_block *get_bootcode(struct blk_desc *dev_desc)
for (i = 0; i < limit; i++)
{
- ulong res = dev_desc->block_read(dev_desc, i, 1, (ulong *)block_buffer);
+ ulong res = blk_dread(dev_desc, i, 1, (ulong *)block_buffer);
if (res == 1)
{
struct bootcode_block *boot = (struct bootcode_block *)block_buffer;
@@ -258,8 +258,7 @@ static struct partition_block *find_partition(struct blk_desc *dev_desc,
while (block != 0xFFFFFFFF)
{
- ulong res = dev_desc->block_read(dev_desc, block, 1,
- (ulong *)block_buffer);
+ ulong res = blk_dread(dev_desc, block, 1, (ulong *)block_buffer);
if (res == 1)
{
p = (struct partition_block *)block_buffer;
@@ -355,7 +354,7 @@ static void print_part_amiga(struct blk_desc *dev_desc)
PRINTF("Trying to load block #0x%X\n", block);
- res = dev_desc->block_read(dev_desc, block, 1, (ulong *)block_buffer);
+ res = blk_dread(dev_desc, block, 1, (ulong *)block_buffer);
if (res == 1)
{
p = (struct partition_block *)block_buffer;