aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-04-24 05:09:42 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-05-12 16:33:06 -0400
commit0a4266bb22774bb0b6390d2633a151d996a14e77 (patch)
tree1ce7918432dcaeecd9f37f090c19daa03177da25 /arch/arm/mach-shmobile
parent2e3a5ef28f8182c439a5a276ff4c0883c02787f4 (diff)
ARM: mach-shmobile: armadillo800eva: add MMCIF support
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.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 5f6242866703..0cfaec5a5c6a 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -33,6 +33,7 @@
33#include <linux/usb/renesas_usbhs.h> 33#include <linux/usb/renesas_usbhs.h>
34#include <linux/mfd/tmio.h> 34#include <linux/mfd/tmio.h>
35#include <linux/mmc/host.h> 35#include <linux/mmc/host.h>
36#include <linux/mmc/sh_mmcif.h>
36#include <linux/mmc/sh_mobile_sdhi.h> 37#include <linux/mmc/sh_mobile_sdhi.h>
37#include <mach/common.h> 38#include <mach/common.h>
38#include <mach/irqs.h> 39#include <mach/irqs.h>
@@ -492,6 +493,44 @@ static struct platform_device sdhi1_device = {
492 .resource = sdhi1_resources, 493 .resource = sdhi1_resources,
493}; 494};
494 495
496/* MMCIF */
497static struct sh_mmcif_plat_data sh_mmcif_plat = {
498 .sup_pclk = 0,
499 .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
500 .caps = MMC_CAP_4_BIT_DATA |
501 MMC_CAP_8_BIT_DATA |
502 MMC_CAP_NONREMOVABLE,
503};
504
505static struct resource sh_mmcif_resources[] = {
506 [0] = {
507 .name = "MMCIF",
508 .start = 0xe6bd0000,
509 .end = 0xe6bd0100 - 1,
510 .flags = IORESOURCE_MEM,
511 },
512 [1] = {
513 /* MMC ERR */
514 .start = evt2irq(0x1AC0),
515 .flags = IORESOURCE_IRQ,
516 },
517 [2] = {
518 /* MMC NOR */
519 .start = evt2irq(0x1AE0),
520 .flags = IORESOURCE_IRQ,
521 },
522};
523
524static struct platform_device sh_mmcif_device = {
525 .name = "sh_mmcif",
526 .id = -1,
527 .dev = {
528 .platform_data = &sh_mmcif_plat,
529 },
530 .num_resources = ARRAY_SIZE(sh_mmcif_resources),
531 .resource = sh_mmcif_resources,
532};
533
495/* I2C */ 534/* I2C */
496static struct i2c_board_info i2c0_devices[] = { 535static struct i2c_board_info i2c0_devices[] = {
497 { 536 {
@@ -508,6 +547,7 @@ static struct platform_device *eva_devices[] __initdata = {
508 &gpio_keys_device, 547 &gpio_keys_device,
509 &sh_eth_device, 548 &sh_eth_device,
510 &sdhi0_device, 549 &sdhi0_device,
550 &sh_mmcif_device,
511}; 551};
512 552
513static void __init eva_clock_init(void) 553static void __init eva_clock_init(void)
@@ -649,6 +689,23 @@ static void __init eva_init(void)
649 /* we can use GPIO_FN_IRQ31_PORT167 here for SDHI0 CD irq */ 689 /* we can use GPIO_FN_IRQ31_PORT167 here for SDHI0 CD irq */
650 690
651 /* 691 /*
692 * MMCIF
693 *
694 * Here doesn't care SW1.4 status,
695 * since CON2 is not mounted.
696 */
697 gpio_request(GPIO_FN_MMC1_CLK_PORT103, NULL);
698 gpio_request(GPIO_FN_MMC1_CMD_PORT104, NULL);
699 gpio_request(GPIO_FN_MMC1_D0_PORT149, NULL);
700 gpio_request(GPIO_FN_MMC1_D1_PORT148, NULL);
701 gpio_request(GPIO_FN_MMC1_D2_PORT147, NULL);
702 gpio_request(GPIO_FN_MMC1_D3_PORT146, NULL);
703 gpio_request(GPIO_FN_MMC1_D4_PORT145, NULL);
704 gpio_request(GPIO_FN_MMC1_D5_PORT144, NULL);
705 gpio_request(GPIO_FN_MMC1_D6_PORT143, NULL);
706 gpio_request(GPIO_FN_MMC1_D7_PORT142, NULL);
707
708 /*
652 * CAUTION 709 * CAUTION
653 * 710 *
654 * DBGMD/LCDC0/FSIA MUX 711 * DBGMD/LCDC0/FSIA MUX