Re: [U-Boot] [PATCH 2/4] ata: ahci: Don't cap AHCI port count under CONFIG_DM_SCSI
Hi, On 09/14/2018 01:55 PM, Simon Glass wrote: On 13 September 2018 at 00:28, Tuomas Tynkkynen wrote: When using device model this sort of hardcoded limits aren't used or necessary. Signed-off-by: Tuomas Tynkkynen --- drivers/ata/ahci.c | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Simon Glass But please see below diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 333f0457f6..5fafb63aeb 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -230,8 +230,10 @@ static int ahci_host_init(struct ahci_uc_priv *uc_priv) debug("cap 0x%x port_map 0x%x n_ports %d\n", uc_priv->cap, uc_priv->port_map, uc_priv->n_ports); +#if !defined(CONFIG_DM_SCSI) Can you use this instead? if (IS_DEFINED(CONFIG_DM_SCSI)) No, that won't work because after patch 3 CONFIG_SYS_SCSI_MAX_SCSI_ID won't be defined for boards using CONFIG_DM_SCSI, so using the preprocessor is necessary. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 2/4] ata: ahci: Don't cap AHCI port count under CONFIG_DM_SCSI
On 13 September 2018 at 00:28, Tuomas Tynkkynen wrote: > When using device model this sort of hardcoded limits aren't used or > necessary. > > Signed-off-by: Tuomas Tynkkynen > --- > drivers/ata/ahci.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Simon Glass But please see below > > diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c > index 333f0457f6..5fafb63aeb 100644 > --- a/drivers/ata/ahci.c > +++ b/drivers/ata/ahci.c > @@ -230,8 +230,10 @@ static int ahci_host_init(struct ahci_uc_priv *uc_priv) > debug("cap 0x%x port_map 0x%x n_ports %d\n", > uc_priv->cap, uc_priv->port_map, uc_priv->n_ports); > > +#if !defined(CONFIG_DM_SCSI) Can you use this instead? if (IS_DEFINED(CONFIG_DM_SCSI)) > if (uc_priv->n_ports > CONFIG_SYS_SCSI_MAX_SCSI_ID) > uc_priv->n_ports = CONFIG_SYS_SCSI_MAX_SCSI_ID; > +#endif > > for (i = 0; i < uc_priv->n_ports; i++) { > if (!(port_map & (1 << i))) > -- > 2.16.3 > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/4] ata: ahci: Don't cap AHCI port count under CONFIG_DM_SCSI
When using device model this sort of hardcoded limits aren't used or necessary. Signed-off-by: Tuomas Tynkkynen --- drivers/ata/ahci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 333f0457f6..5fafb63aeb 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -230,8 +230,10 @@ static int ahci_host_init(struct ahci_uc_priv *uc_priv) debug("cap 0x%x port_map 0x%x n_ports %d\n", uc_priv->cap, uc_priv->port_map, uc_priv->n_ports); +#if !defined(CONFIG_DM_SCSI) if (uc_priv->n_ports > CONFIG_SYS_SCSI_MAX_SCSI_ID) uc_priv->n_ports = CONFIG_SYS_SCSI_MAX_SCSI_ID; +#endif for (i = 0; i < uc_priv->n_ports; i++) { if (!(port_map & (1 << i))) -- 2.16.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot