aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c39
1 files changed, 38 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index ac3b0f7163c..8b6036053e1 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -26,6 +26,7 @@
26#include <linux/regulator/machine.h> 26#include <linux/regulator/machine.h>
27 27
28#include <linux/i2c/twl.h> 28#include <linux/i2c/twl.h>
29#include <linux/mmc/host.h>
29 30
30#include <mach/hardware.h> 31#include <mach/hardware.h>
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
@@ -33,6 +34,7 @@
33#include <asm/mach/map.h> 34#include <asm/mach/map.h>
34 35
35#include "mux.h" 36#include "mux.h"
37#include "hsmmc.h"
36 38
37#include <plat/mux.h> 39#include <plat/mux.h>
38#include <plat/board.h> 40#include <plat/board.h>
@@ -87,6 +89,7 @@ static struct twl4030_platform_data omap3logic_twldata = {
87 89
88 /* platform_data for children goes here */ 90 /* platform_data for children goes here */
89 .gpio = &omap3logic_gpio_data, 91 .gpio = &omap3logic_gpio_data,
92 .vmmc1 = &omap3logic_vmmc1,
90}; 93};
91 94
92static struct i2c_board_info __initdata omap3logic_i2c_boardinfo[] = { 95static struct i2c_board_info __initdata omap3logic_i2c_boardinfo[] = {
@@ -105,6 +108,40 @@ static int __init omap3logic_i2c_init(void)
105 return 0; 108 return 0;
106} 109}
107 110
111static struct omap2_hsmmc_info __initdata board_mmc_info[] = {
112 {
113 .name = "external",
114 .mmc = 1,
115 .caps = MMC_CAP_4_BIT_DATA,
116 .gpio_cd = -EINVAL,
117 .gpio_wp = -EINVAL,
118 },
119 {} /* Terminator */
120};
121
122static void __init board_mmc_init(void)
123{
124 if (machine_is_omap3530_lv_som()) {
125 /* OMAP3530 LV SOM board */
126 board_mmc_info[0].gpio_cd = OMAP3530_LV_SOM_MMC_GPIO_CD;
127 board_mmc_info[0].gpio_wp = OMAP3530_LV_SOM_MMC_GPIO_WP;
128 omap_mux_init_signal("gpio_110", OMAP_PIN_OUTPUT);
129 omap_mux_init_signal("gpio_126", OMAP_PIN_OUTPUT);
130 } else if (machine_is_omap3_torpedo()) {
131 /* OMAP3 Torpedo board */
132 board_mmc_info[0].gpio_cd = OMAP3_TORPEDO_MMC_GPIO_CD;
133 omap_mux_init_signal("gpio_127", OMAP_PIN_OUTPUT);
134 } else {
135 /* unsupported board */
136 printk(KERN_ERR "%s(): unknown machine type\n", __func__);
137 return;
138 }
139
140 omap2_hsmmc_init(board_mmc_info);
141 /* link regulators to MMC adapters */
142 omap3logic_vmmc1_supply.dev = board_mmc_info[0].dev;
143}
144
108static void __init omap3logic_init_irq(void) 145static void __init omap3logic_init_irq(void)
109{ 146{
110 omap2_init_common_hw(NULL, NULL); 147 omap2_init_common_hw(NULL, NULL);
@@ -116,7 +153,7 @@ static void __init omap3logic_init(void)
116{ 153{
117 omap3logic_i2c_init(); 154 omap3logic_i2c_init();
118 omap_serial_init(); 155 omap_serial_init();
119 156 board_mmc_init();
120 /* Ensure SDRC pins are mux'd for self-refresh */ 157 /* Ensure SDRC pins are mux'd for self-refresh */
121 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); 158 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
122 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); 159 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);