From: Ken Ma <[email protected]>

- When scsi controller acts as a bus, we need to bind its children
  scsi devices(scsi hdd, cd, dvd, scanner) to their drivers as spi
  controller binds spi flashes, so scsi-uclass's post bind function
  calls dm_scan_fdt_dev() to bind scsi subnode devices;
- When scsi controller is a Serial Attached SCSI, it can also work as
  a pure controller as an on-board component on the motherboard, it may
  has no subnodes in fdt, then dm_scan_fdt_dev() does nothing and has
  no effect.

Signed-off-by: Ken Ma <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefan Roese <[email protected]>
Cc: Michal Simek <[email protected]>
Reviewed-on: http://vgitil04.il.marvell.com:8080/35425
Tested-by: iSoC Platform CI <[email protected]>
Reviewed-by: Omri Itach <[email protected]>
Reviewed-by: Kostya Porotchkin <[email protected]>
---
 drivers/block/scsi-uclass.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/block/scsi-uclass.c b/drivers/block/scsi-uclass.c
index 3bf026b..86eddfc 100644
--- a/drivers/block/scsi-uclass.c
+++ b/drivers/block/scsi-uclass.c
@@ -45,6 +45,9 @@ static int scsi_post_bind(struct udevice *dev)
 {
        /* Get uclass plat data from fdt */
        scsi_ofdata_to_uclass_platdata(dev);
+
+       /* bind subnode devices */
+       return dm_scan_fdt_dev(dev);
 }
 
 UCLASS_DRIVER(scsi) = {
-- 
1.9.1

_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to