diff options
author | Yong Shen <yong.shen@freescale.com> | 2011-01-06 23:25:33 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-01-07 09:20:53 -0500 |
commit | 0d7671ee66964760a718aa6d0277453b02a2c9b3 (patch) | |
tree | 3d15add1376f1866fc4e6fcf8011f7d6e017457c /arch/arm/mach-mx5 | |
parent | 639047677b2fc931d6874807a7b596a236071015 (diff) |
ARM i.MX53 enable i2c on EVK board
add i2c platform data and clock
Signed-off-by: Yong Shen <yong.shen@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/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-mx53_evk.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-mx5/clock-mx51-mx53.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx5/devices-imx53.h | 5 |
4 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index 55254b6e9460..632d711f1925 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
@@ -124,6 +124,7 @@ config MACH_MX53_EVK | |||
124 | bool "Support MX53 EVK platforms" | 124 | bool "Support MX53 EVK platforms" |
125 | select SOC_IMX53 | 125 | select SOC_IMX53 |
126 | select IMX_HAVE_PLATFORM_IMX_UART | 126 | select IMX_HAVE_PLATFORM_IMX_UART |
127 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
127 | help | 128 | help |
128 | Include support for MX53 EVK platform. This includes specific | 129 | Include support for MX53 EVK platform. This includes specific |
129 | configurations for the board and its peripherals. | 130 | configurations for the board and its peripherals. |
diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c index 8a744ae09f6f..d0b4570f44ee 100644 --- a/arch/arm/mach-mx5/board-mx53_evk.c +++ b/arch/arm/mach-mx5/board-mx53_evk.c | |||
@@ -65,6 +65,10 @@ static inline void mx53_evk_init_uart(void) | |||
65 | imx53_add_imx_uart(2, &mx53_evk_uart_pdata); | 65 | imx53_add_imx_uart(2, &mx53_evk_uart_pdata); |
66 | } | 66 | } |
67 | 67 | ||
68 | static const struct imxi2c_platform_data mx53_evk_i2c_data __initconst = { | ||
69 | .bitrate = 100000, | ||
70 | }; | ||
71 | |||
68 | static inline void mx53_evk_fec_reset(void) | 72 | static inline void mx53_evk_fec_reset(void) |
69 | { | 73 | { |
70 | int ret; | 74 | int ret; |
@@ -92,6 +96,9 @@ static void __init mx53_evk_board_init(void) | |||
92 | mx53_evk_init_uart(); | 96 | mx53_evk_init_uart(); |
93 | mx53_evk_fec_reset(); | 97 | mx53_evk_fec_reset(); |
94 | imx53_add_fec(&mx53_evk_fec_pdata); | 98 | imx53_add_fec(&mx53_evk_fec_pdata); |
99 | |||
100 | imx53_add_imx_i2c(0, &mx53_evk_i2c_data); | ||
101 | imx53_add_imx_i2c(1, &mx53_evk_i2c_data); | ||
95 | } | 102 | } |
96 | 103 | ||
97 | static void __init mx53_evk_timer_init(void) | 104 | static void __init mx53_evk_timer_init(void) |
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c index b21bc47d4827..0ade3c4cc6c5 100644 --- a/arch/arm/mach-mx5/clock-mx51-mx53.c +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c | |||
@@ -1326,6 +1326,8 @@ static struct clk_lookup mx53_lookups[] = { | |||
1326 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) | 1326 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) |
1327 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | 1327 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) |
1328 | _REGISTER_CLOCK(NULL, "iim_clk", iim_clk) | 1328 | _REGISTER_CLOCK(NULL, "iim_clk", iim_clk) |
1329 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk) | ||
1330 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk) | ||
1329 | }; | 1331 | }; |
1330 | 1332 | ||
1331 | static void clk_tree_init(void) | 1333 | static void clk_tree_init(void) |
diff --git a/arch/arm/mach-mx5/devices-imx53.h b/arch/arm/mach-mx5/devices-imx53.h index dbf1989b451d..ca1232bcedeb 100644 --- a/arch/arm/mach-mx5/devices-imx53.h +++ b/arch/arm/mach-mx5/devices-imx53.h | |||
@@ -15,3 +15,8 @@ extern const struct imx_fec_data imx53_fec_data __initconst; | |||
15 | extern const struct imx_imx_uart_1irq_data imx53_imx_uart_data[] __initconst; | 15 | extern const struct imx_imx_uart_1irq_data imx53_imx_uart_data[] __initconst; |
16 | #define imx53_add_imx_uart(id, pdata) \ | 16 | #define imx53_add_imx_uart(id, pdata) \ |
17 | 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 | |||
20 | extern 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) | ||