From mboxrd@z Thu Jan 1 00:00:00 1970 From: Troy Kisky Date: Tue, 06 May 2014 12:55:31 -0700 Subject: [U-Boot] [PATCH] dwc_ahsata: return failure for MX6 if not IMX6Q In-Reply-To: <1399353758-1351-1-git-send-email-tharvey@gateworks.com> References: <1399353758-1351-1-git-send-email-tharvey@gateworks.com> Message-ID: <53693E33.5000809@boundarydevices.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 5/5/2014 10:22 PM, Tim Harvey wrote: > The IMX6QUAD/DUAL have SATA, but the IMX6SOLO/DL do not. Return an error > indicating no such port instead of attempting a memory access that results > in a data abort and reset. This dynamic detection is necessary for bootloaders > that support multiple variants of the IMX6 SoC. > > Signed-off-by: Tim Harvey > --- > drivers/block/dwc_ahsata.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/block/dwc_ahsata.c b/drivers/block/dwc_ahsata.c > index 3569214..638a585 100644 > --- a/drivers/block/dwc_ahsata.c > +++ b/drivers/block/dwc_ahsata.c > @@ -17,6 +17,7 @@ > #include > #include > #include > +#include > #include "dwc_ahsata.h" > > struct sata_port_regs { > @@ -558,6 +559,12 @@ 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) is needed too ? Troy