aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Zhao <richard.zhao@freescale.com>2011-01-14 04:48:04 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2011-01-19 03:58:21 -0500
commit98b7d550f292ae96f1058f19b83aadd6985a6fa0 (patch)
tree1778e3bfa4aeaf75761fef678b13e54725ac4458
parent82c520dccf7fd5afcd95b941f48c25f38c162c77 (diff)
arm: mx50_rdp: add i2c bus support
Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/mach-mx5/board-mx50_rdp.c7
-rw-r--r--arch/arm/mach-mx5/devices-imx50.h3
-rw-r--r--arch/arm/plat-mxc/devices/platform-imx-i2c.c10
3 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/board-mx50_rdp.c b/arch/arm/mach-mx5/board-mx50_rdp.c
index 3180d43aeced..75beef74b375 100644
--- a/arch/arm/mach-mx5/board-mx50_rdp.c
+++ b/arch/arm/mach-mx5/board-mx50_rdp.c
@@ -184,6 +184,10 @@ static inline void mx50_rdp_fec_reset(void)
184 gpio_set_value(FEC_RESET_B, 1); 184 gpio_set_value(FEC_RESET_B, 1);
185} 185}
186 186
187static const struct imxi2c_platform_data i2c_data __initconst = {
188 .bitrate = 100000,
189};
190
187/* 191/*
188 * Board specific initialization. 192 * Board specific initialization.
189 */ 193 */
@@ -196,6 +200,9 @@ static void __init mx50_rdp_board_init(void)
196 imx50_add_imx_uart(1, &uart_pdata); 200 imx50_add_imx_uart(1, &uart_pdata);
197 mx50_rdp_fec_reset(); 201 mx50_rdp_fec_reset();
198 imx50_add_fec(&fec_data); 202 imx50_add_fec(&fec_data);
203 imx50_add_imx_i2c(0, &i2c_data);
204 imx50_add_imx_i2c(1, &i2c_data);
205 imx50_add_imx_i2c(2, &i2c_data);
199} 206}
200 207
201static void __init mx50_rdp_timer_init(void) 208static void __init mx50_rdp_timer_init(void)
diff --git a/arch/arm/mach-mx5/devices-imx50.h b/arch/arm/mach-mx5/devices-imx50.h
index e1093dbaa786..c9e42823c7e3 100644
--- a/arch/arm/mach-mx5/devices-imx50.h
+++ b/arch/arm/mach-mx5/devices-imx50.h
@@ -29,3 +29,6 @@ extern const struct imx_fec_data imx50_fec_data __initconst;
29#define imx50_add_fec(pdata) \ 29#define imx50_add_fec(pdata) \
30 imx_add_fec(&imx50_fec_data, pdata) 30 imx_add_fec(&imx50_fec_data, pdata)
31 31
32extern const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst;
33#define imx50_add_imx_i2c(id, pdata) \
34 imx_add_imx_i2c(&imx50_imx_i2c_data[id], pdata)
diff --git a/arch/arm/plat-mxc/devices/platform-imx-i2c.c b/arch/arm/plat-mxc/devices/platform-imx-i2c.c
index 7ba94e1bbda3..2ab74f0da9a6 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-i2c.c
+++ b/arch/arm/plat-mxc/devices/platform-imx-i2c.c
@@ -69,6 +69,16 @@ const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = {
69}; 69};
70#endif /* ifdef CONFIG_SOC_IMX35 */ 70#endif /* ifdef CONFIG_SOC_IMX35 */
71 71
72#ifdef CONFIG_SOC_IMX50
73const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = {
74#define imx50_imx_i2c_data_entry(_id, _hwid) \
75 imx_imx_i2c_data_entry(MX50, _id, _hwid, SZ_4K)
76 imx50_imx_i2c_data_entry(0, 1),
77 imx50_imx_i2c_data_entry(1, 2),
78 imx50_imx_i2c_data_entry(2, 3),
79};
80#endif /* ifdef CONFIG_SOC_IMX51 */
81
72#ifdef CONFIG_SOC_IMX51 82#ifdef CONFIG_SOC_IMX51
73const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = { 83const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
74#define imx51_imx_i2c_data_entry(_id, _hwid) \ 84#define imx51_imx_i2c_data_entry(_id, _hwid) \