aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-10-20 09:14:25 -0400
committerArnd Bergmann <arnd@arndb.de>2011-10-20 09:14:25 -0400
commitb4cbb8a4e602ea77b0525d06eff89c6a6070dab3 (patch)
treea5dd723679582505ef3905c90f0c2c032d191b94 /arch/arm/mach-mx5
parent526b264163068f77c5f2409031f5e25caf3900a9 (diff)
parentc5d7a9230e5e277f262b6806b7f4d6b35de5a3fb (diff)
Merge branch 'imx-features-for-arnd' of git://git.pengutronix.de/git/imx/linux-2.6 into imx/devel
Conflicts: arch/arm/mach-mx5/clock-mx51-mx53.c arch/arm/mach-mx5/devices-imx53.h
Diffstat (limited to 'arch/arm/mach-mx5')
-rw-r--r--arch/arm/mach-mx5/board-mx53_ard.c1
-rw-r--r--arch/arm/mach-mx5/board-mx53_loco.c1
-rw-r--r--arch/arm/mach-mx5/board-mx53_smd.c16
-rw-r--r--arch/arm/mach-mx5/clock-mx51-mx53.c19
-rw-r--r--arch/arm/mach-mx5/devices-imx53.h2
5 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c
index cb4d753c6c95..614edcb0aa7e 100644
--- a/arch/arm/mach-mx5/board-mx53_ard.c
+++ b/arch/arm/mach-mx5/board-mx53_ard.c
@@ -234,6 +234,7 @@ static void __init mx53_ard_board_init(void)
234 imx53_add_imx_i2c(1, &mx53_ard_i2c2_data); 234 imx53_add_imx_i2c(1, &mx53_ard_i2c2_data);
235 imx53_add_imx_i2c(2, &mx53_ard_i2c3_data); 235 imx53_add_imx_i2c(2, &mx53_ard_i2c3_data);
236 imx_add_gpio_keys(&ard_button_data); 236 imx_add_gpio_keys(&ard_button_data);
237 imx53_add_ahci_imx();
237} 238}
238 239
239static void __init mx53_ard_timer_init(void) 240static void __init mx53_ard_timer_init(void)
diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c
index 7149416d1519..0af2766f8610 100644
--- a/arch/arm/mach-mx5/board-mx53_loco.c
+++ b/arch/arm/mach-mx5/board-mx53_loco.c
@@ -293,6 +293,7 @@ static void __init mx53_loco_board_init(void)
293 imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data); 293 imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data);
294 imx_add_gpio_keys(&loco_button_data); 294 imx_add_gpio_keys(&loco_button_data);
295 gpio_led_register_device(-1, &mx53loco_leds_data); 295 gpio_led_register_device(-1, &mx53loco_leds_data);
296 imx53_add_ahci_imx();
296} 297}
297 298
298static void __init mx53_loco_timer_init(void) 299static void __init mx53_loco_timer_init(void)
diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c
index e64fd2c088eb..d12fd3043ba6 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,6 +112,19 @@ 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
114static void __init mx53_smd_board_init(void) 128static void __init mx53_smd_board_init(void)
115{ 129{
116 imx53_soc_init(); 130 imx53_soc_init();
@@ -125,6 +139,8 @@ static void __init mx53_smd_board_init(void)
125 imx53_add_sdhci_esdhc_imx(0, NULL); 139 imx53_add_sdhci_esdhc_imx(0, NULL);
126 imx53_add_sdhci_esdhc_imx(1, NULL); 140 imx53_add_sdhci_esdhc_imx(1, NULL);
127 imx53_add_sdhci_esdhc_imx(2, NULL); 141 imx53_add_sdhci_esdhc_imx(2, NULL);
142 mx53_smd_ahci_pwr_on();
143 imx53_add_ahci_imx();
128} 144}
129 145
130static void __init mx53_smd_timer_init(void) 146static void __init mx53_smd_timer_init(void)
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c
index 2b9bd1fabaf9..b94879e8679f 100644
--- a/arch/arm/mach-mx5/clock-mx51-mx53.c
+++ b/arch/arm/mach-mx5/clock-mx51-mx53.c
@@ -1401,6 +1401,22 @@ static struct clk esdhc4_mx53_clk = {
1401 .secondary = &esdhc4_ipg_clk, 1401 .secondary = &esdhc4_ipg_clk,
1402}; 1402};
1403 1403
1404static struct clk sata_clk = {
1405 .parent = &ipg_clk,
1406 .enable = _clk_max_enable,
1407 .enable_reg = MXC_CCM_CCGR4,
1408 .enable_shift = MXC_CCM_CCGRx_CG1_OFFSET,
1409 .disable = _clk_max_disable,
1410};
1411
1412static struct clk ahci_phy_clk = {
1413 .parent = &usb_phy1_clk,
1414};
1415
1416static struct clk ahci_dma_clk = {
1417 .parent = &ahb_clk,
1418};
1419
1404DEFINE_CLOCK(mipi_esc_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG5_OFFSET, NULL, NULL, NULL, &pll2_sw_clk); 1420DEFINE_CLOCK(mipi_esc_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG5_OFFSET, NULL, NULL, NULL, &pll2_sw_clk);
1405DEFINE_CLOCK(mipi_hsc2_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG4_OFFSET, NULL, NULL, &mipi_esc_clk, &pll2_sw_clk); 1421DEFINE_CLOCK(mipi_hsc2_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG4_OFFSET, NULL, NULL, &mipi_esc_clk, &pll2_sw_clk);
1406DEFINE_CLOCK(mipi_hsc1_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG3_OFFSET, NULL, NULL, &mipi_hsc2_clk, &pll2_sw_clk); 1422DEFINE_CLOCK(mipi_hsc1_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG3_OFFSET, NULL, NULL, &mipi_hsc2_clk, &pll2_sw_clk);
@@ -1513,6 +1529,9 @@ static struct clk_lookup mx53_lookups[] = {
1513 _REGISTER_CLOCK("imx-ssi.2", NULL, ssi3_clk) 1529 _REGISTER_CLOCK("imx-ssi.2", NULL, ssi3_clk)
1514 _REGISTER_CLOCK("imx-keypad", NULL, dummy_clk) 1530 _REGISTER_CLOCK("imx-keypad", NULL, dummy_clk)
1515 _REGISTER_CLOCK("pata_imx", NULL, pata_clk) 1531 _REGISTER_CLOCK("pata_imx", NULL, pata_clk)
1532 _REGISTER_CLOCK("imx53-ahci.0", "ahci", sata_clk)
1533 _REGISTER_CLOCK("imx53-ahci.0", "ahci_phy", ahci_phy_clk)
1534 _REGISTER_CLOCK("imx53-ahci.0", "ahci_dma", ahci_dma_clk)
1516}; 1535};
1517 1536
1518static void clk_tree_init(void) 1537static void clk_tree_init(void)
diff --git a/arch/arm/mach-mx5/devices-imx53.h b/arch/arm/mach-mx5/devices-imx53.h
index 7ca5d0c76f8b..6e1e5d1f8c3a 100644
--- a/arch/arm/mach-mx5/devices-imx53.h
+++ b/arch/arm/mach-mx5/devices-imx53.h
@@ -44,3 +44,5 @@ extern const struct imx_imx_keypad_data imx53_imx_keypad_data;
44extern const struct imx_pata_imx_data imx53_pata_imx_data; 44extern const struct imx_pata_imx_data imx53_pata_imx_data;
45#define imx53_add_pata_imx() \ 45#define imx53_add_pata_imx() \
46 imx_add_pata_imx(&imx53_pata_imx_data) 46 imx_add_pata_imx(&imx53_pata_imx_data)
47
48extern struct platform_device *__init imx53_add_ahci_imx(void);