diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2018-10-15 02:21:07 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-11-14 09:16:27 -0800 |
commit | d0851c8937067ad396f2bdafc46d0326bf3317db (patch) | |
tree | ac5d2b7aa32a96f248b61b5559aa3e7fc961e951 /cmd | |
parent | f26ce03b444ac97448eca0cc58071f5fa8ffc3bd (diff) | |
download | u-boot-d0851c8937067ad396f2bdafc46d0326bf3317db.tar.gz |
blk: Call part_init() in the post_probe() method
part_init() is currently called in every DM BLK driver, either
in its bind() or probe() method. However we can use the BLK
uclass driver's post_probe() method to do it automatically.
Update all DM BLK drivers to adopt this change.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/sata.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/cmd/sata.c b/cmd/sata.c index 4f0c6e0137..6d62ba8f74 100644 --- a/cmd/sata.c +++ b/cmd/sata.c @@ -51,7 +51,6 @@ int sata_probe(int devnum) { #ifdef CONFIG_AHCI struct udevice *dev; - struct udevice *blk; int rc; rc = uclass_get_device(UCLASS_AHCI, devnum, &dev); @@ -67,14 +66,6 @@ int sata_probe(int devnum) return CMD_RET_FAILURE; } - rc = blk_get_from_parent(dev, &blk); - if (!rc) { - struct blk_desc *desc = dev_get_uclass_platdata(blk); - - if (desc->lba > 0 && desc->blksz > 0) - part_init(desc); - } - return 0; #else return sata_initialize() < 0 ? CMD_RET_FAILURE : CMD_RET_SUCCESS; |