diff options
author | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2022-04-19 10:05:10 +0900 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-04-23 22:05:41 +0200 |
commit | bf76031d19fa82041ae5ddc17214ec71858b0097 (patch) | |
tree | ee0f392110645b0943abbe669cba6b04776ac889 /drivers | |
parent | 43855fdb2c99eae0cdc9b3c54c2d719262d3b3eb (diff) | |
download | u-boot-bf76031d19fa82041ae5ddc17214ec71858b0097.zip u-boot-bf76031d19fa82041ae5ddc17214ec71858b0097.tar.gz u-boot-bf76031d19fa82041ae5ddc17214ec71858b0097.tar.bz2 |
dm: blk: add a device-probe hook for scanning disk partitions
Now that all the block device drivers have enable a probe hook, we will
call part_create_block_devices() to enumerate all the partitions and
create associated udevices when a block device is detected.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/blk-uclass.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index f1e4a85..791e26c 100644 --- a/drivers/block/blk-uclass.c +++ b/drivers/block/blk-uclass.c @@ -741,6 +741,10 @@ static int blk_post_probe(struct udevice *dev) struct blk_desc *desc = dev_get_uclass_plat(dev); part_init(desc); + + if (desc->part_type != PART_TYPE_UNKNOWN && + part_create_block_devices(dev)) + debug("*** creating partitions failed\n"); } return 0; |