diff options
author | Tony Lindgren <tony@atomide.com> | 2008-12-10 20:37:17 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2008-12-10 20:37:17 -0500 |
commit | 90c62bf08f5823faa097271f3346a9142769b9ac (patch) | |
tree | aa3bf442380815268b03092fd4b9c47924f9c3ee /arch/arm/mach-omap2/board-ldp.c | |
parent | d88746652b4d133284d1fdd05b5e999e8f44c998 (diff) |
omap mmc: Add low-level initialization for hsmmc controller
Add low-level initialization for hsmmc controller. Merged into
this patch patch are various improvments and board support by
Grazvydas Ignotas and David Brownell.
Also change wire4 to be wires, as some newer controllers support
8 data lines.
Cc: Pierre Ossman <drzeus-mmc@drzeus.cx>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-ldp.c')
-rw-r--r-- | arch/arm/mach-omap2/board-ldp.c | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index 43c7ac4b7f8f..aa6972781e4a 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
23 | #include <linux/spi/ads7846.h> | 23 | #include <linux/spi/ads7846.h> |
24 | #include <linux/i2c/twl4030.h> | ||
24 | 25 | ||
25 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
26 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
@@ -38,6 +39,8 @@ | |||
38 | #include <asm/delay.h> | 39 | #include <asm/delay.h> |
39 | #include <mach/control.h> | 40 | #include <mach/control.h> |
40 | 41 | ||
42 | #include "mmc-twl4030.h" | ||
43 | |||
41 | #define SDP3430_SMC91X_CS 3 | 44 | #define SDP3430_SMC91X_CS 3 |
42 | 45 | ||
43 | static struct resource ldp_smc911x_resources[] = { | 46 | static struct resource ldp_smc911x_resources[] = { |
@@ -109,14 +112,48 @@ static struct omap_board_config_kernel ldp_config[] __initdata = { | |||
109 | { OMAP_TAG_UART, &ldp_uart_config }, | 112 | { OMAP_TAG_UART, &ldp_uart_config }, |
110 | }; | 113 | }; |
111 | 114 | ||
115 | static struct twl4030_gpio_platform_data ldp_gpio_data = { | ||
116 | .gpio_base = OMAP_MAX_GPIO_LINES, | ||
117 | .irq_base = TWL4030_GPIO_IRQ_BASE, | ||
118 | .irq_end = TWL4030_GPIO_IRQ_END, | ||
119 | }; | ||
120 | |||
121 | static struct twl4030_platform_data ldp_twldata = { | ||
122 | .irq_base = TWL4030_IRQ_BASE, | ||
123 | .irq_end = TWL4030_IRQ_END, | ||
124 | |||
125 | /* platform_data for children goes here */ | ||
126 | .gpio = &ldp_gpio_data, | ||
127 | }; | ||
128 | |||
129 | static struct i2c_board_info __initdata ldp_i2c_boardinfo[] = { | ||
130 | { | ||
131 | I2C_BOARD_INFO("twl4030", 0x48), | ||
132 | .flags = I2C_CLIENT_WAKE, | ||
133 | .irq = INT_34XX_SYS_NIRQ, | ||
134 | .platform_data = &ldp_twldata, | ||
135 | }, | ||
136 | }; | ||
137 | |||
112 | static int __init omap_i2c_init(void) | 138 | static int __init omap_i2c_init(void) |
113 | { | 139 | { |
114 | omap_register_i2c_bus(1, 2600, NULL, 0); | 140 | omap_register_i2c_bus(1, 2600, ldp_i2c_boardinfo, |
141 | ARRAY_SIZE(ldp_i2c_boardinfo)); | ||
115 | omap_register_i2c_bus(2, 400, NULL, 0); | 142 | omap_register_i2c_bus(2, 400, NULL, 0); |
116 | omap_register_i2c_bus(3, 400, NULL, 0); | 143 | omap_register_i2c_bus(3, 400, NULL, 0); |
117 | return 0; | 144 | return 0; |
118 | } | 145 | } |
119 | 146 | ||
147 | static struct twl4030_hsmmc_info mmc[] __initdata = { | ||
148 | { | ||
149 | .mmc = 1, | ||
150 | .wires = 4, | ||
151 | .gpio_cd = -EINVAL, | ||
152 | .gpio_wp = -EINVAL, | ||
153 | }, | ||
154 | {} /* Terminator */ | ||
155 | }; | ||
156 | |||
120 | static void __init omap_ldp_init(void) | 157 | static void __init omap_ldp_init(void) |
121 | { | 158 | { |
122 | omap_i2c_init(); | 159 | omap_i2c_init(); |
@@ -124,6 +161,7 @@ static void __init omap_ldp_init(void) | |||
124 | omap_board_config = ldp_config; | 161 | omap_board_config = ldp_config; |
125 | omap_board_config_size = ARRAY_SIZE(ldp_config); | 162 | omap_board_config_size = ARRAY_SIZE(ldp_config); |
126 | omap_serial_init(); | 163 | omap_serial_init(); |
164 | twl4030_mmc_init(mmc); | ||
127 | } | 165 | } |
128 | 166 | ||
129 | static void __init omap_ldp_map_io(void) | 167 | static void __init omap_ldp_map_io(void) |