aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-ag5evm.c
diff options
context:
space:
mode:
authorTakashi YOSHII <takashi.yoshii.zj@renesas.com>2010-12-22 01:35:30 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-12-22 02:36:33 -0500
commit6bf45a1018ff3cda8b6ef2fa7e023a023bc01dc8 (patch)
treeeeb8d1ebfe98169e6603f8bb7dd047d49b5c19ca /arch/arm/mach-shmobile/board-ag5evm.c
parent5d7814728d80ee56d02e99cc2ab0850c8625a047 (diff)
ARM: mach-shmobile: Add eMMC support through MMCIF on AG5EVM
Adding platform resources, PFC setting and release reset pin for eMMC on ag5evm. [damm@opensource.se: Add MSTP code for MMCIF] Signed-off-by: Takashi YOSHII <takashi.yoshii.zj@renesas.com> Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/board-ag5evm.c')
-rw-r--r--arch/arm/mach-shmobile/board-ag5evm.c54
1 files changed, 53 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index c6b152469972..2f135923e2bd 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -32,6 +32,8 @@
32#include <linux/gpio.h> 32#include <linux/gpio.h>
33#include <linux/input.h> 33#include <linux/input.h>
34#include <linux/input/sh_keysc.h> 34#include <linux/input/sh_keysc.h>
35#include <linux/mmc/host.h>
36#include <linux/mmc/sh_mmcif.h>
35 37
36#include <sound/sh_fsi.h> 38#include <sound/sh_fsi.h>
37 39
@@ -146,10 +148,46 @@ static struct platform_device fsi_device = {
146 }, 148 },
147}; 149};
148 150
151static struct resource sh_mmcif_resources[] = {
152 [0] = {
153 .name = "MMCIF",
154 .start = 0xe6bd0000,
155 .end = 0xe6bd00ff,
156 .flags = IORESOURCE_MEM,
157 },
158 [1] = {
159 .start = gic_spi(141),
160 .flags = IORESOURCE_IRQ,
161 },
162 [2] = {
163 .start = gic_spi(140),
164 .flags = IORESOURCE_IRQ,
165 },
166};
167
168static struct sh_mmcif_plat_data sh_mmcif_platdata = {
169 .sup_pclk = 0,
170 .ocr = MMC_VDD_165_195,
171 .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
172};
173
174static struct platform_device mmc_device = {
175 .name = "sh_mmcif",
176 .id = 0,
177 .dev = {
178 .dma_mask = NULL,
179 .coherent_dma_mask = 0xffffffff,
180 .platform_data = &sh_mmcif_platdata,
181 },
182 .num_resources = ARRAY_SIZE(sh_mmcif_resources),
183 .resource = sh_mmcif_resources,
184};
185
149static struct platform_device *ag5evm_devices[] __initdata = { 186static struct platform_device *ag5evm_devices[] __initdata = {
150 &eth_device, 187 &eth_device,
151 &keysc_device, 188 &keysc_device,
152 &fsi_device, 189 &fsi_device,
190 &mmc_device,
153}; 191};
154 192
155static struct map_desc ag5evm_io_desc[] __initdata = { 193static struct map_desc ag5evm_io_desc[] __initdata = {
@@ -216,12 +254,26 @@ static void __init ag5evm_init(void)
216 gpio_request(GPIO_FN_KEYOUT8, NULL); 254 gpio_request(GPIO_FN_KEYOUT8, NULL);
217 gpio_request(GPIO_FN_PORT149_KEYOUT9, NULL); 255 gpio_request(GPIO_FN_PORT149_KEYOUT9, NULL);
218 256
219 /* enable IC2 2 and 3 */ 257 /* enable I2C channel 2 and 3 */
220 gpio_request(GPIO_FN_PORT236_I2C_SDA2, NULL); 258 gpio_request(GPIO_FN_PORT236_I2C_SDA2, NULL);
221 gpio_request(GPIO_FN_PORT237_I2C_SCL2, NULL); 259 gpio_request(GPIO_FN_PORT237_I2C_SCL2, NULL);
222 gpio_request(GPIO_FN_PORT248_I2C_SCL3, NULL); 260 gpio_request(GPIO_FN_PORT248_I2C_SCL3, NULL);
223 gpio_request(GPIO_FN_PORT249_I2C_SDA3, NULL); 261 gpio_request(GPIO_FN_PORT249_I2C_SDA3, NULL);
224 262
263 /* enable MMCIF */
264 gpio_request(GPIO_FN_MMCCLK0, NULL);
265 gpio_request(GPIO_FN_MMCCMD0_PU, NULL);
266 gpio_request(GPIO_FN_MMCD0_0, NULL);
267 gpio_request(GPIO_FN_MMCD0_1, NULL);
268 gpio_request(GPIO_FN_MMCD0_2, NULL);
269 gpio_request(GPIO_FN_MMCD0_3, NULL);
270 gpio_request(GPIO_FN_MMCD0_4, NULL);
271 gpio_request(GPIO_FN_MMCD0_5, NULL);
272 gpio_request(GPIO_FN_MMCD0_6, NULL);
273 gpio_request(GPIO_FN_MMCD0_7, NULL);
274 gpio_request(GPIO_PORT208, NULL); /* Reset */
275 gpio_direction_output(GPIO_PORT208, 1);
276
225 /* enable SMSC911X */ 277 /* enable SMSC911X */
226 gpio_request(GPIO_PORT144, NULL); /* PINTA2 */ 278 gpio_request(GPIO_PORT144, NULL); /* PINTA2 */
227 gpio_direction_input(GPIO_PORT144); 279 gpio_direction_input(GPIO_PORT144);