summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5
diff options
context:
space:
mode:
authorRichard Zhao <richard.zhao@freescale.com>2011-01-14 17:48:04 +0800
committerSascha Hauer <s.hauer@pengutronix.de>2011-01-19 09:58:21 +0100
commit98b7d550f292ae96f1058f19b83aadd6985a6fa0 (patch)
tree1778e3bfa4aeaf75761fef678b13e54725ac4458 /arch/arm/mach-mx5
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>
Diffstat (limited to 'arch/arm/mach-mx5')
-rw-r--r--arch/arm/mach-mx5/board-mx50_rdp.c7
-rw-r--r--arch/arm/mach-mx5/devices-imx50.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/board-mx50_rdp.c b/arch/arm/mach-mx5/board-mx50_rdp.c
index 3180d43aece..75beef74b37 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)
gpio_set_value(FEC_RESET_B, 1);
}
+static const struct imxi2c_platform_data i2c_data __initconst = {
+ .bitrate = 100000,
+};
+
/*
* Board specific initialization.
*/
@@ -196,6 +200,9 @@ static void __init mx50_rdp_board_init(void)
imx50_add_imx_uart(1, &uart_pdata);
mx50_rdp_fec_reset();
imx50_add_fec(&fec_data);
+ imx50_add_imx_i2c(0, &i2c_data);
+ imx50_add_imx_i2c(1, &i2c_data);
+ imx50_add_imx_i2c(2, &i2c_data);
}
static 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 e1093dbaa78..c9e42823c7e 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;
#define imx50_add_fec(pdata) \
imx_add_fec(&imx50_fec_data, pdata)
+extern const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst;
+#define imx50_add_imx_i2c(id, pdata) \
+ imx_add_imx_i2c(&imx50_imx_i2c_data[id], pdata)