[U-Boot] [PATCH] The sata port can be configured when driver model enabled.
liu hao
steven_hao5189 at outlook.com
Mon Nov 4 07:06:24 UTC 2019
- CONFIG_SYS_SCSI_MAX_SCSI_ID
- CONFIG_SYS_SCSI_MAX_LUN
- These two configs can be used here.
Signed-off-by: Steven Hao <steven_hao5189 at outlook.com>
---
Changes for v1:
- The sata driver only support 2 ports.
It is not suited for all user.
We can make it can be configured.
---
drivers/ata/ahci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index d10f9f0..594982c 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1167,8 +1167,8 @@ int ahci_probe_scsi(struct udevice *ahci_dev, ulong base)
return -ENODEV;
uc_plat = dev_get_uclass_platdata(dev);
uc_plat->base = base;
- uc_plat->max_lun = 1;
- uc_plat->max_id = 2;
+ uc_plat->max_lun = CONFIG_SYS_SCSI_MAX_LUN;
+ uc_plat->max_id = CONFIG_SYS_SCSI_MAX_SCSI_ID;
uc_priv = dev_get_uclass_priv(ahci_dev);
ret = ahci_init_one(uc_priv, dev);
--
2.7.4
More information about the U-Boot
mailing list