diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-2430sdp.c')
-rw-r--r-- | arch/arm/mach-omap2/board-2430sdp.c | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index e0661777f599..1fa6bb896f41 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/mmc/host.h> | 22 | #include <linux/mmc/host.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/i2c/twl.h> | 24 | #include <linux/i2c/twl.h> |
25 | #include <linux/regulator/machine.h> | ||
25 | #include <linux/err.h> | 26 | #include <linux/err.h> |
26 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
27 | #include <linux/io.h> | 28 | #include <linux/io.h> |
@@ -139,15 +140,31 @@ static struct omap_board_config_kernel sdp2430_config[] __initdata = { | |||
139 | {OMAP_TAG_LCD, &sdp2430_lcd_config}, | 140 | {OMAP_TAG_LCD, &sdp2430_lcd_config}, |
140 | }; | 141 | }; |
141 | 142 | ||
142 | static void __init omap_2430sdp_init_irq(void) | 143 | static void __init omap_2430sdp_init_early(void) |
143 | { | 144 | { |
144 | omap_board_config = sdp2430_config; | ||
145 | omap_board_config_size = ARRAY_SIZE(sdp2430_config); | ||
146 | omap2_init_common_infrastructure(); | 145 | omap2_init_common_infrastructure(); |
147 | omap2_init_common_devices(NULL, NULL); | 146 | omap2_init_common_devices(NULL, NULL); |
148 | omap_init_irq(); | ||
149 | } | 147 | } |
150 | 148 | ||
149 | static struct regulator_consumer_supply sdp2430_vmmc1_supplies[] = { | ||
150 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | ||
151 | }; | ||
152 | |||
153 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | ||
154 | static struct regulator_init_data sdp2430_vmmc1 = { | ||
155 | .constraints = { | ||
156 | .min_uV = 1850000, | ||
157 | .max_uV = 3150000, | ||
158 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
159 | | REGULATOR_MODE_STANDBY, | ||
160 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
161 | | REGULATOR_CHANGE_MODE | ||
162 | | REGULATOR_CHANGE_STATUS, | ||
163 | }, | ||
164 | .num_consumer_supplies = ARRAY_SIZE(sdp2430_vmmc1_supplies), | ||
165 | .consumer_supplies = &sdp2430_vmmc1_supplies[0], | ||
166 | }; | ||
167 | |||
151 | static struct twl4030_gpio_platform_data sdp2430_gpio_data = { | 168 | static struct twl4030_gpio_platform_data sdp2430_gpio_data = { |
152 | .gpio_base = OMAP_MAX_GPIO_LINES, | 169 | .gpio_base = OMAP_MAX_GPIO_LINES, |
153 | .irq_base = TWL4030_GPIO_IRQ_BASE, | 170 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
@@ -160,6 +177,7 @@ static struct twl4030_platform_data sdp2430_twldata = { | |||
160 | 177 | ||
161 | /* platform_data for children goes here */ | 178 | /* platform_data for children goes here */ |
162 | .gpio = &sdp2430_gpio_data, | 179 | .gpio = &sdp2430_gpio_data, |
180 | .vmmc1 = &sdp2430_vmmc1, | ||
163 | }; | 181 | }; |
164 | 182 | ||
165 | static struct i2c_board_info __initdata sdp2430_i2c_boardinfo[] = { | 183 | static struct i2c_board_info __initdata sdp2430_i2c_boardinfo[] = { |
@@ -226,6 +244,9 @@ static void __init omap_2430sdp_init(void) | |||
226 | 244 | ||
227 | omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC); | 245 | omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC); |
228 | 246 | ||
247 | omap_board_config = sdp2430_config; | ||
248 | omap_board_config_size = ARRAY_SIZE(sdp2430_config); | ||
249 | |||
229 | omap2430_i2c_init(); | 250 | omap2430_i2c_init(); |
230 | 251 | ||
231 | platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); | 252 | platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); |
@@ -253,9 +274,10 @@ static void __init omap_2430sdp_map_io(void) | |||
253 | MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") | 274 | MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") |
254 | /* Maintainer: Syed Khasim - Texas Instruments Inc */ | 275 | /* Maintainer: Syed Khasim - Texas Instruments Inc */ |
255 | .boot_params = 0x80000100, | 276 | .boot_params = 0x80000100, |
256 | .map_io = omap_2430sdp_map_io, | ||
257 | .reserve = omap_reserve, | 277 | .reserve = omap_reserve, |
258 | .init_irq = omap_2430sdp_init_irq, | 278 | .map_io = omap_2430sdp_map_io, |
279 | .init_early = omap_2430sdp_init_early, | ||
280 | .init_irq = omap_init_irq, | ||
259 | .init_machine = omap_2430sdp_init, | 281 | .init_machine = omap_2430sdp_init, |
260 | .timer = &omap_timer, | 282 | .timer = &omap_timer, |
261 | MACHINE_END | 283 | MACHINE_END |