[U-Boot] [PATCH] The sata port can be configured when driver model enabled.

- 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@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);

On Mon, Nov 04, 2019 at 07:06:24AM +0000, liu hao wrote:
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@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.
This breaks boards such as A20-OLinuXino_MICRO-eMMC
participants (2)
-
liu hao
-
Tom Rini