imx: sata: return failure if not IMX6Q/IMX6D
authorTim Harvey <tharvey@gateworks.com>
Thu, 8 May 2014 05:24:47 +0000 (22:24 -0700)
committerStefano Babic <sbabic@denx.de>
Fri, 6 Jun 2014 08:14:52 +0000 (10:14 +0200)
The IMX6QUAD/DUAL have SATA, but the IMX6SOLO/DL do not. Return
instead of configuring the SATA clock and GPR13 registers.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
arch/arm/imx-common/sata.c

index 2e69486..c10dd28 100644 (file)
@@ -8,13 +8,18 @@
 #include <asm/arch/iomux.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
+#include <asm/arch/sys_proto.h>
 
 int setup_sata(void)
 {
        struct iomuxc_base_regs *const iomuxc_regs
                = (struct iomuxc_base_regs *)IOMUXC_BASE_ADDR;
+       int ret;
 
-       int ret = enable_sata_clock();
+       if (!is_cpu_type(MXC_CPU_MX6Q) && !is_cpu_type(MXC_CPU_MX6D))
+               return 1;
+
+       ret = enable_sata_clock();
        if (ret)
                return ret;