aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-04-24 05:09:31 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-05-12 16:33:06 -0400
commit2e3a5ef28f8182c439a5a276ff4c0883c02787f4 (patch)
tree2c4dc2a9255bef0d9bd4b763b7c676df7148d2d7 /arch/arm/mach-shmobile
parent49c01112d6afdb679276c172ffcd4f1205c1ff97 (diff)
ARM: mach-shmobile: armadillo800eva: add SDHI1 support
We can switch CON8/CON14 by SW1.5 SDHI1 is CON8 (SW1.5 = ON) Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Simon Horman <horms@verge.net.au> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva.c66
1 files changed, 65 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index ed8568635bcc..5f6242866703 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -93,7 +93,7 @@
93 * 0 | Extension Bus | D8-D15 disable, eMMC enable 93 * 0 | Extension Bus | D8-D15 disable, eMMC enable
94 * 1 | Extension Bus | D8-D15 enable, eMMC disable 94 * 1 | Extension Bus | D8-D15 enable, eMMC disable
95 * -12345678-+---------------+---------------------------- 95 * -12345678-+---------------+----------------------------
96 * 0 | SDHI1 | COM8 enable, COM14 disable 96 * 0 | SDHI1 | COM8 disable, COM14 enable
97 * 1 | SDHI1 | COM8 enable, COM14 disable 97 * 1 | SDHI1 | COM8 enable, COM14 disable
98 * -12345678-+---------------+---------------------------- 98 * -12345678-+---------------+----------------------------
99 * 0 | USB0 | COM20 enable, COM24 disable 99 * 0 | USB0 | COM20 enable, COM24 disable
@@ -454,6 +454,44 @@ static struct platform_device sdhi0_device = {
454 .resource = sdhi0_resources, 454 .resource = sdhi0_resources,
455}; 455};
456 456
457/* SDHI1 */
458static struct sh_mobile_sdhi_info sdhi1_info = {
459 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
460 .tmio_ocr_mask = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
461 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
462};
463
464static struct resource sdhi1_resources[] = {
465 [0] = {
466 .name = "SDHI1",
467 .start = 0xe6860000,
468 .end = 0xe6860100 - 1,
469 .flags = IORESOURCE_MEM,
470 },
471 [1] = {
472 .start = evt2irq(0x0E80),
473 .flags = IORESOURCE_IRQ,
474 },
475 [2] = {
476 .start = evt2irq(0x0EA0),
477 .flags = IORESOURCE_IRQ,
478 },
479 [3] = {
480 .start = evt2irq(0x0EC0),
481 .flags = IORESOURCE_IRQ,
482 },
483};
484
485static struct platform_device sdhi1_device = {
486 .name = "sh_mobile_sdhi",
487 .id = 1,
488 .dev = {
489 .platform_data = &sdhi1_info,
490 },
491 .num_resources = ARRAY_SIZE(sdhi1_resources),
492 .resource = sdhi1_resources,
493};
494
457/* I2C */ 495/* I2C */
458static struct i2c_board_info i2c0_devices[] = { 496static struct i2c_board_info i2c0_devices[] = {
459 { 497 {
@@ -619,6 +657,32 @@ static void __init eva_init(void)
619 gpio_request(GPIO_PORT176, NULL); 657 gpio_request(GPIO_PORT176, NULL);
620 gpio_direction_output(GPIO_PORT176, 1); 658 gpio_direction_output(GPIO_PORT176, 1);
621 659
660 /*
661 * We can switch CON8/CON14 by SW1.5,
662 * but it needs after DBGMD_SELECT_B
663 */
664 gpio_request(GPIO_PORT6, NULL);
665 gpio_direction_input(GPIO_PORT6);
666 if (gpio_get_value(GPIO_PORT6)) {
667 /* CON14 enable */
668 } else {
669 /* CON8 (SDHI1) enable */
670 gpio_request(GPIO_FN_SDHI1_CLK, NULL);
671 gpio_request(GPIO_FN_SDHI1_CMD, NULL);
672 gpio_request(GPIO_FN_SDHI1_D0, NULL);
673 gpio_request(GPIO_FN_SDHI1_D1, NULL);
674 gpio_request(GPIO_FN_SDHI1_D2, NULL);
675 gpio_request(GPIO_FN_SDHI1_D3, NULL);
676 gpio_request(GPIO_FN_SDHI1_CD, NULL);
677 gpio_request(GPIO_FN_SDHI1_WP, NULL);
678
679 gpio_request(GPIO_PORT16, NULL); /* SDSLOT2_PON */
680 gpio_direction_output(GPIO_PORT16, 1);
681
682 platform_device_register(&sdhi1_device);
683 }
684
685
622#ifdef CONFIG_CACHE_L2X0 686#ifdef CONFIG_CACHE_L2X0
623 /* Early BRESP enable, Shared attribute override enable, 32K*8way */ 687 /* Early BRESP enable, Shared attribute override enable, 32K*8way */
624 l2x0_init(__io(0xf0002000), 0x40440000, 0x82000fff); 688 l2x0_init(__io(0xf0002000), 0x40440000, 0x82000fff);