From: richard.zhu@linaro.org (Richard Zhu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V9 5/5] MX53 Enable the AHCI SATA on MX53 SMD board
Date: Wed, 28 Sep 2011 15:41:57 +0800 [thread overview]
Message-ID: <1317195717-21174-6-git-send-email-richard.zhu@linaro.org> (raw)
In-Reply-To: <1317195717-21174-1-git-send-email-richard.zhu@linaro.org>
Signed-off-by: Richard Zhu <richard.zhu@linaro.org>
---
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)
--
1.7.1
prev parent reply other threads:[~2011-09-28 7:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 7:41 [PATCH V9 0/5] imx53 ahci driver v9 Richard Zhu
2011-09-28 7:41 ` [PATCH V9 1/5] AHCI Add the AHCI SATA feature on the MX53 platforms Richard Zhu
2011-09-28 7:41 ` [PATCH V9 2/5] ahci_plt Add the board_ids and pi refer to different features Richard Zhu
2011-10-06 6:22 ` Jeff Garzik
2011-10-07 12:44 ` Sascha Hauer
2011-09-28 7:41 ` [PATCH V9 3/5] MX53 Enable the AHCI SATA on MX53 ARD board Richard Zhu
2011-09-28 7:41 ` [PATCH V9 4/5] MX53 Enable the AHCI SATA on MX53 LOCO board Richard Zhu
2011-09-28 7:41 ` Richard Zhu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317195717-21174-6-git-send-email-richard.zhu@linaro.org \
--to=richard.zhu@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).