summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2014-05-07 22:23:35 -0700
committerStefano Babic <sbabic@denx.de>2014-06-06 10:14:07 +0200
commitca84d72d1cfd7629118abce15c0b24cd7413692c (patch)
tree602e082e01b5727af614ab79b7409c000c1e1ea3
parent0cc11dea89861802c2f278830e5d97b32c3fef4d (diff)
downloadu-boot-imx-ca84d72d1cfd7629118abce15c0b24cd7413692c.zip
u-boot-imx-ca84d72d1cfd7629118abce15c0b24cd7413692c.tar.gz
u-boot-imx-ca84d72d1cfd7629118abce15c0b24cd7413692c.tar.bz2
dwc_ahsata: return failure for MX6 if not IMX6Q/IMX6D
The IMX6QUAD/DUAL have SATA, but the IMX6SOLO/DL do not. Return failure instead of attempting a memory access that results in a data abort and reset. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
-rw-r--r--drivers/block/dwc_ahsata.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/block/dwc_ahsata.c b/drivers/block/dwc_ahsata.c
index 3569214..15d65d7 100644
--- a/drivers/block/dwc_ahsata.c
+++ b/drivers/block/dwc_ahsata.c
@@ -17,6 +17,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <asm/arch/clock.h>
+#include <asm/arch/sys_proto.h>
#include "dwc_ahsata.h"
struct sata_port_regs {
@@ -558,6 +559,10 @@ int init_sata(int dev)
u32 linkmap;
struct ahci_probe_ent *probe_ent = NULL;
+#if defined(CONFIG_MX6)
+ if (!is_cpu_type(MXC_CPU_MX6Q) && !is_cpu_type(MXC_CPU_MX6D))
+ return 1;
+#endif
if (dev < 0 || dev > (CONFIG_SYS_SATA_MAX_DEVICE - 1)) {
printf("The sata index %d is out of ranges\n\r", dev);
return -1;