summaryrefslogtreecommitdiffstats
path: root/disk/part_amiga.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2015-12-07 11:38:48 -0700
committerTom Rini <trini@konsulko.com>2016-01-13 21:05:18 -0500
commit7c4213f6a52f35ff6ba2d97aa4eb04cbfc963b86 (patch)
tree8dfb6b9f5721891de191bad798b0533e3a0bf69a /disk/part_amiga.c
parentadc421e4cee8275cd99367b3b455ffbb5ead3990 (diff)
downloadblackbird-obmc-uboot-7c4213f6a52f35ff6ba2d97aa4eb04cbfc963b86.tar.gz
blackbird-obmc-uboot-7c4213f6a52f35ff6ba2d97aa4eb04cbfc963b86.zip
block: pass block dev not num to read/write/erase()
This will allow the implementation to make use of data in the block_dev structure beyond the base device number. This will be useful so that eMMC block devices can encompass the HW partition ID rather than treating this out-of-band. Equally, the existence of the priv field is crying out for this patch to exist. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'disk/part_amiga.c')
-rw-r--r--disk/part_amiga.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/disk/part_amiga.c b/disk/part_amiga.c
index 260a3d5e87..57c1b9d055 100644
--- a/disk/part_amiga.c
+++ b/disk/part_amiga.c
@@ -140,8 +140,7 @@ struct rigid_disk_block *get_rdisk(block_dev_desc_t *dev_desc)
for (i=0; i<limit; i++)
{
- ulong res = dev_desc->block_read(dev_desc->dev, i, 1,
- (ulong *)block_buffer);
+ ulong res = dev_desc->block_read(dev_desc, i, 1, (ulong *)block_buffer);
if (res == 1)
{
struct rigid_disk_block *trdb = (struct rigid_disk_block *)block_buffer;
@@ -183,7 +182,7 @@ struct bootcode_block *get_bootcode(block_dev_desc_t *dev_desc)
for (i = 0; i < limit; i++)
{
- ulong res = dev_desc->block_read(dev_desc->dev, i, 1, (ulong *)block_buffer);
+ ulong res = dev_desc->block_read(dev_desc, i, 1, (ulong *)block_buffer);
if (res == 1)
{
struct bootcode_block *boot = (struct bootcode_block *)block_buffer;
@@ -258,7 +257,7 @@ static struct partition_block *find_partition(block_dev_desc_t *dev_desc, int pa
while (block != 0xFFFFFFFF)
{
- ulong res = dev_desc->block_read(dev_desc->dev, block, 1,
+ ulong res = dev_desc->block_read(dev_desc, block, 1,
(ulong *)block_buffer);
if (res == 1)
{
@@ -354,8 +353,7 @@ void print_part_amiga (block_dev_desc_t *dev_desc)
PRINTF("Trying to load block #0x%X\n", block);
- res = dev_desc->block_read(dev_desc->dev, block, 1,
- (ulong *)block_buffer);
+ res = dev_desc->block_read(dev_desc, block, 1, (ulong *)block_buffer);
if (res == 1)
{
p = (struct partition_block *)block_buffer;
OpenPOWER on IntegriCloud