
On 05/30/2014 10:56 AM, Steve Rae wrote:
On 14-05-30 08:58 AM, Stephen Warren wrote:
...
What code are you looking at that handles multiple devices sequentially under program control rather than user command control?
Cannot go into too much detail here (yet) -- but imagine the situation where:
- lookup the GPT partition name (in User, Boot1, Boot2)
- do a block_write to the desired location...
So this is all to support some non-upstream code that you can't discuss? That doesn't sound good...
So after discussing with a colleague, we would propose the following. Does this implement what you were proposing?:
Usage (example):
mmc->part_num_next_block_op = 1; /* specify Boot1 partition */ mmc->block_dev.block_read(0, 0, 1, buf); /* read first block from Boot1 partition */ mmc->part_num_next_block_op = 0; /* specify User partition */ mmc->block_dev.block_read(0, 0, 1, buf); /* read first block from User partition */
No. I would propose:
get_device("mmc", "0.1", &bdev_boot1); bdev_boot1->block_read(...); get_device("mmc", "0.0", &bdev_user); bdev_user->block_read(...);
That way, nothing needs to change in block_dev_desc_t, get_device(), etc.