diff options
Diffstat (limited to 'arch/arm/mach-omap2/msdi.c')
-rw-r--r-- | arch/arm/mach-omap2/msdi.c | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/arch/arm/mach-omap2/msdi.c b/arch/arm/mach-omap2/msdi.c index c52d8b4a3e91..828e0db3d943 100644 --- a/arch/arm/mach-omap2/msdi.c +++ b/arch/arm/mach-omap2/msdi.c | |||
@@ -88,72 +88,3 @@ int omap_msdi_reset(struct omap_hwmod *oh) | |||
88 | 88 | ||
89 | return 0; | 89 | return 0; |
90 | } | 90 | } |
91 | |||
92 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) | ||
93 | |||
94 | static inline void omap242x_mmc_mux(struct omap_mmc_platform_data | ||
95 | *mmc_controller) | ||
96 | { | ||
97 | if ((mmc_controller->slots[0].switch_pin > 0) && \ | ||
98 | (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES)) | ||
99 | omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, | ||
100 | OMAP_PIN_INPUT_PULLUP); | ||
101 | if ((mmc_controller->slots[0].gpio_wp > 0) && \ | ||
102 | (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES)) | ||
103 | omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, | ||
104 | OMAP_PIN_INPUT_PULLUP); | ||
105 | |||
106 | omap_mux_init_signal("sdmmc_cmd", 0); | ||
107 | omap_mux_init_signal("sdmmc_clki", 0); | ||
108 | omap_mux_init_signal("sdmmc_clko", 0); | ||
109 | omap_mux_init_signal("sdmmc_dat0", 0); | ||
110 | omap_mux_init_signal("sdmmc_dat_dir0", 0); | ||
111 | omap_mux_init_signal("sdmmc_cmd_dir", 0); | ||
112 | if (mmc_controller->slots[0].caps & MMC_CAP_4_BIT_DATA) { | ||
113 | omap_mux_init_signal("sdmmc_dat1", 0); | ||
114 | omap_mux_init_signal("sdmmc_dat2", 0); | ||
115 | omap_mux_init_signal("sdmmc_dat3", 0); | ||
116 | omap_mux_init_signal("sdmmc_dat_dir1", 0); | ||
117 | omap_mux_init_signal("sdmmc_dat_dir2", 0); | ||
118 | omap_mux_init_signal("sdmmc_dat_dir3", 0); | ||
119 | } | ||
120 | |||
121 | /* | ||
122 | * Use internal loop-back in MMC/SDIO Module Input Clock | ||
123 | * selection | ||
124 | */ | ||
125 | if (mmc_controller->slots[0].internal_clock) { | ||
126 | u32 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); | ||
127 | v |= (1 << 24); | ||
128 | omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); | ||
129 | } | ||
130 | } | ||
131 | |||
132 | void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data) | ||
133 | { | ||
134 | struct platform_device *pdev; | ||
135 | struct omap_hwmod *oh; | ||
136 | int id = 0; | ||
137 | char *oh_name = "msdi1"; | ||
138 | char *dev_name = "mmci-omap"; | ||
139 | |||
140 | if (!mmc_data[0]) { | ||
141 | pr_err("%s fails: Incomplete platform data\n", __func__); | ||
142 | return; | ||
143 | } | ||
144 | |||
145 | omap242x_mmc_mux(mmc_data[0]); | ||
146 | |||
147 | oh = omap_hwmod_lookup(oh_name); | ||
148 | if (!oh) { | ||
149 | pr_err("Could not look up %s\n", oh_name); | ||
150 | return; | ||
151 | } | ||
152 | pdev = omap_device_build(dev_name, id, oh, mmc_data[0], | ||
153 | sizeof(struct omap_mmc_platform_data)); | ||
154 | if (IS_ERR(pdev)) | ||
155 | WARN(1, "Can'd build omap_device for %s:%s.\n", | ||
156 | dev_name, oh->name); | ||
157 | } | ||
158 | |||
159 | #endif | ||