mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user