From patchwork Thu May 8 05:23:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 346894 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id BBA9F140198 for ; Thu, 8 May 2014 15:24:00 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CC1EF4B606; Thu, 8 May 2014 07:23:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aaaRotFXYUm6; Thu, 8 May 2014 07:23:58 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CACDC4B608; Thu, 8 May 2014 07:23:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9C9934B608 for ; Thu, 8 May 2014 07:23:52 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aqfuvezyqZJv for ; Thu, 8 May 2014 07:23:49 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by theia.denx.de (Postfix) with ESMTPS id 542C14B606 for ; Thu, 8 May 2014 07:23:45 +0200 (CEST) Received: by mail-pa0-f43.google.com with SMTP id hz1so2238352pad.2 for ; Wed, 07 May 2014 22:23:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Xz8ESLgw+eos7NgWMcLg8Tn2MzUvaYsGirq6FAu/pYc=; b=bLnrYVJuJG+tKd3ltJ6k5+Xt6KDpXpvAULqFFktqOWEWgDeTsjyVUy7iJ/nHYTpCJv W8xQbbRKFyMJoOnVqImRggaZ3cRRG1xDeNYlD9ZwEId1dTnRrl6ppi+E+Q7IkM/GP/zv 5TyQe+MqS13gn1WMWBwedZIl+OwNoQAAxZqClQf0HLCyA09L2wkTi5lZgBLxnH8rs3Gy v5kidFrHilKTe33x8CRYZenkVNcyTkvF+S6YLD8lfiQa9i4HKogYeNADuRG4OLE1uKZZ EBLs0Z/tg5/T6DU5wmF1KTSrimA2g4ixQDYL8gA6/2VFGA/RdnwDuILEQQ6XKHPdcFhJ 8WjA== X-Gm-Message-State: ALoCoQlmRVwUt5Xg5MEkTme/IOKGQoAfHoHZllL2iKvLFua0uoVGQNIbjLSkJyLdp9PfJe/GwKbY X-Received: by 10.66.122.72 with SMTP id lq8mr3218659pab.69.1399526623418; Wed, 07 May 2014 22:23:43 -0700 (PDT) Received: from tharvey-gw.gw (68-189-91-139.static.snlo.ca.charter.com. [68.189.91.139]) by mx.google.com with ESMTPSA id nw13sm123505672pab.37.2014.05.07.22.23.41 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 May 2014 22:23:42 -0700 (PDT) From: Tim Harvey To: Stefano Babic Date: Wed, 7 May 2014 22:23:35 -0700 Message-Id: <1399526615-12204-1-git-send-email-tharvey@gateworks.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1399353758-1351-1-git-send-email-tharvey@gateworks.com> References: <1399353758-1351-1-git-send-email-tharvey@gateworks.com> Cc: Tom Rini , u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2] dwc_ahsata: return failure for MX6 if not IMX6Q/IMX6D X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- v2: - remove print as this condition isn't really an error just something not possible --- drivers/block/dwc_ahsata.c | 5 +++++ 1 file changed, 5 insertions(+) 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 #include #include +#include #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;