[lib][bio] Add erase geometry to lib/bio
Extend the block i/o system to allow registered devices to advertise an erase geometry. Devices which do not need to be explicitly erased may skip this. Extent the Zynq spiflash code to publish the erase geometry as read from the flash device. Signed-off-by: John Grossman <johngro@google.com> Change-Id: I42e16fbe9a0fcf8334c317f16dea1c551c203eb2
This commit is contained in:
committed by
Travis Geiselbrecht
parent
8028f42df6
commit
8a7219ddb1
@@ -78,7 +78,7 @@ void platform_init_blkdev(void)
|
||||
if (get_blkdev_len() == 0)
|
||||
return;
|
||||
|
||||
bio_initialize_bdev(&dev, "block0", 512, get_blkdev_len() / 512);
|
||||
bio_initialize_bdev(&dev, "block0", 512, get_blkdev_len() / 512, 0, NULL);
|
||||
|
||||
// fill in hooks
|
||||
dev.read_block = &read_block;
|
||||
|
||||
Reference in New Issue
Block a user