aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/board-mx53_smd.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx5/board-mx53_smd.c')
-rw-r--r--arch/arm/mach-mx5/board-mx53_smd.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c
index bc02894eafef..59c0845eb4a6 100644
--- a/arch/arm/mach-mx5/board-mx53_smd.c
+++ b/arch/arm/mach-mx5/board-mx53_smd.c
@@ -35,6 +35,7 @@
35#include "devices-imx53.h" 35#include "devices-imx53.h"
36 36
37#define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6) 37#define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6)
38#define MX53_SMD_SATA_PWR_EN IMX_GPIO_NR(3, 3)
38 39
39static iomux_v3_cfg_t mx53_smd_pads[] = { 40static iomux_v3_cfg_t mx53_smd_pads[] = {
40 MX53_PAD_CSI0_DAT10__UART1_TXD_MUX, 41 MX53_PAD_CSI0_DAT10__UART1_TXD_MUX,
@@ -111,12 +112,30 @@ static const struct imxi2c_platform_data mx53_smd_i2c_data __initconst = {
111 .bitrate = 100000, 112 .bitrate = 100000,
112}; 113};
113 114
115static inline void mx53_smd_ahci_pwr_on(void)
116{
117 int ret;
118
119 /* Enable SATA PWR */
120 ret = gpio_request_one(MX53_SMD_SATA_PWR_EN,
121 GPIOF_DIR_OUT | GPIOF_INIT_HIGH, "ahci-sata-pwr");
122 if (ret) {
123 pr_err("failed to enable SATA_PWR_EN: %d\n", ret);
124 return;
125 }
126}
127
128void __init imx53_smd_common_init(void)
129{
130 mxc_iomux_v3_setup_multiple_pads(mx53_smd_pads,
131 ARRAY_SIZE(mx53_smd_pads));
132}
133
114static void __init mx53_smd_board_init(void) 134static void __init mx53_smd_board_init(void)
115{ 135{
116 imx53_soc_init(); 136 imx53_soc_init();
137 imx53_smd_common_init();
117 138
118 mxc_iomux_v3_setup_multiple_pads(mx53_smd_pads,
119 ARRAY_SIZE(mx53_smd_pads));
120 mx53_smd_init_uart(); 139 mx53_smd_init_uart();
121 mx53_smd_fec_reset(); 140 mx53_smd_fec_reset();
122 imx53_add_fec(&mx53_smd_fec_data); 141 imx53_add_fec(&mx53_smd_fec_data);
@@ -125,6 +144,8 @@ static void __init mx53_smd_board_init(void)
125 imx53_add_sdhci_esdhc_imx(0, NULL); 144 imx53_add_sdhci_esdhc_imx(0, NULL);
126 imx53_add_sdhci_esdhc_imx(1, NULL); 145 imx53_add_sdhci_esdhc_imx(1, NULL);
127 imx53_add_sdhci_esdhc_imx(2, NULL); 146 imx53_add_sdhci_esdhc_imx(2, NULL);
147 mx53_smd_ahci_pwr_on();
148 imx53_add_ahci_imx();
128} 149}
129 150
130static void __init mx53_smd_timer_init(void) 151static void __init mx53_smd_timer_init(void)
@@ -140,6 +161,7 @@ MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board")
140 .map_io = mx53_map_io, 161 .map_io = mx53_map_io,
141 .init_early = imx53_init_early, 162 .init_early = imx53_init_early,
142 .init_irq = mx53_init_irq, 163 .init_irq = mx53_init_irq,
164 .handle_irq = imx53_handle_irq,
143 .timer = &mx53_smd_timer, 165 .timer = &mx53_smd_timer,
144 .init_machine = mx53_smd_board_init, 166 .init_machine = mx53_smd_board_init,
145MACHINE_END 167MACHINE_END