aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2011-08-18 01:44:42 -0400
committerPaul Mundt <lethal@linux-sh.org>2011-08-29 03:50:28 -0400
commit4e9279452502c043469cf34cd813db83ae87c7d3 (patch)
tree4a0e18842c408f15b796621244729a260d79d4ff /arch
parentae6e70831805c1d3bb4cdb87a29877b9846d3c15 (diff)
ARM: mach-shmobile: Kota2 MMCIF support
Add support for sh73a0 MMCIF hardware block on the Kota2 board. A non-removable eMMC chip is used with 8 data bits on the MMC bus. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-shmobile/board-kota2.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c
index d46bd9f7cea5..e1380df01315 100644
--- a/arch/arm/mach-shmobile/board-kota2.c
+++ b/arch/arm/mach-shmobile/board-kota2.c
@@ -33,6 +33,8 @@
33#include <linux/input/sh_keysc.h> 33#include <linux/input/sh_keysc.h>
34#include <linux/gpio_keys.h> 34#include <linux/gpio_keys.h>
35#include <linux/leds.h> 35#include <linux/leds.h>
36#include <linux/mmc/host.h>
37#include <linux/mmc/sh_mmcif.h>
36#include <mach/hardware.h> 38#include <mach/hardware.h>
37#include <mach/sh73a0.h> 39#include <mach/sh73a0.h>
38#include <mach/common.h> 40#include <mach/common.h>
@@ -171,11 +173,44 @@ static struct platform_device gpio_leds_device = {
171 }, 173 },
172}; 174};
173 175
176static struct resource mmcif_resources[] = {
177 [0] = {
178 .name = "MMCIF",
179 .start = 0xe6bd0000,
180 .end = 0xe6bd00ff,
181 .flags = IORESOURCE_MEM,
182 },
183 [1] = {
184 .start = gic_spi(140),
185 .flags = IORESOURCE_IRQ,
186 },
187 [2] = {
188 .start = gic_spi(141),
189 .flags = IORESOURCE_IRQ,
190 },
191};
192
193static struct sh_mmcif_plat_data mmcif_info = {
194 .ocr = MMC_VDD_165_195,
195 .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
196};
197
198static struct platform_device mmcif_device = {
199 .name = "sh_mmcif",
200 .id = 0,
201 .dev = {
202 .platform_data = &mmcif_info,
203 },
204 .num_resources = ARRAY_SIZE(mmcif_resources),
205 .resource = mmcif_resources,
206};
207
174static struct platform_device *kota2_devices[] __initdata = { 208static struct platform_device *kota2_devices[] __initdata = {
175 &eth_device, 209 &eth_device,
176 &keysc_device, 210 &keysc_device,
177 &gpio_keys_device, 211 &gpio_keys_device,
178 &gpio_leds_device, 212 &gpio_leds_device,
213 &mmcif_device,
179}; 214};
180 215
181static struct map_desc kota2_io_desc[] __initdata = { 216static struct map_desc kota2_io_desc[] __initdata = {
@@ -264,6 +299,20 @@ static void __init kota2_init(void)
264 gpio_request(GPIO_FN_PORT58_KEYOUT7, NULL); 299 gpio_request(GPIO_FN_PORT58_KEYOUT7, NULL);
265 gpio_request(GPIO_FN_KEYOUT8, NULL); 300 gpio_request(GPIO_FN_KEYOUT8, NULL);
266 301
302 /* MMCIF */
303 gpio_request(GPIO_FN_MMCCLK0, NULL);
304 gpio_request(GPIO_FN_MMCD0_0, NULL);
305 gpio_request(GPIO_FN_MMCD0_1, NULL);
306 gpio_request(GPIO_FN_MMCD0_2, NULL);
307 gpio_request(GPIO_FN_MMCD0_3, NULL);
308 gpio_request(GPIO_FN_MMCD0_4, NULL);
309 gpio_request(GPIO_FN_MMCD0_5, NULL);
310 gpio_request(GPIO_FN_MMCD0_6, NULL);
311 gpio_request(GPIO_FN_MMCD0_7, NULL);
312 gpio_request(GPIO_FN_MMCCMD0, NULL);
313 gpio_request(GPIO_PORT208, NULL); /* Reset */
314 gpio_direction_output(GPIO_PORT208, 1);
315
267#ifdef CONFIG_CACHE_L2X0 316#ifdef CONFIG_CACHE_L2X0
268 /* Early BRESP enable, Shared attribute override enable, 64K*8way */ 317 /* Early BRESP enable, Shared attribute override enable, 64K*8way */
269 l2x0_init(__io(0xf0100000), 0x40460000, 0x82000fff); 318 l2x0_init(__io(0xf0100000), 0x40460000, 0x82000fff);