aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-2430sdp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-2430sdp.c')
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 6748de6e19a8..83fa37211d77 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -19,6 +19,7 @@
19#include <linux/mtd/mtd.h> 19#include <linux/mtd/mtd.h>
20#include <linux/mtd/partitions.h> 20#include <linux/mtd/partitions.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/i2c/twl4030.h>
22#include <linux/err.h> 23#include <linux/err.h>
23#include <linux/clk.h> 24#include <linux/clk.h>
24#include <linux/io.h> 25#include <linux/io.h>
@@ -35,6 +36,7 @@
35#include <mach/common.h> 36#include <mach/common.h>
36#include <mach/gpmc.h> 37#include <mach/gpmc.h>
37 38
39#include "mmc-twl4030.h"
38 40
39#define SDP2430_FLASH_CS 0 41#define SDP2430_FLASH_CS 0
40#define SDP2430_SMC91X_CS 5 42#define SDP2430_SMC91X_CS 5
@@ -197,12 +199,58 @@ static struct omap_board_config_kernel sdp2430_config[] = {
197 {OMAP_TAG_UART, &sdp2430_uart_config}, 199 {OMAP_TAG_UART, &sdp2430_uart_config},
198}; 200};
199 201
202
203static struct twl4030_gpio_platform_data sdp2430_gpio_data = {
204 .gpio_base = OMAP_MAX_GPIO_LINES,
205 .irq_base = TWL4030_GPIO_IRQ_BASE,
206 .irq_end = TWL4030_GPIO_IRQ_END,
207};
208
209static struct twl4030_platform_data sdp2430_twldata = {
210 .irq_base = TWL4030_IRQ_BASE,
211 .irq_end = TWL4030_IRQ_END,
212
213 /* platform_data for children goes here */
214 .gpio = &sdp2430_gpio_data,
215};
216
217static struct i2c_board_info __initdata sdp2430_i2c_boardinfo[] = {
218 {
219 I2C_BOARD_INFO("twl4030", 0x48),
220 .flags = I2C_CLIENT_WAKE,
221 .irq = INT_24XX_SYS_NIRQ,
222 .platform_data = &sdp2430_twldata,
223 },
224};
225
226static int __init omap2430_i2c_init(void)
227{
228 omap_register_i2c_bus(1, 400, NULL, 0);
229 omap_register_i2c_bus(2, 2600, sdp2430_i2c_boardinfo,
230 ARRAY_SIZE(sdp2430_i2c_boardinfo));
231 return 0;
232}
233
234static struct twl4030_hsmmc_info mmc[] __initdata = {
235 {
236 .mmc = 1,
237 .wires = 4,
238 .gpio_cd = -EINVAL,
239 .gpio_wp = -EINVAL,
240 .ext_clock = 1,
241 },
242 {} /* Terminator */
243};
244
200static void __init omap_2430sdp_init(void) 245static void __init omap_2430sdp_init(void)
201{ 246{
247 omap2430_i2c_init();
248
202 platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); 249 platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
203 omap_board_config = sdp2430_config; 250 omap_board_config = sdp2430_config;
204 omap_board_config_size = ARRAY_SIZE(sdp2430_config); 251 omap_board_config_size = ARRAY_SIZE(sdp2430_config);
205 omap_serial_init(); 252 omap_serial_init();
253 twl4030_mmc_init(mmc);
206} 254}
207 255
208static void __init omap_2430sdp_map_io(void) 256static void __init omap_2430sdp_map_io(void)