From patchwork Wed Sep 28 07:41:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 4389 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 33F1823EF6 for ; Wed, 28 Sep 2011 07:44:56 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 2952CA18331 for ; Wed, 28 Sep 2011 07:44:56 +0000 (UTC) Received: by fxe23 with SMTP id 23so445895fxe.11 for ; Wed, 28 Sep 2011 00:44:56 -0700 (PDT) Received: by 10.223.57.17 with SMTP id a17mr8999535fah.65.1317195895986; Wed, 28 Sep 2011 00:44:55 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.3.234 with SMTP id f10cs102758laf; Wed, 28 Sep 2011 00:44:55 -0700 (PDT) Received: by 10.224.181.131 with SMTP id by3mr6724666qab.79.1317195893876; Wed, 28 Sep 2011 00:44:53 -0700 (PDT) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe004.messaging.microsoft.com. [216.32.181.184]) by mx.google.com with ESMTPS id eq6si19110923qab.54.2011.09.28.00.44.53 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 28 Sep 2011 00:44:53 -0700 (PDT) Received-SPF: neutral (google.com: 216.32.181.184 is neither permitted nor denied by best guess record for domain of richard.zhu@linaro.org) client-ip=216.32.181.184; Authentication-Results: mx.google.com; spf=neutral (google.com: 216.32.181.184 is neither permitted nor denied by best guess record for domain of richard.zhu@linaro.org) smtp.mail=richard.zhu@linaro.org Received: from mail155-ch1-R.bigfish.com (216.32.181.172) by CH1EHSOBE018.bigfish.com (10.43.70.68) with Microsoft SMTP Server id 14.1.225.22; Wed, 28 Sep 2011 07:44:52 +0000 Received: from mail155-ch1 (localhost.localdomain [127.0.0.1]) by mail155-ch1-R.bigfish.com (Postfix) with ESMTP id CF20EDD0249; Wed, 28 Sep 2011 07:44:52 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dh87h2a8h668h839h62h) X-Spam-TCS-SCL: 1:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-FB-DOMAIN-IP-MATCH: fail Received: from mail155-ch1 (localhost.localdomain [127.0.0.1]) by mail155-ch1 (MessageSwitch) id 1317195860586872_19274; Wed, 28 Sep 2011 07:44:20 +0000 (UTC) Received: from CH1EHSMHS007.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.249]) by mail155-ch1.bigfish.com (Postfix) with ESMTP id B0B4B1400AB; Wed, 28 Sep 2011 07:42:42 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS007.bigfish.com (10.43.70.7) with Microsoft SMTP Server (TLS) id 14.1.225.22; Wed, 28 Sep 2011 07:42:41 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.1.323.7; Wed, 28 Sep 2011 02:42:19 -0500 Received: from x-VirtualBox.ap.freescale.net ([10.192.242.136]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id p8S7g0rP009714; Wed, 28 Sep 2011 02:42:16 -0500 (CDT) From: Richard Zhu To: CC: , , , , , , Richard Zhu Subject: [PATCH V9 5/5] MX53 Enable the AHCI SATA on MX53 SMD board Date: Wed, 28 Sep 2011 15:41:57 +0800 Message-ID: <1317195717-21174-6-git-send-email-richard.zhu@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1317195717-21174-1-git-send-email-richard.zhu@linaro.org> References: <1317195717-21174-1-git-send-email-richard.zhu@linaro.org> MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com Signed-off-by: Richard Zhu --- arch/arm/mach-mx5/board-mx53_smd.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c index bc02894..efcab68 100644 --- a/arch/arm/mach-mx5/board-mx53_smd.c +++ b/arch/arm/mach-mx5/board-mx53_smd.c @@ -35,6 +35,7 @@ #include "devices-imx53.h" #define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6) +#define MX53_SMD_SATA_PWR_EN IMX_GPIO_NR(3, 3) static iomux_v3_cfg_t mx53_smd_pads[] = { MX53_PAD_CSI0_DAT10__UART1_TXD_MUX, @@ -111,6 +112,19 @@ static const struct imxi2c_platform_data mx53_smd_i2c_data __initconst = { .bitrate = 100000, }; +static inline void mx53_smd_ahci_pwr_on(void) +{ + int ret; + + /* Enable SATA PWR */ + ret = gpio_request_one(MX53_SMD_SATA_PWR_EN, + GPIOF_DIR_OUT | GPIOF_INIT_HIGH, "ahci-sata-pwr"); + if (ret) { + pr_err("failed to enable SATA_PWR_EN: %d\n", ret); + return; + } +} + static void __init mx53_smd_board_init(void) { imx53_soc_init(); @@ -125,6 +139,8 @@ static void __init mx53_smd_board_init(void) imx53_add_sdhci_esdhc_imx(0, NULL); imx53_add_sdhci_esdhc_imx(1, NULL); imx53_add_sdhci_esdhc_imx(2, NULL); + mx53_smd_ahci_pwr_on(); + imx53_add_ahci_imx(); } static void __init mx53_smd_timer_init(void)