diff options
Diffstat (limited to 'arch/arm/mach-mx5')
-rw-r--r-- | arch/arm/mach-mx5/board-cpuimx51.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-mx51_babbage.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-mx51_efikamx.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-mx51_efikasb.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-mx53_ard.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-mx53_loco.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-mx53_smd.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-mx5/clock-mx51-mx53.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-mx5/devices-imx53.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx5/mx51_efika.c | 2 |
10 files changed, 57 insertions, 14 deletions
diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c index 7c893fa70266..68934ea8725a 100644 --- a/arch/arm/mach-mx5/board-cpuimx51.c +++ b/arch/arm/mach-mx5/board-cpuimx51.c | |||
@@ -81,7 +81,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
81 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 81 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
82 | }, { | 82 | }, { |
83 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), | 83 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), |
84 | .irq = irq_to_gpio(CPUIMX51_QUARTD_GPIO), | 84 | .irq = gpio_to_irq(CPUIMX51_QUARTD_GPIO), |
85 | .irqflags = IRQF_TRIGGER_HIGH, | 85 | .irqflags = IRQF_TRIGGER_HIGH, |
86 | .uartclk = CPUIMX51_QUART_XTAL, | 86 | .uartclk = CPUIMX51_QUART_XTAL, |
87 | .regshift = CPUIMX51_QUART_REGSHIFT, | 87 | .regshift = CPUIMX51_QUART_REGSHIFT, |
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index e400b09109ce..11b0ff67f89d 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c | |||
@@ -369,7 +369,7 @@ static void __init mx51_babbage_init(void) | |||
369 | ARRAY_SIZE(mx51babbage_pads)); | 369 | ARRAY_SIZE(mx51babbage_pads)); |
370 | 370 | ||
371 | imx51_add_imx_uart(0, &uart_pdata); | 371 | imx51_add_imx_uart(0, &uart_pdata); |
372 | imx51_add_imx_uart(1, &uart_pdata); | 372 | imx51_add_imx_uart(1, NULL); |
373 | imx51_add_imx_uart(2, &uart_pdata); | 373 | imx51_add_imx_uart(2, &uart_pdata); |
374 | 374 | ||
375 | babbage_fec_reset(); | 375 | babbage_fec_reset(); |
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c index f70700dc0ec1..551daf85ff8c 100644 --- a/arch/arm/mach-mx5/board-mx51_efikamx.c +++ b/arch/arm/mach-mx5/board-mx51_efikamx.c | |||
@@ -108,9 +108,9 @@ static void __init mx51_efikamx_board_id(void) | |||
108 | gpio_request(EFIKAMX_PCBID2, "pcbid2"); | 108 | gpio_request(EFIKAMX_PCBID2, "pcbid2"); |
109 | gpio_direction_input(EFIKAMX_PCBID2); | 109 | gpio_direction_input(EFIKAMX_PCBID2); |
110 | 110 | ||
111 | id = gpio_get_value(EFIKAMX_PCBID0); | 111 | id = gpio_get_value(EFIKAMX_PCBID0) ? 1 : 0; |
112 | id |= gpio_get_value(EFIKAMX_PCBID1) << 1; | 112 | id |= (gpio_get_value(EFIKAMX_PCBID1) ? 1 : 0) << 1; |
113 | id |= gpio_get_value(EFIKAMX_PCBID2) << 2; | 113 | id |= (gpio_get_value(EFIKAMX_PCBID2) ? 1 : 0) << 2; |
114 | 114 | ||
115 | switch (id) { | 115 | switch (id) { |
116 | case 7: | 116 | case 7: |
diff --git a/arch/arm/mach-mx5/board-mx51_efikasb.c b/arch/arm/mach-mx5/board-mx51_efikasb.c index 2e4d9d32a87c..8a9bca22beb5 100644 --- a/arch/arm/mach-mx5/board-mx51_efikasb.c +++ b/arch/arm/mach-mx5/board-mx51_efikasb.c | |||
@@ -156,23 +156,24 @@ static struct gpio_keys_button mx51_efikasb_keys[] = { | |||
156 | { | 156 | { |
157 | .code = KEY_POWER, | 157 | .code = KEY_POWER, |
158 | .gpio = EFIKASB_PWRKEY, | 158 | .gpio = EFIKASB_PWRKEY, |
159 | .type = EV_PWR, | 159 | .type = EV_KEY, |
160 | .desc = "Power Button", | 160 | .desc = "Power Button", |
161 | .wakeup = 1, | 161 | .wakeup = 1, |
162 | .debounce_interval = 10, /* ms */ | 162 | .active_low = 1, |
163 | }, | 163 | }, |
164 | { | 164 | { |
165 | .code = SW_LID, | 165 | .code = SW_LID, |
166 | .gpio = EFIKASB_LID, | 166 | .gpio = EFIKASB_LID, |
167 | .type = EV_SW, | 167 | .type = EV_SW, |
168 | .desc = "Lid Switch", | 168 | .desc = "Lid Switch", |
169 | .active_low = 1, | ||
169 | }, | 170 | }, |
170 | { | 171 | { |
171 | /* SW_RFKILLALL vs KEY_RFKILL ? */ | 172 | .code = KEY_RFKILL, |
172 | .code = SW_RFKILL_ALL, | ||
173 | .gpio = EFIKASB_RFKILL, | 173 | .gpio = EFIKASB_RFKILL, |
174 | .type = EV_SW, | 174 | .type = EV_KEY, |
175 | .desc = "rfkill", | 175 | .desc = "rfkill", |
176 | .active_low = 1, | ||
176 | }, | 177 | }, |
177 | }; | 178 | }; |
178 | 179 | ||
@@ -224,8 +225,8 @@ static void __init mx51_efikasb_board_id(void) | |||
224 | gpio_request(EFIKASB_PCBID1, "pcb id1"); | 225 | gpio_request(EFIKASB_PCBID1, "pcb id1"); |
225 | gpio_direction_input(EFIKASB_PCBID1); | 226 | gpio_direction_input(EFIKASB_PCBID1); |
226 | 227 | ||
227 | id = gpio_get_value(EFIKASB_PCBID0); | 228 | id = gpio_get_value(EFIKASB_PCBID0) ? 1 : 0; |
228 | id |= gpio_get_value(EFIKASB_PCBID1) << 1; | 229 | id |= (gpio_get_value(EFIKASB_PCBID1) ? 1 : 0) << 1; |
229 | 230 | ||
230 | switch (id) { | 231 | switch (id) { |
231 | default: | 232 | default: |
diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c index 76a67c4a2a0b..ef2039eff74c 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 | ||
239 | static void __init mx53_ard_timer_init(void) | 240 | static 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 4e1d51d252dc..940aac932fa3 100644 --- a/arch/arm/mach-mx5/board-mx53_loco.c +++ b/arch/arm/mach-mx5/board-mx53_loco.c | |||
@@ -273,6 +273,7 @@ static void __init mx53_loco_board_init(void) | |||
273 | imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data); | 273 | imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data); |
274 | imx_add_gpio_keys(&loco_button_data); | 274 | imx_add_gpio_keys(&loco_button_data); |
275 | gpio_led_register_device(-1, &mx53loco_leds_data); | 275 | gpio_led_register_device(-1, &mx53loco_leds_data); |
276 | imx53_add_ahci_imx(); | ||
276 | } | 277 | } |
277 | 278 | ||
278 | static void __init mx53_loco_timer_init(void) | 279 | static 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 bc02894eafef..efcab68840ae 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 | ||
39 | static iomux_v3_cfg_t mx53_smd_pads[] = { | 40 | static 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 | ||
115 | static 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 | |||
114 | static void __init mx53_smd_board_init(void) | 128 | static 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 | ||
130 | static void __init mx53_smd_timer_init(void) | 146 | static 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 3fcb5960ac11..5955ca33b9c5 100644 --- a/arch/arm/mach-mx5/clock-mx51-mx53.c +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c | |||
@@ -271,7 +271,11 @@ static int _clk_pll_enable(struct clk *clk) | |||
271 | int i = 0; | 271 | int i = 0; |
272 | 272 | ||
273 | pllbase = _get_pll_base(clk); | 273 | pllbase = _get_pll_base(clk); |
274 | reg = __raw_readl(pllbase + MXC_PLL_DP_CTL) | MXC_PLL_DP_CTL_UPEN; | 274 | reg = __raw_readl(pllbase + MXC_PLL_DP_CTL); |
275 | if (reg & MXC_PLL_DP_CTL_UPEN) | ||
276 | return 0; | ||
277 | |||
278 | reg |= MXC_PLL_DP_CTL_UPEN; | ||
275 | __raw_writel(reg, pllbase + MXC_PLL_DP_CTL); | 279 | __raw_writel(reg, pllbase + MXC_PLL_DP_CTL); |
276 | 280 | ||
277 | /* Wait for lock */ | 281 | /* Wait for lock */ |
@@ -1397,6 +1401,22 @@ static struct clk esdhc4_mx53_clk = { | |||
1397 | .secondary = &esdhc4_ipg_clk, | 1401 | .secondary = &esdhc4_ipg_clk, |
1398 | }; | 1402 | }; |
1399 | 1403 | ||
1404 | static 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 | |||
1412 | static struct clk ahci_phy_clk = { | ||
1413 | .parent = &usb_phy1_clk, | ||
1414 | }; | ||
1415 | |||
1416 | static struct clk ahci_dma_clk = { | ||
1417 | .parent = &ahb_clk, | ||
1418 | }; | ||
1419 | |||
1400 | DEFINE_CLOCK(mipi_esc_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG5_OFFSET, NULL, NULL, NULL, &pll2_sw_clk); | 1420 | DEFINE_CLOCK(mipi_esc_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG5_OFFSET, NULL, NULL, NULL, &pll2_sw_clk); |
1401 | DEFINE_CLOCK(mipi_hsc2_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG4_OFFSET, NULL, NULL, &mipi_esc_clk, &pll2_sw_clk); | 1421 | DEFINE_CLOCK(mipi_hsc2_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG4_OFFSET, NULL, NULL, &mipi_esc_clk, &pll2_sw_clk); |
1402 | DEFINE_CLOCK(mipi_hsc1_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG3_OFFSET, NULL, NULL, &mipi_hsc2_clk, &pll2_sw_clk); | 1422 | DEFINE_CLOCK(mipi_hsc1_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG3_OFFSET, NULL, NULL, &mipi_hsc2_clk, &pll2_sw_clk); |
@@ -1509,6 +1529,9 @@ static struct clk_lookup mx53_lookups[] = { | |||
1509 | _REGISTER_CLOCK("imx-ssi.2", NULL, ssi3_clk) | 1529 | _REGISTER_CLOCK("imx-ssi.2", NULL, ssi3_clk) |
1510 | _REGISTER_CLOCK("imx-keypad", NULL, dummy_clk) | 1530 | _REGISTER_CLOCK("imx-keypad", NULL, dummy_clk) |
1511 | _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) | ||
1512 | }; | 1535 | }; |
1513 | 1536 | ||
1514 | static void clk_tree_init(void) | 1537 | static 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..7fe5e462fdca 100644 --- a/arch/arm/mach-mx5/devices-imx53.h +++ b/arch/arm/mach-mx5/devices-imx53.h | |||
@@ -44,3 +44,4 @@ extern const struct imx_imx_keypad_data imx53_imx_keypad_data; | |||
44 | extern const struct imx_pata_imx_data imx53_pata_imx_data; | 44 | extern 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 | extern struct platform_device *__init imx53_add_ahci_imx(void); | ||
diff --git a/arch/arm/mach-mx5/mx51_efika.c b/arch/arm/mach-mx5/mx51_efika.c index 31c152e9def5..0d738fdc8a94 100644 --- a/arch/arm/mach-mx5/mx51_efika.c +++ b/arch/arm/mach-mx5/mx51_efika.c | |||
@@ -186,7 +186,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
186 | 186 | ||
187 | mdelay(10); | 187 | mdelay(10); |
188 | 188 | ||
189 | return mx51_initialize_usb_hw(0, MXC_EHCI_ITC_NO_THRESHOLD); | 189 | return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD); |
190 | } | 190 | } |
191 | 191 | ||
192 | static struct mxc_usbh_platform_data usbh1_config = { | 192 | static struct mxc_usbh_platform_data usbh1_config = { |