summaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-08-25 17:24:40 +0300
committerTom Rini <trini@konsulko.com>2020-08-25 20:38:29 +0300
commit9f9ecd3e4d7839e24c182fb7b24937e19b670f1b (patch)
tree4250ad58dba47ae6127d4129b9a19dc648fd064d /drivers/ata
parentec54217ddc6f52f3b7dad7a3fd6d8a3abd64ab7e (diff)
parent6944937f9c4d21f39dd257bce7b677a0f6849cea (diff)
downloadu-boot-9f9ecd3e4d7839e24c182fb7b24937e19b670f1b.tar.xz
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
- Add basic Marvell/Cavium OcteonTX/TX2 support (Suneel) - Infrastructure changes to PCI uclass to support these SoC's (Suneel) - Add PCI, MMC & watchdog driver drivers for OcteonTX/TX2 (Suneel) - Increase CONFIG_SYS_MALLOC_F_LEN for qemu-x86 (Stefan)
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 47cdea1f58..22bc0d3b10 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1198,10 +1198,25 @@ int ahci_probe_scsi(struct udevice *ahci_dev, ulong base)
int ahci_probe_scsi_pci(struct udevice *ahci_dev)
{
ulong base;
+ u16 vendor, device;
base = (ulong)dm_pci_map_bar(ahci_dev, PCI_BASE_ADDRESS_5,
PCI_REGION_MEM);
+ /*
+ * Note:
+ * Right now, we have only one quirk here, which is not enough to
+ * introduce a new Kconfig option to select this. Once we have more
+ * quirks in this AHCI code, we should add a Kconfig option for
+ * this though.
+ */
+ dm_pci_read_config16(ahci_dev, PCI_VENDOR_ID, &vendor);
+ dm_pci_read_config16(ahci_dev, PCI_DEVICE_ID, &device);
+
+ if (vendor == PCI_VENDOR_ID_CAVIUM &&
+ device == PCI_DEVICE_ID_CAVIUM_SATA)
+ base = (uintptr_t)dm_pci_map_bar(ahci_dev, PCI_BASE_ADDRESS_0,
+ PCI_REGION_MEM);
return ahci_probe_scsi(ahci_dev, base);
}
#endif