summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJonas Karlman <jonas@kwiboo.se>2023-07-22 17:02:12 +0300
committerKever Yang <kever.yang@rock-chips.com>2023-07-28 13:45:03 +0300
commit7af6616c961d213b4bf2cc88003cbd868ea11ffa (patch)
treead9cbf3edf7b6d562dadc7c6b88e4c7f8e0825b5 /drivers
parent96bdc655b09f248f1dbb0d10436437f1b45a47ec (diff)
downloadu-boot-7af6616c961d213b4bf2cc88003cbd868ea11ffa.tar.xz
ata: dwc_ahci: Fix support for other platforms
The dwc_ahci driver use platform specific defines, place the platform specific code behind a ifdef CONFIG_ARCH_OMAP2PLUS to allow build and use of the driver on Rockchip platform. Fixes: 02a4b4297901 ("drivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata device") Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/dwc_ahci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ata/dwc_ahci.c b/drivers/ata/dwc_ahci.c
index 826fea71cc..1dc91e7fce 100644
--- a/drivers/ata/dwc_ahci.c
+++ b/drivers/ata/dwc_ahci.c
@@ -13,7 +13,9 @@
#include <ahci.h>
#include <scsi.h>
#include <sata.h>
+#ifdef CONFIG_ARCH_OMAP2PLUS
#include <asm/arch/sata.h>
+#endif
#include <asm/io.h>
#include <generic-phy.h>
@@ -72,12 +74,14 @@ static int dwc_ahci_probe(struct udevice *dev)
return ret;
}
+#ifdef CONFIG_ARCH_OMAP2PLUS
if (priv->wrapper_base) {
u32 val = TI_SATA_IDLE_NO | TI_SATA_STANDBY_NO;
/* Enable SATA module, No Idle, No Standby */
writel(val, priv->wrapper_base + TI_SATA_SYSCONFIG);
}
+#endif
return ahci_probe_scsi(dev, (ulong)priv->base);
}