aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-overo.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-overo.c')
-rw-r--r--arch/arm/mach-omap2/board-overo.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index e09aa59a399c..82b3dc557c96 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -26,6 +26,7 @@
26#include <linux/io.h> 26#include <linux/io.h>
27#include <linux/kernel.h> 27#include <linux/kernel.h>
28#include <linux/platform_device.h> 28#include <linux/platform_device.h>
29#include <linux/i2c/twl4030.h>
29 30
30#include <linux/mtd/mtd.h> 31#include <linux/mtd/mtd.h>
31#include <linux/mtd/nand.h> 32#include <linux/mtd/nand.h>
@@ -44,6 +45,8 @@
44#include <mach/hardware.h> 45#include <mach/hardware.h>
45#include <mach/nand.h> 46#include <mach/nand.h>
46 47
48#include "mmc-twl4030.h"
49
47#define NAND_BLOCK_SIZE SZ_128K 50#define NAND_BLOCK_SIZE SZ_128K
48#define GPMC_CS0_BASE 0x60 51#define GPMC_CS0_BASE 0x60
49#define GPMC_CS_SIZE 0x30 52#define GPMC_CS_SIZE 0x30
@@ -139,8 +142,31 @@ static struct omap_uart_config overo_uart_config __initdata = {
139 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), 142 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
140}; 143};
141 144
145static struct twl4030_gpio_platform_data overo_gpio_data = {
146 .gpio_base = OMAP_MAX_GPIO_LINES,
147 .irq_base = TWL4030_GPIO_IRQ_BASE,
148 .irq_end = TWL4030_GPIO_IRQ_END,
149};
150
151static struct twl4030_platform_data overo_twldata = {
152 .irq_base = TWL4030_IRQ_BASE,
153 .irq_end = TWL4030_IRQ_END,
154 .gpio = &overo_gpio_data,
155};
156
157static struct i2c_board_info __initdata overo_i2c_boardinfo[] = {
158 {
159 I2C_BOARD_INFO("twl4030", 0x48),
160 .flags = I2C_CLIENT_WAKE,
161 .irq = INT_34XX_SYS_NIRQ,
162 .platform_data = &overo_twldata,
163 },
164};
165
142static int __init overo_i2c_init(void) 166static int __init overo_i2c_init(void)
143{ 167{
168 omap_register_i2c_bus(1, 2600, overo_i2c_boardinfo,
169 ARRAY_SIZE(overo_i2c_boardinfo));
144 /* i2c2 pins are used for gpio */ 170 /* i2c2 pins are used for gpio */
145 omap_register_i2c_bus(3, 400, NULL, 0); 171 omap_register_i2c_bus(3, 400, NULL, 0);
146 return 0; 172 return 0;
@@ -171,6 +197,22 @@ static struct platform_device *overo_devices[] __initdata = {
171 &overo_lcd_device, 197 &overo_lcd_device,
172}; 198};
173 199
200static struct twl4030_hsmmc_info mmc[] __initdata = {
201 {
202 .mmc = 1,
203 .wires = 4,
204 .gpio_cd = -EINVAL,
205 .gpio_wp = -EINVAL,
206 },
207 {
208 .mmc = 2,
209 .wires = 4,
210 .gpio_cd = -EINVAL,
211 .gpio_wp = -EINVAL,
212 },
213 {} /* Terminator */
214};
215
174static void __init overo_init(void) 216static void __init overo_init(void)
175{ 217{
176 overo_i2c_init(); 218 overo_i2c_init();
@@ -178,6 +220,7 @@ static void __init overo_init(void)
178 omap_board_config = overo_config; 220 omap_board_config = overo_config;
179 omap_board_config_size = ARRAY_SIZE(overo_config); 221 omap_board_config_size = ARRAY_SIZE(overo_config);
180 omap_serial_init(); 222 omap_serial_init();
223 twl4030_mmc_init(mmc);
181 overo_flash_init(); 224 overo_flash_init();
182 225
183 if ((gpio_request(OVERO_GPIO_W2W_NRESET, 226 if ((gpio_request(OVERO_GPIO_W2W_NRESET,