]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ata: dwc_ahci: Fix support for other platforms
authorJonas Karlman <jonas@kwiboo.se>
Sat, 22 Jul 2023 14:02:12 +0000 (14:02 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 28 Jul 2023 10:45:03 +0000 (18:45 +0800)
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>
drivers/ata/dwc_ahci.c

index 826fea71cc5b3718c0d661af361338d2f2a972e1..1dc91e7fce70c5957cec3b6ae9546d4d4d79fc58 100644 (file)
@@ -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);
 }