From patchwork Thu May 8 05:24:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 346895 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 F1ABE140198 for ; Thu, 8 May 2014 15:25:04 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B65C54B616; Thu, 8 May 2014 07:25:03 +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 wgR6fnIfEZmG; Thu, 8 May 2014 07:25:03 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3762F4B608; Thu, 8 May 2014 07:25:00 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2788A4B608 for ; Thu, 8 May 2014 07:24: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 tg-KaVQXavbY for ; Thu, 8 May 2014 07:24:57 +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 17CBD4B606 for ; Thu, 8 May 2014 07:24:56 +0200 (CEST) Received: by mail-pa0-f43.google.com with SMTP id hz1so2191162pad.16 for ; Wed, 07 May 2014 22:24:55 -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=D067YjeHSkNNqLJDwutExnbq8OeYcDE17nh3N0nC/j4=; b=ZAUsMr7FykGBOtC1CvB+nnYFoPMeOuNIKE3Sne1pzcVrnU8TP2UacHv+Fn+m19Smzy KwB/r+nCEtCVe6ofAdY+PQSw14V+A29GjmV/rIacGet5Gg8yvQTElZaajhyPfgGoUNCW QjdXy79iXfpYkgT3IP5b71OFUKM39mGsnEMwuLYDjiSTCGO+JpgsAhW00gzejcjHy0Cz ZuWFBnhEJtWnGM4CPelo4sUe38Dj21Cryv/6ETWRIKxskiSvQIZmJjZDAbyRQgX5/+7H zOd3MpMehFggwNYGv6RsWkKkH0X+Nqa7SYDRQjWf73zKs36ar5QVeMfZvgq7pZwu7PyC 48pg== X-Gm-Message-State: ALoCoQkUu2ANNu82zA+eMnKv9iaoQiRLnO7qruwpybfyQEJ/xxc8Wt8OV7zK2fCjQ/dfkEB1HfSg X-Received: by 10.66.240.130 with SMTP id wa2mr3211317pac.73.1399526695479; Wed, 07 May 2014 22:24:55 -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 ry10sm123587304pab.38.2014.05.07.22.24.53 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 May 2014 22:24:54 -0700 (PDT) From: Tim Harvey To: Stefano Babic Date: Wed, 7 May 2014 22:24:47 -0700 Message-Id: <1399526687-12257-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] imx: sata: return failure 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 instead of configuring the SATA clock and GPR13 registers. Signed-off-by: Tim Harvey --- arch/arm/imx-common/sata.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/imx-common/sata.c b/arch/arm/imx-common/sata.c index 2e69486..c10dd28 100644 --- a/arch/arm/imx-common/sata.c +++ b/arch/arm/imx-common/sata.c @@ -8,13 +8,18 @@ #include #include #include +#include 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;