[U-Boot] [PATCH] ahci-pci: Update call to ahci_scsi_probe()

Bin Meng bmeng.cn at gmail.com
Thu Aug 3 01:23:51 UTC 2017


Hi Tom,

On Thu, Aug 3, 2017 at 8:37 AM, Tom Rini <trini at konsulko.com> wrote:
> The function now takes a 'base' argument, and we can provide that by
> having dev_read_addr() get it from the struct uclass dev that we have
> been given.
>

Oops. Thanks for catching this!

> Cc: Bin Meng <bmeng.cn at gmail.com>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
>  drivers/ata/ahci-pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ata/ahci-pci.c b/drivers/ata/ahci-pci.c
> index f46fad899e5a..beec14f46d66 100644
> --- a/drivers/ata/ahci-pci.c
> +++ b/drivers/ata/ahci-pci.c
> @@ -18,7 +18,7 @@ static int ahci_pci_bind(struct udevice *dev)
>
>  static int ahci_pci_probe(struct udevice *dev)
>  {
> -       return ahci_probe_scsi(dev);
> +       return ahci_probe_scsi(dev, dev_read_addr(dev));

But dev_read_addr(dev) does not work here as the AHCI device is on PCI
bus. The base address should be read from PCI configuration space.
There is already an API that does this, see ahci_probe_scsi_pci().

>  }
>
>  static const struct udevice_id ahci_pci_ids[] = {
> --

Regards,
Bin


More information about the U-Boot mailing list