aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-01-14 07:12:42 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-01-14 07:12:42 -0500
commit0a831cec1b627d2f3f60c6f70a4c649b7caa4fe2 (patch)
treec2ab5e6d5ff4def2ffafe2cd61ac14aedb5a86e7 /arch/arm
parent5b88128fd70dcf0d5d7c0ae7d7849777ff925bde (diff)
parentb9214b9780d6897a6892e7c8cc903168d6fef097 (diff)
Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig2
-rw-r--r--arch/arm/mach-imx/Kconfig1
-rw-r--r--arch/arm/mach-imx/mach-mx27_3ds.c10
-rw-r--r--arch/arm/mach-mx3/mach-mx31_3ds.c4
-rw-r--r--arch/arm/mach-mx5/Kconfig20
-rw-r--r--arch/arm/mach-mx5/Makefile2
-rw-r--r--arch/arm/mach-mx5/board-mx51_3ds.c5
-rw-r--r--arch/arm/mach-mx5/board-mx53_evk.c74
-rw-r--r--arch/arm/mach-mx5/board-mx53_loco.c111
-rw-r--r--arch/arm/mach-mx5/board-mx53_smd.c111
-rw-r--r--arch/arm/mach-mx5/clock-mx51-mx53.c18
-rw-r--r--arch/arm/mach-mx5/devices-imx51.h8
-rw-r--r--arch/arm/mach-mx5/devices-imx53.h18
-rw-r--r--arch/arm/mach-mx5/devices.c19
-rw-r--r--arch/arm/mach-mx5/devices.h1
-rw-r--r--arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c5
-rw-r--r--arch/arm/mach-mxs/Kconfig4
-rw-r--r--arch/arm/mach-mxs/clock-mx23.c13
-rw-r--r--arch/arm/mach-mxs/clock-mx28.c14
-rw-r--r--arch/arm/mach-mxs/devices-mx23.h4
-rw-r--r--arch/arm/mach-mxs/devices-mx28.h4
-rw-r--r--arch/arm/mach-mxs/devices.c17
-rw-r--r--arch/arm/mach-mxs/devices/Kconfig3
-rw-r--r--arch/arm/mach-mxs/devices/Makefile2
-rw-r--r--arch/arm/mach-mxs/devices/amba-duart.c40
-rw-r--r--arch/arm/mach-mxs/devices/platform-duart.c48
-rw-r--r--arch/arm/mach-mxs/devices/platform-fec.c2
-rw-r--r--arch/arm/mach-mxs/include/mach/devices-common.h11
-rw-r--r--arch/arm/mach-mxs/mach-mx28evk.c26
-rw-r--r--arch/arm/plat-mxc/devices/Kconfig2
-rw-r--r--arch/arm/plat-mxc/devices/platform-fec.c5
-rw-r--r--arch/arm/plat-mxc/devices/platform-imx-i2c.c9
-rw-r--r--arch/arm/plat-mxc/devices/platform-imx-keypad.c5
-rw-r--r--arch/arm/plat-mxc/devices/platform-mxc_pwm.c9
-rw-r--r--arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c12
-rw-r--r--arch/arm/plat-mxc/devices/platform-spi_imx.c12
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-mx53.h4
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-v3.h1
-rw-r--r--arch/arm/plat-mxc/include/mach/mx51.h6
-rw-r--r--arch/arm/plat-mxc/include/mach/mx53.h28
-rw-r--r--arch/arm/plat-mxc/pwm.c2
41 files changed, 567 insertions, 125 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 99829a2bee92..5711c8160e75 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -363,7 +363,7 @@ config ARCH_MXS
363 bool "Freescale MXS-based" 363 bool "Freescale MXS-based"
364 select GENERIC_CLOCKEVENTS 364 select GENERIC_CLOCKEVENTS
365 select ARCH_REQUIRE_GPIOLIB 365 select ARCH_REQUIRE_GPIOLIB
366 select COMMON_CLKDEV 366 select CLKDEV_LOOKUP
367 help 367 help
368 Support for Freescale MXS-based family of processors 368 Support for Freescale MXS-based family of processors
369 369
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 17d2e608a214..56684b517070 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -243,6 +243,7 @@ config MACH_MX27_3DS
243 select IMX_HAVE_PLATFORM_MXC_EHCI 243 select IMX_HAVE_PLATFORM_MXC_EHCI
244 select IMX_HAVE_PLATFORM_MXC_MMC 244 select IMX_HAVE_PLATFORM_MXC_MMC
245 select IMX_HAVE_PLATFORM_SPI_IMX 245 select IMX_HAVE_PLATFORM_SPI_IMX
246 select MXC_DEBUG_BOARD
246 select MXC_ULPI if USB_ULPI 247 select MXC_ULPI if USB_ULPI
247 help 248 help
248 Include support for MX27PDK platform. This includes specific 249 Include support for MX27PDK platform. This includes specific
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index 6fd0f8f6deb6..164331518bdd 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -37,12 +37,15 @@
37#include <mach/common.h> 37#include <mach/common.h>
38#include <mach/iomux-mx27.h> 38#include <mach/iomux-mx27.h>
39#include <mach/ulpi.h> 39#include <mach/ulpi.h>
40#include <mach/irqs.h>
41#include <mach/3ds_debugboard.h>
40 42
41#include "devices-imx27.h" 43#include "devices-imx27.h"
42 44
43#define SD1_EN_GPIO (GPIO_PORTB + 25) 45#define SD1_EN_GPIO (GPIO_PORTB + 25)
44#define OTG_PHY_RESET_GPIO (GPIO_PORTB + 23) 46#define OTG_PHY_RESET_GPIO (GPIO_PORTB + 23)
45#define SPI2_SS0 (GPIO_PORTD + 21) 47#define SPI2_SS0 (GPIO_PORTD + 21)
48#define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTC + 28)
46 49
47static const int mx27pdk_pins[] __initconst = { 50static const int mx27pdk_pins[] __initconst = {
48 /* UART1 */ 51 /* UART1 */
@@ -215,10 +218,10 @@ static struct regulator_init_data vgen_init = {
215 218
216static struct mc13783_regulator_init_data mx27_3ds_regulators[] = { 219static struct mc13783_regulator_init_data mx27_3ds_regulators[] = {
217 { 220 {
218 .id = MC13783_REGU_VMMC1, 221 .id = MC13783_REG_VMMC1,
219 .init_data = &vmmc1_init, 222 .init_data = &vmmc1_init,
220 }, { 223 }, {
221 .id = MC13783_REGU_VGEN, 224 .id = MC13783_REG_VGEN,
222 .init_data = &vgen_init, 225 .init_data = &vgen_init,
223 }, 226 },
224}; 227};
@@ -276,6 +279,9 @@ static void __init mx27pdk_init(void)
276 imx27_add_spi_imx1(&spi2_pdata); 279 imx27_add_spi_imx1(&spi2_pdata);
277 spi_register_board_info(mx27_3ds_spi_devs, 280 spi_register_board_info(mx27_3ds_spi_devs,
278 ARRAY_SIZE(mx27_3ds_spi_devs)); 281 ARRAY_SIZE(mx27_3ds_spi_devs));
282
283 if (mxc_expio_init(MX27_CS5_BASE_ADDR, EXPIO_PARENT_INT))
284 pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n");
279} 285}
280 286
281static void __init mx27pdk_timer_init(void) 287static void __init mx27pdk_timer_init(void)
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 4e516b49a901..6b4aa2c47107 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -147,10 +147,10 @@ static struct mc13783_regulator_init_data mx31_3ds_regulators[] = {
147 .init_data = &pwgtx_init, 147 .init_data = &pwgtx_init,
148 }, { 148 }, {
149 149
150 .id = MC13783_REGU_GPO1, /* Turn on 1.8V */ 150 .id = MC13783_REG_GPO1, /* Turn on 1.8V */
151 .init_data = &gpo_init, 151 .init_data = &gpo_init,
152 }, { 152 }, {
153 .id = MC13783_REGU_GPO3, /* Turn on 3.3V */ 153 .id = MC13783_REG_GPO3, /* Turn on 3.3V */
154 .init_data = &gpo_init, 154 .init_data = &gpo_init,
155 }, 155 },
156}; 156};
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig
index 55254b6e9460..de4fa992fc3e 100644
--- a/arch/arm/mach-mx5/Kconfig
+++ b/arch/arm/mach-mx5/Kconfig
@@ -50,6 +50,7 @@ config MACH_MX51_BABBAGE
50config MACH_MX51_3DS 50config MACH_MX51_3DS
51 bool "Support MX51PDK (3DS)" 51 bool "Support MX51PDK (3DS)"
52 select SOC_IMX51 52 select SOC_IMX51
53 select IMX_HAVE_PLATFORM_IMX_KEYPAD
53 select IMX_HAVE_PLATFORM_IMX_UART 54 select IMX_HAVE_PLATFORM_IMX_UART
54 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX 55 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
55 select IMX_HAVE_PLATFORM_SPI_IMX 56 select IMX_HAVE_PLATFORM_SPI_IMX
@@ -77,6 +78,7 @@ choice
77config MACH_EUKREA_MBIMX51_BASEBOARD 78config MACH_EUKREA_MBIMX51_BASEBOARD
78 prompt "Eukrea MBIMX51 development board" 79 prompt "Eukrea MBIMX51 development board"
79 bool 80 bool
81 select IMX_HAVE_PLATFORM_IMX_KEYPAD
80 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX 82 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
81 help 83 help
82 This adds board specific devices that can be found on Eukrea's 84 This adds board specific devices that can be found on Eukrea's
@@ -124,10 +126,28 @@ config MACH_MX53_EVK
124 bool "Support MX53 EVK platforms" 126 bool "Support MX53 EVK platforms"
125 select SOC_IMX53 127 select SOC_IMX53
126 select IMX_HAVE_PLATFORM_IMX_UART 128 select IMX_HAVE_PLATFORM_IMX_UART
129 select IMX_HAVE_PLATFORM_IMX_I2C
130 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
131 select IMX_HAVE_PLATFORM_SPI_IMX
127 help 132 help
128 Include support for MX53 EVK platform. This includes specific 133 Include support for MX53 EVK platform. This includes specific
129 configurations for the board and its peripherals. 134 configurations for the board and its peripherals.
130 135
136config MACH_MX53_SMD
137 bool "Support MX53 SMD platforms"
138 select SOC_IMX53
139 select IMX_HAVE_PLATFORM_IMX_UART
140 help
141 Include support for MX53 SMD platform. This includes specific
142 configurations for the board and its peripherals.
143
144config MACH_MX53_LOCO
145 bool "Support MX53 LOCO platforms"
146 select SOC_IMX53
147 select IMX_HAVE_PLATFORM_IMX_UART
148 help
149 Include support for MX53 LOCO platform. This includes specific
150 configurations for the board and its peripherals.
131 151
132config MACH_MX50_RDP 152config MACH_MX50_RDP
133 bool "Support MX50 reference design platform" 153 bool "Support MX50 reference design platform"
diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile
index 0c398baf11fe..0d43be98e51c 100644
--- a/arch/arm/mach-mx5/Makefile
+++ b/arch/arm/mach-mx5/Makefile
@@ -10,6 +10,8 @@ obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o
10obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o 10obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o
11obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o 11obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o
12obj-$(CONFIG_MACH_MX53_EVK) += board-mx53_evk.o 12obj-$(CONFIG_MACH_MX53_EVK) += board-mx53_evk.o
13obj-$(CONFIG_MACH_MX53_SMD) += board-mx53_smd.o
14obj-$(CONFIG_MACH_MX53_LOCO) += board-mx53_loco.o
13obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o 15obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o
14obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o 16obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o
15obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.o 17obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.o
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
index e42bd2eb034e..49d644842379 100644
--- a/arch/arm/mach-mx5/board-mx51_3ds.c
+++ b/arch/arm/mach-mx5/board-mx51_3ds.c
@@ -12,7 +12,6 @@
12 12
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/input/matrix_keypad.h>
16#include <linux/spi/spi.h> 15#include <linux/spi/spi.h>
17 16
18#include <asm/mach-types.h> 17#include <asm/mach-types.h>
@@ -120,14 +119,14 @@ static int mx51_3ds_board_keymap[] = {
120 KEY(3, 5, KEY_BACK) 119 KEY(3, 5, KEY_BACK)
121}; 120};
122 121
123static struct matrix_keymap_data mx51_3ds_map_data = { 122static const struct matrix_keymap_data mx51_3ds_map_data __initconst = {
124 .keymap = mx51_3ds_board_keymap, 123 .keymap = mx51_3ds_board_keymap,
125 .keymap_size = ARRAY_SIZE(mx51_3ds_board_keymap), 124 .keymap_size = ARRAY_SIZE(mx51_3ds_board_keymap),
126}; 125};
127 126
128static void mxc_init_keypad(void) 127static void mxc_init_keypad(void)
129{ 128{
130 mxc_register_device(&mxc_keypad_device, &mx51_3ds_map_data); 129 imx51_add_imx_keypad(&mx51_3ds_map_data);
131} 130}
132#else 131#else
133static inline void mxc_init_keypad(void) 132static inline void mxc_init_keypad(void)
diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c
index fa97d0d5dd05..caee04c08238 100644
--- a/arch/arm/mach-mx5/board-mx53_evk.c
+++ b/arch/arm/mach-mx5/board-mx53_evk.c
@@ -21,6 +21,11 @@
21 21
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/fec.h>
25#include <linux/delay.h>
26#include <linux/gpio.h>
27#include <linux/spi/flash.h>
28#include <linux/spi/spi.h>
24#include <mach/common.h> 29#include <mach/common.h>
25#include <mach/hardware.h> 30#include <mach/hardware.h>
26#include <asm/mach-types.h> 31#include <asm/mach-types.h>
@@ -29,6 +34,10 @@
29#include <mach/imx-uart.h> 34#include <mach/imx-uart.h>
30#include <mach/iomux-mx53.h> 35#include <mach/iomux-mx53.h>
31 36
37#define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6)
38#define EVK_ECSPI1_CS0 IMX_GPIO_NR(2, 30)
39#define EVK_ECSPI1_CS1 IMX_GPIO_NR(3, 19)
40
32#include "crm_regs.h" 41#include "crm_regs.h"
33#include "devices-imx53.h" 42#include "devices-imx53.h"
34 43
@@ -47,6 +56,14 @@ static iomux_v3_cfg_t mx53_evk_pads[] = {
47 MX53_PAD_ATA_CS_1__UART3_RXD, 56 MX53_PAD_ATA_CS_1__UART3_RXD,
48 MX53_PAD_ATA_DA_1__UART3_CTS, 57 MX53_PAD_ATA_DA_1__UART3_CTS,
49 MX53_PAD_ATA_DA_2__UART3_RTS, 58 MX53_PAD_ATA_DA_2__UART3_RTS,
59
60 MX53_PAD_EIM_D16__CSPI1_SCLK,
61 MX53_PAD_EIM_D17__CSPI1_MISO,
62 MX53_PAD_EIM_D18__CSPI1_MOSI,
63
64 /* ecspi chip select lines */
65 MX53_PAD_EIM_EB2__GPIO_2_30,
66 MX53_PAD_EIM_D19__GPIO_3_19,
50}; 67};
51 68
52static const struct imxuart_platform_data mx53_evk_uart_pdata __initconst = { 69static const struct imxuart_platform_data mx53_evk_uart_pdata __initconst = {
@@ -60,11 +77,68 @@ static inline void mx53_evk_init_uart(void)
60 imx53_add_imx_uart(2, &mx53_evk_uart_pdata); 77 imx53_add_imx_uart(2, &mx53_evk_uart_pdata);
61} 78}
62 79
80static const struct imxi2c_platform_data mx53_evk_i2c_data __initconst = {
81 .bitrate = 100000,
82};
83
84static inline void mx53_evk_fec_reset(void)
85{
86 int ret;
87
88 /* reset FEC PHY */
89 ret = gpio_request(SMD_FEC_PHY_RST, "fec-phy-reset");
90 if (ret) {
91 printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret);
92 return;
93 }
94 gpio_direction_output(SMD_FEC_PHY_RST, 0);
95 gpio_set_value(SMD_FEC_PHY_RST, 0);
96 msleep(1);
97 gpio_set_value(SMD_FEC_PHY_RST, 1);
98}
99
100static struct fec_platform_data mx53_evk_fec_pdata = {
101 .phy = PHY_INTERFACE_MODE_RMII,
102};
103
104static struct spi_board_info mx53_evk_spi_board_info[] __initdata = {
105 {
106 .modalias = "mtd_dataflash",
107 .max_speed_hz = 25000000,
108 .bus_num = 0,
109 .chip_select = 1,
110 .mode = SPI_MODE_0,
111 .platform_data = NULL,
112 },
113};
114
115static int mx53_evk_spi_cs[] = {
116 EVK_ECSPI1_CS0,
117 EVK_ECSPI1_CS1,
118};
119
120static const struct spi_imx_master mx53_evk_spi_data __initconst = {
121 .chipselect = mx53_evk_spi_cs,
122 .num_chipselect = ARRAY_SIZE(mx53_evk_spi_cs),
123};
124
63static void __init mx53_evk_board_init(void) 125static void __init mx53_evk_board_init(void)
64{ 126{
65 mxc_iomux_v3_setup_multiple_pads(mx53_evk_pads, 127 mxc_iomux_v3_setup_multiple_pads(mx53_evk_pads,
66 ARRAY_SIZE(mx53_evk_pads)); 128 ARRAY_SIZE(mx53_evk_pads));
67 mx53_evk_init_uart(); 129 mx53_evk_init_uart();
130 mx53_evk_fec_reset();
131 imx53_add_fec(&mx53_evk_fec_pdata);
132
133 imx53_add_imx_i2c(0, &mx53_evk_i2c_data);
134 imx53_add_imx_i2c(1, &mx53_evk_i2c_data);
135
136 imx53_add_sdhci_esdhc_imx(0, NULL);
137 imx53_add_sdhci_esdhc_imx(1, NULL);
138
139 spi_register_board_info(mx53_evk_spi_board_info,
140 ARRAY_SIZE(mx53_evk_spi_board_info));
141 imx53_add_ecspi(0, &mx53_evk_spi_data);
68} 142}
69 143
70static void __init mx53_evk_timer_init(void) 144static void __init mx53_evk_timer_init(void)
diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c
new file mode 100644
index 000000000000..d1348e04ace3
--- /dev/null
+++ b/arch/arm/mach-mx5/board-mx53_loco.c
@@ -0,0 +1,111 @@
1/*
2 * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
3 */
4
5/*
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/init.h>
22#include <linux/clk.h>
23#include <linux/fec.h>
24#include <linux/delay.h>
25#include <linux/gpio.h>
26
27#include <mach/common.h>
28#include <mach/hardware.h>
29#include <mach/imx-uart.h>
30#include <mach/iomux-mx53.h>
31
32#include <asm/mach-types.h>
33#include <asm/mach/arch.h>
34#include <asm/mach/time.h>
35
36#include "crm_regs.h"
37#include "devices-imx53.h"
38
39#define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6)
40
41static iomux_v3_cfg_t mx53_loco_pads[] = {
42 MX53_PAD_CSI0_D10__UART1_TXD,
43 MX53_PAD_CSI0_D11__UART1_RXD,
44 MX53_PAD_ATA_DIOW__UART1_TXD,
45 MX53_PAD_ATA_DMACK__UART1_RXD,
46
47 MX53_PAD_ATA_BUFFER_EN__UART2_RXD,
48 MX53_PAD_ATA_DMARQ__UART2_TXD,
49 MX53_PAD_ATA_DIOR__UART2_RTS,
50 MX53_PAD_ATA_INTRQ__UART2_CTS,
51
52 MX53_PAD_ATA_CS_0__UART3_TXD,
53 MX53_PAD_ATA_CS_1__UART3_RXD,
54 MX53_PAD_ATA_DA_1__UART3_CTS,
55 MX53_PAD_ATA_DA_2__UART3_RTS,
56};
57
58static const struct imxuart_platform_data mx53_loco_uart_data __initconst = {
59 .flags = IMXUART_HAVE_RTSCTS,
60};
61
62static inline void mx53_loco_init_uart(void)
63{
64 imx53_add_imx_uart(0, &mx53_loco_uart_data);
65 imx53_add_imx_uart(1, &mx53_loco_uart_data);
66 imx53_add_imx_uart(2, &mx53_loco_uart_data);
67}
68
69static inline void mx53_loco_fec_reset(void)
70{
71 int ret;
72
73 /* reset FEC PHY */
74 ret = gpio_request(LOCO_FEC_PHY_RST, "fec-phy-reset");
75 if (ret) {
76 printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret);
77 return;
78 }
79 gpio_direction_output(LOCO_FEC_PHY_RST, 0);
80 msleep(1);
81 gpio_set_value(LOCO_FEC_PHY_RST, 1);
82}
83
84static struct fec_platform_data mx53_loco_fec_data = {
85 .phy = PHY_INTERFACE_MODE_RMII,
86};
87
88static void __init mx53_loco_board_init(void)
89{
90 mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads,
91 ARRAY_SIZE(mx53_loco_pads));
92 mx53_loco_init_uart();
93 mx53_loco_fec_reset();
94 imx53_add_fec(&mx53_loco_fec_data);
95}
96
97static void __init mx53_loco_timer_init(void)
98{
99 mx53_clocks_init(32768, 24000000, 0, 0);
100}
101
102static struct sys_timer mx53_loco_timer = {
103 .init = mx53_loco_timer_init,
104};
105
106MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board")
107 .map_io = mx53_map_io,
108 .init_irq = mx53_init_irq,
109 .init_machine = mx53_loco_board_init,
110 .timer = &mx53_loco_timer,
111MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c
new file mode 100644
index 000000000000..7970f7a48588
--- /dev/null
+++ b/arch/arm/mach-mx5/board-mx53_smd.c
@@ -0,0 +1,111 @@
1/*
2 * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
3 */
4
5/*
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/init.h>
22#include <linux/clk.h>
23#include <linux/fec.h>
24#include <linux/delay.h>
25#include <linux/gpio.h>
26
27#include <mach/common.h>
28#include <mach/hardware.h>
29#include <mach/imx-uart.h>
30#include <mach/iomux-mx53.h>
31
32#include <asm/mach-types.h>
33#include <asm/mach/arch.h>
34#include <asm/mach/time.h>
35
36#include "crm_regs.h"
37#include "devices-imx53.h"
38
39#define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6)
40
41static iomux_v3_cfg_t mx53_smd_pads[] = {
42 MX53_PAD_CSI0_D10__UART1_TXD,
43 MX53_PAD_CSI0_D11__UART1_RXD,
44 MX53_PAD_ATA_DIOW__UART1_TXD,
45 MX53_PAD_ATA_DMACK__UART1_RXD,
46
47 MX53_PAD_ATA_BUFFER_EN__UART2_RXD,
48 MX53_PAD_ATA_DMARQ__UART2_TXD,
49 MX53_PAD_ATA_DIOR__UART2_RTS,
50 MX53_PAD_ATA_INTRQ__UART2_CTS,
51
52 MX53_PAD_ATA_CS_0__UART3_TXD,
53 MX53_PAD_ATA_CS_1__UART3_RXD,
54 MX53_PAD_ATA_DA_1__UART3_CTS,
55 MX53_PAD_ATA_DA_2__UART3_RTS,
56};
57
58static const struct imxuart_platform_data mx53_smd_uart_data __initconst = {
59 .flags = IMXUART_HAVE_RTSCTS,
60};
61
62static inline void mx53_smd_init_uart(void)
63{
64 imx53_add_imx_uart(0, &mx53_smd_uart_data);
65 imx53_add_imx_uart(1, &mx53_smd_uart_data);
66 imx53_add_imx_uart(2, &mx53_smd_uart_data);
67}
68
69static inline void mx53_smd_fec_reset(void)
70{
71 int ret;
72
73 /* reset FEC PHY */
74 ret = gpio_request(SMD_FEC_PHY_RST, "fec-phy-reset");
75 if (ret) {
76 printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret);
77 return;
78 }
79 gpio_direction_output(SMD_FEC_PHY_RST, 0);
80 msleep(1);
81 gpio_set_value(SMD_FEC_PHY_RST, 1);
82}
83
84static struct fec_platform_data mx53_smd_fec_data = {
85 .phy = PHY_INTERFACE_MODE_RMII,
86};
87
88static void __init mx53_smd_board_init(void)
89{
90 mxc_iomux_v3_setup_multiple_pads(mx53_smd_pads,
91 ARRAY_SIZE(mx53_smd_pads));
92 mx53_smd_init_uart();
93 mx53_smd_fec_reset();
94 imx53_add_fec(&mx53_smd_fec_data);
95}
96
97static void __init mx53_smd_timer_init(void)
98{
99 mx53_clocks_init(32768, 24000000, 22579200, 0);
100}
101
102static struct sys_timer mx53_smd_timer = {
103 .init = mx53_smd_timer_init,
104};
105
106MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board")
107 .map_io = mx53_map_io,
108 .init_irq = mx53_init_irq,
109 .init_machine = mx53_smd_board_init,
110 .timer = &mx53_smd_timer,
111MACHINE_END
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c
index 785e1a336183..0a19e7567c0b 100644
--- a/arch/arm/mach-mx5/clock-mx51-mx53.c
+++ b/arch/arm/mach-mx5/clock-mx51-mx53.c
@@ -1191,6 +1191,11 @@ DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET,
1191DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET, 1191DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET,
1192 NULL, NULL, &ipg_clk, &gpt_ipg_clk); 1192 NULL, NULL, &ipg_clk, &gpt_ipg_clk);
1193 1193
1194DEFINE_CLOCK(pwm1_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG6_OFFSET,
1195 NULL, NULL, &ipg_clk, NULL);
1196DEFINE_CLOCK(pwm2_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG8_OFFSET,
1197 NULL, NULL, &ipg_clk, NULL);
1198
1194/* I2C */ 1199/* I2C */
1195DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET, 1200DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET,
1196 NULL, NULL, &ipg_clk, NULL); 1201 NULL, NULL, &ipg_clk, NULL);
@@ -1283,6 +1288,8 @@ static struct clk_lookup mx51_lookups[] = {
1283 _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) 1288 _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk)
1284 _REGISTER_CLOCK(NULL, "gpt", gpt_clk) 1289 _REGISTER_CLOCK(NULL, "gpt", gpt_clk)
1285 _REGISTER_CLOCK("fec.0", NULL, fec_clk) 1290 _REGISTER_CLOCK("fec.0", NULL, fec_clk)
1291 _REGISTER_CLOCK("mxc_pwm.0", "pwm", pwm1_clk)
1292 _REGISTER_CLOCK("mxc_pwm.1", "pwm", pwm2_clk)
1286 _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk) 1293 _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk)
1287 _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk) 1294 _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk)
1288 _REGISTER_CLOCK("imx-i2c.2", NULL, hsi2c_clk) 1295 _REGISTER_CLOCK("imx-i2c.2", NULL, hsi2c_clk)
@@ -1295,7 +1302,7 @@ static struct clk_lookup mx51_lookups[] = {
1295 _REGISTER_CLOCK("mxc-ehci.2", "usb_ahb", usb_ahb_clk) 1302 _REGISTER_CLOCK("mxc-ehci.2", "usb_ahb", usb_ahb_clk)
1296 _REGISTER_CLOCK("fsl-usb2-udc", "usb", usboh3_clk) 1303 _REGISTER_CLOCK("fsl-usb2-udc", "usb", usboh3_clk)
1297 _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", ahb_clk) 1304 _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", ahb_clk)
1298 _REGISTER_CLOCK("imx-keypad.0", NULL, kpp_clk) 1305 _REGISTER_CLOCK("imx-keypad", NULL, kpp_clk)
1299 _REGISTER_CLOCK("mxc_nand", NULL, nfc_clk) 1306 _REGISTER_CLOCK("mxc_nand", NULL, nfc_clk)
1300 _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) 1307 _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
1301 _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) 1308 _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
@@ -1326,6 +1333,13 @@ static struct clk_lookup mx53_lookups[] = {
1326 _REGISTER_CLOCK(NULL, "gpt", gpt_clk) 1333 _REGISTER_CLOCK(NULL, "gpt", gpt_clk)
1327 _REGISTER_CLOCK("fec.0", NULL, fec_clk) 1334 _REGISTER_CLOCK("fec.0", NULL, fec_clk)
1328 _REGISTER_CLOCK(NULL, "iim_clk", iim_clk) 1335 _REGISTER_CLOCK(NULL, "iim_clk", iim_clk)
1336 _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk)
1337 _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk)
1338 _REGISTER_CLOCK("sdhci-esdhc-imx.0", NULL, esdhc1_clk)
1339 _REGISTER_CLOCK("sdhci-esdhc-imx.1", NULL, esdhc2_clk)
1340 _REGISTER_CLOCK("imx53-ecspi.0", NULL, ecspi1_clk)
1341 _REGISTER_CLOCK("imx53-ecspi.1", NULL, ecspi2_clk)
1342 _REGISTER_CLOCK("imx53-cspi.0", NULL, cspi_clk)
1329}; 1343};
1330 1344
1331static void clk_tree_init(void) 1345static void clk_tree_init(void)
@@ -1363,7 +1377,6 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc,
1363 1377
1364 clk_tree_init(); 1378 clk_tree_init();
1365 1379
1366 clk_set_parent(&uart_root_clk, &pll3_sw_clk);
1367 clk_enable(&cpu_clk); 1380 clk_enable(&cpu_clk);
1368 clk_enable(&main_bus_clk); 1381 clk_enable(&main_bus_clk);
1369 1382
@@ -1406,6 +1419,7 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc,
1406 1419
1407 clk_tree_init(); 1420 clk_tree_init();
1408 1421
1422 clk_set_parent(&uart_root_clk, &pll3_sw_clk);
1409 clk_enable(&cpu_clk); 1423 clk_enable(&cpu_clk);
1410 clk_enable(&main_bus_clk); 1424 clk_enable(&main_bus_clk);
1411 1425
diff --git a/arch/arm/mach-mx5/devices-imx51.h b/arch/arm/mach-mx5/devices-imx51.h
index 6302e4670000..7fff485e5603 100644
--- a/arch/arm/mach-mx5/devices-imx51.h
+++ b/arch/arm/mach-mx5/devices-imx51.h
@@ -47,3 +47,11 @@ extern const struct imx_spi_imx_data imx51_ecspi_data[] __initconst;
47extern const struct imx_imx2_wdt_data imx51_imx2_wdt_data[] __initconst; 47extern const struct imx_imx2_wdt_data imx51_imx2_wdt_data[] __initconst;
48#define imx51_add_imx2_wdt(id, pdata) \ 48#define imx51_add_imx2_wdt(id, pdata) \
49 imx_add_imx2_wdt(&imx51_imx2_wdt_data[id]) 49 imx_add_imx2_wdt(&imx51_imx2_wdt_data[id])
50
51extern const struct imx_mxc_pwm_data imx51_mxc_pwm_data[] __initconst;
52#define imx51_add_mxc_pwm(id) \
53 imx_add_mxc_pwm(&imx51_mxc_pwm_data[id])
54
55extern const struct imx_imx_keypad_data imx51_imx_keypad_data __initconst;
56#define imx51_add_imx_keypad(pdata) \
57 imx_add_imx_keypad(&imx51_imx_keypad_data, pdata)
diff --git a/arch/arm/mach-mx5/devices-imx53.h b/arch/arm/mach-mx5/devices-imx53.h
index 9d0ec2507fa6..8639735a117b 100644
--- a/arch/arm/mach-mx5/devices-imx53.h
+++ b/arch/arm/mach-mx5/devices-imx53.h
@@ -8,6 +8,24 @@
8#include <mach/mx53.h> 8#include <mach/mx53.h>
9#include <mach/devices-common.h> 9#include <mach/devices-common.h>
10 10
11extern const struct imx_fec_data imx53_fec_data __initconst;
12#define imx53_add_fec(pdata) \
13 imx_add_fec(&imx53_fec_data, pdata)
14
11extern const struct imx_imx_uart_1irq_data imx53_imx_uart_data[] __initconst; 15extern const struct imx_imx_uart_1irq_data imx53_imx_uart_data[] __initconst;
12#define imx53_add_imx_uart(id, pdata) \ 16#define imx53_add_imx_uart(id, pdata) \
13 imx_add_imx_uart_1irq(&imx53_imx_uart_data[id], pdata) 17 imx_add_imx_uart_1irq(&imx53_imx_uart_data[id], pdata)
18
19
20extern const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst;
21#define imx53_add_imx_i2c(id, pdata) \
22 imx_add_imx_i2c(&imx53_imx_i2c_data[id], pdata)
23
24extern const struct imx_sdhci_esdhc_imx_data
25imx53_sdhci_esdhc_imx_data[] __initconst;
26#define imx53_add_sdhci_esdhc_imx(id, pdata) \
27 imx_add_sdhci_esdhc_imx(&imx53_sdhci_esdhc_imx_data[id], pdata)
28
29extern const struct imx_spi_imx_data imx53_ecspi_data[] __initconst;
30#define imx53_add_ecspi(id, pdata) \
31 imx_add_spi_imx(&imx53_ecspi_data[id], pdata)
diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c
index 1bda5cb339dc..153ada53e575 100644
--- a/arch/arm/mach-mx5/devices.c
+++ b/arch/arm/mach-mx5/devices.c
@@ -120,25 +120,6 @@ struct platform_device mxc_usbh2_device = {
120 }, 120 },
121}; 121};
122 122
123static struct resource mxc_kpp_resources[] = {
124 {
125 .start = MX51_MXC_INT_KPP,
126 .end = MX51_MXC_INT_KPP,
127 .flags = IORESOURCE_IRQ,
128 } , {
129 .start = MX51_KPP_BASE_ADDR,
130 .end = MX51_KPP_BASE_ADDR + 0x8 - 1,
131 .flags = IORESOURCE_MEM,
132 },
133};
134
135struct platform_device mxc_keypad_device = {
136 .name = "imx-keypad",
137 .id = 0,
138 .num_resources = ARRAY_SIZE(mxc_kpp_resources),
139 .resource = mxc_kpp_resources,
140};
141
142static struct mxc_gpio_port mxc_gpio_ports[] = { 123static struct mxc_gpio_port mxc_gpio_ports[] = {
143 { 124 {
144 .chip.label = "gpio-0", 125 .chip.label = "gpio-0",
diff --git a/arch/arm/mach-mx5/devices.h b/arch/arm/mach-mx5/devices.h
index 16891aa3573c..55a5129bc29f 100644
--- a/arch/arm/mach-mx5/devices.h
+++ b/arch/arm/mach-mx5/devices.h
@@ -3,4 +3,3 @@ extern struct platform_device mxc_usbh1_device;
3extern struct platform_device mxc_usbh2_device; 3extern struct platform_device mxc_usbh2_device;
4extern struct platform_device mxc_usbdr_udc_device; 4extern struct platform_device mxc_usbdr_udc_device;
5extern struct platform_device mxc_hsi2c_device; 5extern struct platform_device mxc_hsi2c_device;
6extern struct platform_device mxc_keypad_device;
diff --git a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
index c96d018ff8a2..e83ffadb65f8 100644
--- a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
+++ b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
@@ -21,7 +21,6 @@
21#include <linux/fsl_devices.h> 21#include <linux/fsl_devices.h>
22#include <linux/i2c/tsc2007.h> 22#include <linux/i2c/tsc2007.h>
23#include <linux/leds.h> 23#include <linux/leds.h>
24#include <linux/input/matrix_keypad.h>
25 24
26#include <mach/common.h> 25#include <mach/common.h>
27#include <mach/hardware.h> 26#include <mach/hardware.h>
@@ -157,7 +156,7 @@ static int mbimx51_keymap[] = {
157 KEY(3, 3, KEY_ENTER), 156 KEY(3, 3, KEY_ENTER),
158}; 157};
159 158
160static struct matrix_keymap_data mbimx51_map_data = { 159static const struct matrix_keymap_data mbimx51_map_data __initconst = {
161 .keymap = mbimx51_keymap, 160 .keymap = mbimx51_keymap,
162 .keymap_size = ARRAY_SIZE(mbimx51_keymap), 161 .keymap_size = ARRAY_SIZE(mbimx51_keymap),
163}; 162};
@@ -209,7 +208,7 @@ void __init eukrea_mbimx51_baseboard_init(void)
209 208
210 platform_add_devices(devices, ARRAY_SIZE(devices)); 209 platform_add_devices(devices, ARRAY_SIZE(devices));
211 210
212 mxc_register_device(&mxc_keypad_device, &mbimx51_map_data); 211 imx51_add_imx_keypad(&mbimx51_map_data);
213 212
214 gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq"); 213 gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq");
215 gpio_direction_input(MBIMX51_TSC2007_GPIO); 214 gpio_direction_input(MBIMX51_TSC2007_GPIO);
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index c4ac7b415195..8bfc8df54617 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -15,7 +15,7 @@ comment "MXS platforms:"
15config MACH_MX23EVK 15config MACH_MX23EVK
16 bool "Support MX23EVK Platform" 16 bool "Support MX23EVK Platform"
17 select SOC_IMX23 17 select SOC_IMX23
18 select MXS_HAVE_PLATFORM_DUART 18 select MXS_HAVE_AMBA_DUART
19 default y 19 default y
20 help 20 help
21 Include support for MX23EVK platform. This includes specific 21 Include support for MX23EVK platform. This includes specific
@@ -24,7 +24,7 @@ config MACH_MX23EVK
24config MACH_MX28EVK 24config MACH_MX28EVK
25 bool "Support MX28EVK Platform" 25 bool "Support MX28EVK Platform"
26 select SOC_IMX28 26 select SOC_IMX28
27 select MXS_HAVE_PLATFORM_DUART 27 select MXS_HAVE_AMBA_DUART
28 select MXS_HAVE_PLATFORM_FEC 28 select MXS_HAVE_PLATFORM_FEC
29 default y 29 default y
30 help 30 help
diff --git a/arch/arm/mach-mxs/clock-mx23.c b/arch/arm/mach-mxs/clock-mx23.c
index 8f5a19ab558c..b1a362ebfded 100644
--- a/arch/arm/mach-mxs/clock-mx23.c
+++ b/arch/arm/mach-mxs/clock-mx23.c
@@ -21,6 +21,7 @@
21#include <linux/clk.h> 21#include <linux/clk.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/jiffies.h> 23#include <linux/jiffies.h>
24#include <linux/clkdev.h>
24 25
25#include <asm/clkdev.h> 26#include <asm/clkdev.h>
26#include <asm/div64.h> 27#include <asm/div64.h>
@@ -437,10 +438,12 @@ _DEFINE_CLOCK(clk32k_clk, XTAL, TIMROT_CLK32K_GATE, &ref_xtal_clk);
437 }, 438 },
438 439
439static struct clk_lookup lookups[] = { 440static struct clk_lookup lookups[] = {
440 _REGISTER_CLOCK("mxs-duart.0", NULL, uart_clk) 441 /* for amba bus driver */
442 _REGISTER_CLOCK("duart", "apb_pclk", xbus_clk)
443 /* for amba-pl011 driver */
444 _REGISTER_CLOCK("duart", NULL, uart_clk)
441 _REGISTER_CLOCK("rtc", NULL, rtc_clk) 445 _REGISTER_CLOCK("rtc", NULL, rtc_clk)
442 _REGISTER_CLOCK(NULL, "hclk", hbus_clk) 446 _REGISTER_CLOCK(NULL, "hclk", hbus_clk)
443 _REGISTER_CLOCK(NULL, "xclk", xbus_clk)
444 _REGISTER_CLOCK(NULL, "usb", usb_clk) 447 _REGISTER_CLOCK(NULL, "usb", usb_clk)
445 _REGISTER_CLOCK(NULL, "audio", audio_clk) 448 _REGISTER_CLOCK(NULL, "audio", audio_clk)
446 _REGISTER_CLOCK(NULL, "pwm", pwm_clk) 449 _REGISTER_CLOCK(NULL, "pwm", pwm_clk)
@@ -518,6 +521,12 @@ int __init mx23_clocks_init(void)
518{ 521{
519 clk_misc_init(); 522 clk_misc_init();
520 523
524 clk_enable(&cpu_clk);
525 clk_enable(&hbus_clk);
526 clk_enable(&xbus_clk);
527 clk_enable(&emi_clk);
528 clk_enable(&uart_clk);
529
521 clkdev_add_table(lookups, ARRAY_SIZE(lookups)); 530 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
522 531
523 mxs_timer_init(&clk32k_clk, MX23_INT_TIMER0); 532 mxs_timer_init(&clk32k_clk, MX23_INT_TIMER0);
diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c
index 74e2103c6011..56312c092a9e 100644
--- a/arch/arm/mach-mxs/clock-mx28.c
+++ b/arch/arm/mach-mxs/clock-mx28.c
@@ -21,6 +21,7 @@
21#include <linux/clk.h> 21#include <linux/clk.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/jiffies.h> 23#include <linux/jiffies.h>
24#include <linux/clkdev.h>
24 25
25#include <asm/clkdev.h> 26#include <asm/clkdev.h>
26#include <asm/div64.h> 27#include <asm/div64.h>
@@ -602,7 +603,12 @@ _DEFINE_CLOCK(fec_clk, ENET, DISABLE, &hbus_clk);
602 }, 603 },
603 604
604static struct clk_lookup lookups[] = { 605static struct clk_lookup lookups[] = {
605 _REGISTER_CLOCK("mxs-duart.0", NULL, uart_clk) 606 /* for amba bus driver */
607 _REGISTER_CLOCK("duart", "apb_pclk", xbus_clk)
608 /* for amba-pl011 driver */
609 _REGISTER_CLOCK("duart", NULL, uart_clk)
610 _REGISTER_CLOCK("imx28-fec.0", NULL, fec_clk)
611 _REGISTER_CLOCK("imx28-fec.1", NULL, fec_clk)
606 _REGISTER_CLOCK("fec.0", NULL, fec_clk) 612 _REGISTER_CLOCK("fec.0", NULL, fec_clk)
607 _REGISTER_CLOCK("rtc", NULL, rtc_clk) 613 _REGISTER_CLOCK("rtc", NULL, rtc_clk)
608 _REGISTER_CLOCK("pll2", NULL, pll2_clk) 614 _REGISTER_CLOCK("pll2", NULL, pll2_clk)
@@ -726,6 +732,12 @@ int __init mx28_clocks_init(void)
726{ 732{
727 clk_misc_init(); 733 clk_misc_init();
728 734
735 clk_enable(&cpu_clk);
736 clk_enable(&hbus_clk);
737 clk_enable(&xbus_clk);
738 clk_enable(&emi_clk);
739 clk_enable(&uart_clk);
740
729 clkdev_add_table(lookups, ARRAY_SIZE(lookups)); 741 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
730 742
731 mxs_timer_init(&clk32k_clk, MX28_INT_TIMER0); 743 mxs_timer_init(&clk32k_clk, MX28_INT_TIMER0);
diff --git a/arch/arm/mach-mxs/devices-mx23.h b/arch/arm/mach-mxs/devices-mx23.h
index d0f49fc0abb5..1256788561d0 100644
--- a/arch/arm/mach-mxs/devices-mx23.h
+++ b/arch/arm/mach-mxs/devices-mx23.h
@@ -11,6 +11,6 @@
11#include <mach/mx23.h> 11#include <mach/mx23.h>
12#include <mach/devices-common.h> 12#include <mach/devices-common.h>
13 13
14extern const struct mxs_duart_data mx23_duart_data __initconst; 14extern const struct amba_device mx23_duart_device __initconst;
15#define mx23_add_duart() \ 15#define mx23_add_duart() \
16 mxs_add_duart(&mx23_duart_data) 16 mxs_add_duart(&mx23_duart_device)
diff --git a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h
index 00b736c434ba..33773a6333a2 100644
--- a/arch/arm/mach-mxs/devices-mx28.h
+++ b/arch/arm/mach-mxs/devices-mx28.h
@@ -11,9 +11,9 @@
11#include <mach/mx28.h> 11#include <mach/mx28.h>
12#include <mach/devices-common.h> 12#include <mach/devices-common.h>
13 13
14extern const struct mxs_duart_data mx28_duart_data __initconst; 14extern const struct amba_device mx28_duart_device __initconst;
15#define mx28_add_duart() \ 15#define mx28_add_duart() \
16 mxs_add_duart(&mx28_duart_data) 16 mxs_add_duart(&mx28_duart_device)
17 17
18extern const struct mxs_fec_data mx28_fec_data[] __initconst; 18extern const struct mxs_fec_data mx28_fec_data[] __initconst;
19#define mx28_add_fec(id, pdata) \ 19#define mx28_add_fec(id, pdata) \
diff --git a/arch/arm/mach-mxs/devices.c b/arch/arm/mach-mxs/devices.c
index 6b60f02ca2e3..c20d54740b0b 100644
--- a/arch/arm/mach-mxs/devices.c
+++ b/arch/arm/mach-mxs/devices.c
@@ -19,9 +19,8 @@
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/err.h>
23#include <linux/platform_device.h> 22#include <linux/platform_device.h>
24#include <mach/common.h> 23#include <linux/amba/bus.h>
25 24
26struct platform_device *__init mxs_add_platform_device_dmamask( 25struct platform_device *__init mxs_add_platform_device_dmamask(
27 const char *name, int id, 26 const char *name, int id,
@@ -73,3 +72,17 @@ err:
73 72
74 return pdev; 73 return pdev;
75} 74}
75
76int __init mxs_add_amba_device(const struct amba_device *dev)
77{
78 struct amba_device *adev = kmalloc(sizeof(*adev), GFP_KERNEL);
79
80 if (!adev) {
81 pr_err("%s: failed to allocate memory", __func__);
82 return -ENOMEM;
83 }
84
85 *adev = *dev;
86
87 return amba_device_register(adev, &iomem_resource);
88}
diff --git a/arch/arm/mach-mxs/devices/Kconfig b/arch/arm/mach-mxs/devices/Kconfig
index a35a2dc55395..cf7dc1ae575b 100644
--- a/arch/arm/mach-mxs/devices/Kconfig
+++ b/arch/arm/mach-mxs/devices/Kconfig
@@ -1,5 +1,6 @@
1config MXS_HAVE_PLATFORM_DUART 1config MXS_HAVE_AMBA_DUART
2 bool 2 bool
3 select ARM_AMBA
3 4
4config MXS_HAVE_PLATFORM_FEC 5config MXS_HAVE_PLATFORM_FEC
5 bool 6 bool
diff --git a/arch/arm/mach-mxs/devices/Makefile b/arch/arm/mach-mxs/devices/Makefile
index 4b5266a3e6d9..d0a09f6934b8 100644
--- a/arch/arm/mach-mxs/devices/Makefile
+++ b/arch/arm/mach-mxs/devices/Makefile
@@ -1,2 +1,2 @@
1obj-$(CONFIG_MXS_HAVE_PLATFORM_DUART) += platform-duart.o 1obj-$(CONFIG_MXS_HAVE_AMBA_DUART) += amba-duart.o
2obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o 2obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o
diff --git a/arch/arm/mach-mxs/devices/amba-duart.c b/arch/arm/mach-mxs/devices/amba-duart.c
new file mode 100644
index 000000000000..a559db09b49c
--- /dev/null
+++ b/arch/arm/mach-mxs/devices/amba-duart.c
@@ -0,0 +1,40 @@
1/*
2 * Copyright (C) 2009-2010 Pengutronix
3 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
4 *
5 * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License version 2 as published by the
9 * Free Software Foundation.
10 */
11#include <asm/irq.h>
12#include <mach/mx23.h>
13#include <mach/mx28.h>
14#include <mach/devices-common.h>
15
16#define MXS_AMBA_DUART_DEVICE(name, soc) \
17const struct amba_device name##_device __initconst = { \
18 .dev = { \
19 .init_name = "duart", \
20 }, \
21 .res = { \
22 .start = soc ## _DUART_BASE_ADDR, \
23 .end = (soc ## _DUART_BASE_ADDR) + SZ_8K - 1, \
24 .flags = IORESOURCE_MEM, \
25 }, \
26 .irq = {soc ## _INT_DUART, NO_IRQ}, \
27}
28
29#ifdef CONFIG_SOC_IMX23
30MXS_AMBA_DUART_DEVICE(mx23_duart, MX23);
31#endif
32
33#ifdef CONFIG_SOC_IMX28
34MXS_AMBA_DUART_DEVICE(mx28_duart, MX28);
35#endif
36
37int __init mxs_add_duart(const struct amba_device *dev)
38{
39 return mxs_add_amba_device(dev);
40}
diff --git a/arch/arm/mach-mxs/devices/platform-duart.c b/arch/arm/mach-mxs/devices/platform-duart.c
deleted file mode 100644
index 2fe0df5b0aad..000000000000
--- a/arch/arm/mach-mxs/devices/platform-duart.c
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * Copyright (C) 2009-2010 Pengutronix
3 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
4 *
5 * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License version 2 as published by the
9 * Free Software Foundation.
10 */
11#include <mach/mx23.h>
12#include <mach/mx28.h>
13#include <mach/devices-common.h>
14
15#define mxs_duart_data_entry(soc) \
16 { \
17 .iobase = soc ## _DUART_BASE_ADDR, \
18 .irq = soc ## _INT_DUART, \
19 }
20
21#ifdef CONFIG_SOC_IMX23
22const struct mxs_duart_data mx23_duart_data __initconst =
23 mxs_duart_data_entry(MX23);
24#endif
25
26#ifdef CONFIG_SOC_IMX28
27const struct mxs_duart_data mx28_duart_data __initconst =
28 mxs_duart_data_entry(MX28);
29#endif
30
31struct platform_device *__init mxs_add_duart(
32 const struct mxs_duart_data *data)
33{
34 struct resource res[] = {
35 {
36 .start = data->iobase,
37 .end = data->iobase + SZ_8K - 1,
38 .flags = IORESOURCE_MEM,
39 }, {
40 .start = data->irq,
41 .end = data->irq,
42 .flags = IORESOURCE_IRQ,
43 },
44 };
45
46 return mxs_add_platform_device("mxs-duart", 0, res, ARRAY_SIZE(res),
47 NULL, 0);
48}
diff --git a/arch/arm/mach-mxs/devices/platform-fec.c b/arch/arm/mach-mxs/devices/platform-fec.c
index c08168cf3dec..c42dff72b46c 100644
--- a/arch/arm/mach-mxs/devices/platform-fec.c
+++ b/arch/arm/mach-mxs/devices/platform-fec.c
@@ -45,6 +45,6 @@ struct platform_device *__init mxs_add_fec(
45 }, 45 },
46 }; 46 };
47 47
48 return mxs_add_platform_device("fec", data->id, 48 return mxs_add_platform_device("imx28-fec", data->id,
49 res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); 49 res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
50} 50}
diff --git a/arch/arm/mach-mxs/include/mach/devices-common.h b/arch/arm/mach-mxs/include/mach/devices-common.h
index 3da48d4d3273..6c3d1a103433 100644
--- a/arch/arm/mach-mxs/include/mach/devices-common.h
+++ b/arch/arm/mach-mxs/include/mach/devices-common.h
@@ -9,6 +9,7 @@
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/amba/bus.h>
12 13
13struct platform_device *mxs_add_platform_device_dmamask( 14struct platform_device *mxs_add_platform_device_dmamask(
14 const char *name, int id, 15 const char *name, int id,
@@ -24,14 +25,10 @@ static inline struct platform_device *mxs_add_platform_device(
24 name, id, res, num_resources, data, size_data, 0); 25 name, id, res, num_resources, data, size_data, 0);
25} 26}
26 27
28int __init mxs_add_amba_device(const struct amba_device *dev);
29
27/* duart */ 30/* duart */
28struct mxs_duart_data { 31int __init mxs_add_duart(const struct amba_device *dev);
29 resource_size_t iobase;
30 resource_size_t iosize;
31 resource_size_t irq;
32};
33struct platform_device *__init mxs_add_duart(
34 const struct mxs_duart_data *data);
35 32
36/* fec */ 33/* fec */
37#include <linux/fec.h> 34#include <linux/fec.h>
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
index d162e95910f3..8e2c5975001e 100644
--- a/arch/arm/mach-mxs/mach-mx28evk.c
+++ b/arch/arm/mach-mxs/mach-mx28evk.c
@@ -57,6 +57,19 @@ static const iomux_cfg_t mx28evk_pads[] __initconst = {
57 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), 57 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
58 MX28_PAD_ENET_CLK__CLKCTRL_ENET | 58 MX28_PAD_ENET_CLK__CLKCTRL_ENET |
59 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), 59 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
60 /* fec1 */
61 MX28_PAD_ENET0_CRS__ENET1_RX_EN |
62 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
63 MX28_PAD_ENET0_RXD2__ENET1_RXD0 |
64 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
65 MX28_PAD_ENET0_RXD3__ENET1_RXD1 |
66 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
67 MX28_PAD_ENET0_COL__ENET1_TX_EN |
68 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
69 MX28_PAD_ENET0_TXD2__ENET1_TXD0 |
70 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
71 MX28_PAD_ENET0_TXD3__ENET1_TXD1 |
72 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
60 /* phy power line */ 73 /* phy power line */
61 MX28_PAD_SSP1_DATA3__GPIO_2_15 | 74 MX28_PAD_SSP1_DATA3__GPIO_2_15 |
62 (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), 75 (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
@@ -106,8 +119,14 @@ static void __init mx28evk_fec_reset(void)
106 gpio_set_value(MX28EVK_FEC_PHY_RESET, 1); 119 gpio_set_value(MX28EVK_FEC_PHY_RESET, 1);
107} 120}
108 121
109static const struct fec_platform_data mx28_fec_pdata __initconst = { 122static struct fec_platform_data mx28_fec_pdata[] = {
110 .phy = PHY_INTERFACE_MODE_RMII, 123 {
124 /* fec0 */
125 .phy = PHY_INTERFACE_MODE_RMII,
126 }, {
127 /* fec1 */
128 .phy = PHY_INTERFACE_MODE_RMII,
129 },
111}; 130};
112 131
113static void __init mx28evk_init(void) 132static void __init mx28evk_init(void)
@@ -117,7 +136,8 @@ static void __init mx28evk_init(void)
117 mx28_add_duart(); 136 mx28_add_duart();
118 137
119 mx28evk_fec_reset(); 138 mx28evk_fec_reset();
120 mx28_add_fec(0, &mx28_fec_pdata); 139 mx28_add_fec(0, &mx28_fec_pdata[0]);
140 mx28_add_fec(1, &mx28_fec_pdata[1]);
121} 141}
122 142
123static void __init mx28evk_timer_init(void) 143static void __init mx28evk_timer_init(void)
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig
index 2537166468ac..b9ab1d58b5e7 100644
--- a/arch/arm/plat-mxc/devices/Kconfig
+++ b/arch/arm/plat-mxc/devices/Kconfig
@@ -1,6 +1,6 @@
1config IMX_HAVE_PLATFORM_FEC 1config IMX_HAVE_PLATFORM_FEC
2 bool 2 bool
3 default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX51 3 default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX51 || SOC_IMX53
4 4
5config IMX_HAVE_PLATFORM_FLEXCAN 5config IMX_HAVE_PLATFORM_FLEXCAN
6 select HAVE_CAN_FLEXCAN if CAN 6 select HAVE_CAN_FLEXCAN if CAN
diff --git a/arch/arm/plat-mxc/devices/platform-fec.c b/arch/arm/plat-mxc/devices/platform-fec.c
index 269ec78aba77..b50c3517d083 100644
--- a/arch/arm/plat-mxc/devices/platform-fec.c
+++ b/arch/arm/plat-mxc/devices/platform-fec.c
@@ -36,6 +36,11 @@ const struct imx_fec_data imx51_fec_data __initconst =
36 imx_fec_data_entry_single(MX51); 36 imx_fec_data_entry_single(MX51);
37#endif 37#endif
38 38
39#ifdef CONFIG_SOC_IMX53
40const struct imx_fec_data imx53_fec_data __initconst =
41 imx_fec_data_entry_single(MX53);
42#endif
43
39struct platform_device *__init imx_add_fec( 44struct platform_device *__init imx_add_fec(
40 const struct imx_fec_data *data, 45 const struct imx_fec_data *data,
41 const struct fec_platform_data *pdata) 46 const struct fec_platform_data *pdata)
diff --git a/arch/arm/plat-mxc/devices/platform-imx-i2c.c b/arch/arm/plat-mxc/devices/platform-imx-i2c.c
index 72ba880c75af..7ba94e1bbda3 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-i2c.c
+++ b/arch/arm/plat-mxc/devices/platform-imx-i2c.c
@@ -78,6 +78,15 @@ const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
78}; 78};
79#endif /* ifdef CONFIG_SOC_IMX51 */ 79#endif /* ifdef CONFIG_SOC_IMX51 */
80 80
81#ifdef CONFIG_SOC_IMX53
82const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst = {
83#define imx53_imx_i2c_data_entry(_id, _hwid) \
84 imx_imx_i2c_data_entry(MX53, _id, _hwid, SZ_4K)
85 imx53_imx_i2c_data_entry(0, 1),
86 imx53_imx_i2c_data_entry(1, 2),
87};
88#endif /* ifdef CONFIG_SOC_IMX51 */
89
81struct platform_device *__init imx_add_imx_i2c( 90struct platform_device *__init imx_add_imx_i2c(
82 const struct imx_imx_i2c_data *data, 91 const struct imx_imx_i2c_data *data,
83 const struct imxi2c_platform_data *pdata) 92 const struct imxi2c_platform_data *pdata)
diff --git a/arch/arm/plat-mxc/devices/platform-imx-keypad.c b/arch/arm/plat-mxc/devices/platform-imx-keypad.c
index 40238f0b8643..26366114b021 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-keypad.c
+++ b/arch/arm/plat-mxc/devices/platform-imx-keypad.c
@@ -41,6 +41,11 @@ const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst =
41 imx_imx_keypad_data_entry_single(MX35, SZ_16); 41 imx_imx_keypad_data_entry_single(MX35, SZ_16);
42#endif /* ifdef CONFIG_SOC_IMX35 */ 42#endif /* ifdef CONFIG_SOC_IMX35 */
43 43
44#ifdef CONFIG_SOC_IMX51
45const struct imx_imx_keypad_data imx51_imx_keypad_data __initconst =
46 imx_imx_keypad_data_entry_single(MX51, SZ_16);
47#endif /* ifdef CONFIG_SOC_IMX51 */
48
44struct platform_device *__init imx_add_imx_keypad( 49struct platform_device *__init imx_add_imx_keypad(
45 const struct imx_imx_keypad_data *data, 50 const struct imx_imx_keypad_data *data,
46 const struct matrix_keymap_data *pdata) 51 const struct matrix_keymap_data *pdata)
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_pwm.c b/arch/arm/plat-mxc/devices/platform-mxc_pwm.c
index 3d8ebdba38ee..b0c4ae298111 100644
--- a/arch/arm/plat-mxc/devices/platform-mxc_pwm.c
+++ b/arch/arm/plat-mxc/devices/platform-mxc_pwm.c
@@ -40,6 +40,15 @@ const struct imx_mxc_pwm_data imx27_mxc_pwm_data __initconst =
40 imx_mxc_pwm_data_entry_single(MX27, 0, , SZ_4K); 40 imx_mxc_pwm_data_entry_single(MX27, 0, , SZ_4K);
41#endif /* ifdef CONFIG_SOC_IMX27 */ 41#endif /* ifdef CONFIG_SOC_IMX27 */
42 42
43#ifdef CONFIG_SOC_IMX51
44const struct imx_mxc_pwm_data imx51_mxc_pwm_data[] __initconst = {
45#define imx51_mxc_pwm_data_entry(_id, _hwid) \
46 imx_mxc_pwm_data_entry(MX51, _id, _hwid, SZ_16K)
47 imx51_mxc_pwm_data_entry(0, 1),
48 imx51_mxc_pwm_data_entry(1, 2),
49};
50#endif /* ifdef CONFIG_SOC_IMX51 */
51
43struct platform_device *__init imx_add_mxc_pwm( 52struct platform_device *__init imx_add_mxc_pwm(
44 const struct imx_mxc_pwm_data *data) 53 const struct imx_mxc_pwm_data *data)
45{ 54{
diff --git a/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c b/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c
index b3525648a01d..6b2940b93d94 100644
--- a/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c
+++ b/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c
@@ -53,6 +53,18 @@ imx51_sdhci_esdhc_imx_data[] __initconst = {
53}; 53};
54#endif /* ifdef CONFIG_SOC_IMX51 */ 54#endif /* ifdef CONFIG_SOC_IMX51 */
55 55
56#ifdef CONFIG_SOC_IMX53
57const struct imx_sdhci_esdhc_imx_data
58imx53_sdhci_esdhc_imx_data[] __initconst = {
59#define imx53_sdhci_esdhc_imx_data_entry(_id, _hwid) \
60 imx_sdhci_esdhc_imx_data_entry(MX53, _id, _hwid)
61 imx53_sdhci_esdhc_imx_data_entry(0, 1),
62 imx53_sdhci_esdhc_imx_data_entry(1, 2),
63 imx53_sdhci_esdhc_imx_data_entry(2, 3),
64 imx53_sdhci_esdhc_imx_data_entry(3, 4),
65};
66#endif /* ifdef CONFIG_SOC_IMX53 */
67
56struct platform_device *__init imx_add_sdhci_esdhc_imx( 68struct platform_device *__init imx_add_sdhci_esdhc_imx(
57 const struct imx_sdhci_esdhc_imx_data *data, 69 const struct imx_sdhci_esdhc_imx_data *data,
58 const struct esdhc_platform_data *pdata) 70 const struct esdhc_platform_data *pdata)
diff --git a/arch/arm/plat-mxc/devices/platform-spi_imx.c b/arch/arm/plat-mxc/devices/platform-spi_imx.c
index 8ea49adcdfc1..013c85f20b58 100644
--- a/arch/arm/plat-mxc/devices/platform-spi_imx.c
+++ b/arch/arm/plat-mxc/devices/platform-spi_imx.c
@@ -81,6 +81,18 @@ const struct imx_spi_imx_data imx51_ecspi_data[] __initconst = {
81}; 81};
82#endif /* ifdef CONFIG_SOC_IMX51 */ 82#endif /* ifdef CONFIG_SOC_IMX51 */
83 83
84#ifdef CONFIG_SOC_IMX53
85const struct imx_spi_imx_data imx53_cspi_data __initconst =
86 imx_spi_imx_data_entry_single(MX53, CSPI, "imx53-cspi", 0, , SZ_4K);
87
88const struct imx_spi_imx_data imx53_ecspi_data[] __initconst = {
89#define imx53_ecspi_data_entry(_id, _hwid) \
90 imx_spi_imx_data_entry(MX53, ECSPI, "imx53-ecspi", _id, _hwid, SZ_4K)
91 imx53_ecspi_data_entry(0, 1),
92 imx53_ecspi_data_entry(1, 2),
93};
94#endif /* ifdef CONFIG_SOC_IMX53 */
95
84struct platform_device *__init imx_add_spi_imx( 96struct platform_device *__init imx_add_spi_imx(
85 const struct imx_spi_imx_data *data, 97 const struct imx_spi_imx_data *data,
86 const struct spi_imx_master *pdata) 98 const struct spi_imx_master *pdata)
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx53.h b/arch/arm/plat-mxc/include/mach/iomux-mx53.h
index 5deee019c29e..68e11d7ab79d 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx53.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-mx53.h
@@ -34,7 +34,6 @@ typedef enum iomux_config {
34 IOMUX_CONFIG_ALT6, 34 IOMUX_CONFIG_ALT6,
35 IOMUX_CONFIG_ALT7, 35 IOMUX_CONFIG_ALT7,
36 IOMUX_CONFIG_GPIO, /* added to help user use GPIO mode */ 36 IOMUX_CONFIG_GPIO, /* added to help user use GPIO mode */
37 IOMUX_CONFIG_SION = 0x1 << 4, /* LOOPBACK:MUX SION bit */
38} iomux_pin_cfg_t; 37} iomux_pin_cfg_t;
39 38
40/* These 2 defines are for pins that may not have a mux register, but could 39/* These 2 defines are for pins that may not have a mux register, but could
@@ -135,6 +134,9 @@ typedef enum iomux_config {
135#define MX53_PAD_EIM_D16__GPIO_3_16 IOMUX_PAD(0x460, 0x118,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) 134#define MX53_PAD_EIM_D16__GPIO_3_16 IOMUX_PAD(0x460, 0x118,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
136#define MX53_PAD_EIM_D17__GPIO_3_17 IOMUX_PAD(0x464, 0x11C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) 135#define MX53_PAD_EIM_D17__GPIO_3_17 IOMUX_PAD(0x464, 0x11C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
137#define MX53_PAD_EIM_D18__GPIO_3_18 IOMUX_PAD(0x468, 0x120,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) 136#define MX53_PAD_EIM_D18__GPIO_3_18 IOMUX_PAD(0x468, 0x120,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
137#define MX53_PAD_EIM_D16__CSPI1_SCLK IOMUX_PAD(0x460, 0x118,IOMUX_CONFIG_ALT4, 0x79c, 3, NO_PAD_CTRL)
138#define MX53_PAD_EIM_D17__CSPI1_MISO IOMUX_PAD(0x464, 0x11C,IOMUX_CONFIG_ALT4, 0x7a0, 3, NO_PAD_CTRL)
139#define MX53_PAD_EIM_D18__CSPI1_MOSI IOMUX_PAD(0x468, 0x120,IOMUX_CONFIG_ALT4, 0x7a4, 3, NO_PAD_CTRL)
138#define MX53_PAD_EIM_D19__GPIO_3_19 IOMUX_PAD(0x46C, 0x124,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) 140#define MX53_PAD_EIM_D19__GPIO_3_19 IOMUX_PAD(0x46C, 0x124,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
139#define MX53_PAD_EIM_D20__GPIO_3_20 IOMUX_PAD(0x470, 0x128,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) 141#define MX53_PAD_EIM_D20__GPIO_3_20 IOMUX_PAD(0x470, 0x128,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
140#define MX53_PAD_EIM_D21__GPIO_3_21 IOMUX_PAD(0x474, 0x12C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) 142#define MX53_PAD_EIM_D21__GPIO_3_21 IOMUX_PAD(0x474, 0x12C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h
index 2277b01c855d..82620af1922f 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-v3.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h
@@ -105,6 +105,7 @@ typedef u64 iomux_v3_cfg_t;
105#define PAD_CTL_SRE_FAST (1 << 0) 105#define PAD_CTL_SRE_FAST (1 << 0)
106#define PAD_CTL_SRE_SLOW (0 << 0) 106#define PAD_CTL_SRE_SLOW (0 << 0)
107 107
108#define IOMUX_CONFIG_SION (0x1 << 4)
108 109
109#define MX51_NUM_GPIO_PORT 4 110#define MX51_NUM_GPIO_PORT 4
110 111
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-mxc/include/mach/mx51.h
index 873807f96d70..1eb339e6c857 100644
--- a/arch/arm/plat-mxc/include/mach/mx51.h
+++ b/arch/arm/plat-mxc/include/mach/mx51.h
@@ -301,8 +301,8 @@
301#define MX51_MXC_INT_GPIO4_HIGH 57 301#define MX51_MXC_INT_GPIO4_HIGH 57
302#define MX51_MXC_INT_WDOG1 58 302#define MX51_MXC_INT_WDOG1 58
303#define MX51_MXC_INT_WDOG2 59 303#define MX51_MXC_INT_WDOG2 59
304#define MX51_MXC_INT_KPP 60 304#define MX51_INT_KPP 60
305#define MX51_MXC_INT_PWM1 61 305#define MX51_INT_PWM1 61
306#define MX51_INT_I2C1 62 306#define MX51_INT_I2C1 62
307#define MX51_INT_I2C2 63 307#define MX51_INT_I2C2 63
308#define MX51_MXC_INT_HS_I2C 64 308#define MX51_MXC_INT_HS_I2C 64
@@ -335,7 +335,7 @@
335#define MX51_MXC_INT_SPDIF 91 335#define MX51_MXC_INT_SPDIF 91
336#define MX51_MXC_INT_TVE 92 336#define MX51_MXC_INT_TVE 92
337#define MX51_MXC_INT_FIRI 93 337#define MX51_MXC_INT_FIRI 93
338#define MX51_MXC_INT_PWM2 94 338#define MX51_INT_PWM2 94
339#define MX51_MXC_INT_SLIM_EXP 95 339#define MX51_MXC_INT_SLIM_EXP 95
340#define MX51_INT_SSI3 96 340#define MX51_INT_SSI3 96
341#define MX51_MXC_INT_EMI_BOOT 97 341#define MX51_MXC_INT_EMI_BOOT 97
diff --git a/arch/arm/plat-mxc/include/mach/mx53.h b/arch/arm/plat-mxc/include/mach/mx53.h
index 9577cdbf7fad..d7a8e52181ea 100644
--- a/arch/arm/plat-mxc/include/mach/mx53.h
+++ b/arch/arm/plat-mxc/include/mach/mx53.h
@@ -53,13 +53,13 @@
53#define MX53_SPBA0_BASE_ADDR 0x50000000 53#define MX53_SPBA0_BASE_ADDR 0x50000000
54#define MX53_SPBA0_SIZE SZ_1M 54#define MX53_SPBA0_SIZE SZ_1M
55 55
56#define MX53_MMC_SDHC1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00004000) 56#define MX53_ESDHC1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00004000)
57#define MX53_MMC_SDHC2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00008000) 57#define MX53_ESDHC2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00008000)
58#define MX53_UART3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0000C000) 58#define MX53_UART3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0000C000)
59#define MX53_CSPI1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00010000) 59#define MX53_ECSPI1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00010000)
60#define MX53_SSI2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00014000) 60#define MX53_SSI2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00014000)
61#define MX53_MMC_SDHC3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00020000) 61#define MX53_ESDHC3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00020000)
62#define MX53_MMC_SDHC4_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00024000) 62#define MX53_ESDHC4_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00024000)
63#define MX53_SPDIF_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00028000) 63#define MX53_SPDIF_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00028000)
64#define MX53_ASRC_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0002C000) 64#define MX53_ASRC_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0002C000)
65#define MX53_ATA_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00030000) 65#define MX53_ATA_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00030000)
@@ -117,12 +117,12 @@
117#define MX53_ARM_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A0000) 117#define MX53_ARM_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A0000)
118#define MX53_OWIRE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A4000) 118#define MX53_OWIRE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A4000)
119#define MX53_FIRI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A8000) 119#define MX53_FIRI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A8000)
120#define MX53_CSPI2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000AC000) 120#define MX53_ECSPI2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000AC000)
121#define MX53_SDMA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B0000) 121#define MX53_SDMA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B0000)
122#define MX53_SCC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B4000) 122#define MX53_SCC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B4000)
123#define MX53_ROMCP_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B8000) 123#define MX53_ROMCP_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B8000)
124#define MX53_RTIC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000BC000) 124#define MX53_RTIC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000BC000)
125#define MX53_CSPI3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C0000) 125#define MX53_CSPI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C0000)
126#define MX53_I2C2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C4000) 126#define MX53_I2C2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C4000)
127#define MX53_I2C1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C8000) 127#define MX53_I2C1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C8000)
128#define MX53_SSI1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000CC000) 128#define MX53_SSI1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000CC000)
@@ -136,7 +136,7 @@
136#define MX53_MIPI_HSC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DC000) 136#define MX53_MIPI_HSC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DC000)
137#define MX53_MLB_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E4000) 137#define MX53_MLB_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E4000)
138#define MX53_SSI3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E8000) 138#define MX53_SSI3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E8000)
139#define MX53_MXC_FEC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000EC000) 139#define MX53_FEC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000EC000)
140#define MX53_TVE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F0000) 140#define MX53_TVE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F0000)
141#define MX53_VPU_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F4000) 141#define MX53_VPU_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F4000)
142#define MX53_SAHARA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F8000) 142#define MX53_SAHARA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F8000)
@@ -229,10 +229,10 @@
229 * Interrupt numbers 229 * Interrupt numbers
230 */ 230 */
231#define MX53_INT_RESV0 0 231#define MX53_INT_RESV0 0
232#define MX53_INT_MMC_SDHC1 1 232#define MX53_INT_ESDHC1 1
233#define MX53_INT_MMC_SDHC2 2 233#define MX53_INT_ESDHC2 2
234#define MX53_INT_MMC_SDHC3 3 234#define MX53_INT_ESDHC3 3
235#define MX53_INT_MMC_SDHC4 4 235#define MX53_INT_ESDHC4 4
236#define MX53_INT_RESV5 5 236#define MX53_INT_RESV5 5
237#define MX53_INT_SDMA 6 237#define MX53_INT_SDMA 6
238#define MX53_INT_IOMUX 7 238#define MX53_INT_IOMUX 7
@@ -264,8 +264,8 @@
264#define MX53_INT_UART3 33 264#define MX53_INT_UART3 33
265#define MX53_INT_RESV34 34 265#define MX53_INT_RESV34 34
266#define MX53_INT_RESV35 35 266#define MX53_INT_RESV35 35
267#define MX53_INT_CSPI1 36 267#define MX53_INT_ECSPI1 36
268#define MX53_INT_CSPI2 37 268#define MX53_INT_ECSPI2 37
269#define MX53_INT_CSPI 38 269#define MX53_INT_CSPI 38
270#define MX53_INT_GPT 39 270#define MX53_INT_GPT 39
271#define MX53_INT_EPIT1 40 271#define MX53_INT_EPIT1 40
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c
index c36f2630ed93..7a61ef8f471a 100644
--- a/arch/arm/plat-mxc/pwm.c
+++ b/arch/arm/plat-mxc/pwm.c
@@ -57,7 +57,7 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
57 if (pwm == NULL || period_ns == 0 || duty_ns > period_ns) 57 if (pwm == NULL || period_ns == 0 || duty_ns > period_ns)
58 return -EINVAL; 58 return -EINVAL;
59 59
60 if (cpu_is_mx27() || cpu_is_mx3() || cpu_is_mx25()) { 60 if (cpu_is_mx27() || cpu_is_mx3() || cpu_is_mx25() || cpu_is_mx51()) {
61 unsigned long long c; 61 unsigned long long c;
62 unsigned long period_cycles, duty_cycles, prescale; 62 unsigned long period_cycles, duty_cycles, prescale;
63 u32 cr; 63 u32 cr;