aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5
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/mach-mx5
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/mach-mx5')
-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
12 files changed, 364 insertions, 28 deletions
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);