From 0e163904011df8c405b98a529463625c37084b67 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 24 Apr 2012 02:09:42 -0700 Subject: [PATCH] --- yaml --- r: 303487 b: refs/heads/master c: 0a4266bb22774bb0b6390d2633a151d996a14e77 h: refs/heads/master i: 303485: c5b216288818b24c1238cf918211f464f13594dc 303483: 7db7d5f2ed10ef625dcb4f2180bb45e01417367a 303479: 8070bae4fd31098988baee936b25cfa02e599929 303471: d26c15fc7041848e381b6ab5b2c883317ab3de6d 303455: 565ea960e675af5444e2fa6ae26b84721407f35c 303423: d869c7f5c9ed1b4d80406f0166629b1db6b51e94 303359: 6b4391575ba57bbd47f7c1f3cfcc6de17fab7602 v: v3 --- [refs] | 2 +- .../arm/mach-shmobile/board-armadillo800eva.c | 57 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 903afb88264e..ae02067ce8b3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2e3a5ef28f8182c439a5a276ff4c0883c02787f4 +refs/heads/master: 0a4266bb22774bb0b6390d2633a151d996a14e77 diff --git a/trunk/arch/arm/mach-shmobile/board-armadillo800eva.c b/trunk/arch/arm/mach-shmobile/board-armadillo800eva.c index 5f6242866703..0cfaec5a5c6a 100644 --- a/trunk/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/trunk/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -492,6 +493,44 @@ static struct platform_device sdhi1_device = { .resource = sdhi1_resources, }; +/* MMCIF */ +static struct sh_mmcif_plat_data sh_mmcif_plat = { + .sup_pclk = 0, + .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, + .caps = MMC_CAP_4_BIT_DATA | + MMC_CAP_8_BIT_DATA | + MMC_CAP_NONREMOVABLE, +}; + +static struct resource sh_mmcif_resources[] = { + [0] = { + .name = "MMCIF", + .start = 0xe6bd0000, + .end = 0xe6bd0100 - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + /* MMC ERR */ + .start = evt2irq(0x1AC0), + .flags = IORESOURCE_IRQ, + }, + [2] = { + /* MMC NOR */ + .start = evt2irq(0x1AE0), + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device sh_mmcif_device = { + .name = "sh_mmcif", + .id = -1, + .dev = { + .platform_data = &sh_mmcif_plat, + }, + .num_resources = ARRAY_SIZE(sh_mmcif_resources), + .resource = sh_mmcif_resources, +}; + /* I2C */ static struct i2c_board_info i2c0_devices[] = { { @@ -508,6 +547,7 @@ static struct platform_device *eva_devices[] __initdata = { &gpio_keys_device, &sh_eth_device, &sdhi0_device, + &sh_mmcif_device, }; static void __init eva_clock_init(void) @@ -648,6 +688,23 @@ static void __init eva_init(void) /* we can use GPIO_FN_IRQ31_PORT167 here for SDHI0 CD irq */ + /* + * MMCIF + * + * Here doesn't care SW1.4 status, + * since CON2 is not mounted. + */ + gpio_request(GPIO_FN_MMC1_CLK_PORT103, NULL); + gpio_request(GPIO_FN_MMC1_CMD_PORT104, NULL); + gpio_request(GPIO_FN_MMC1_D0_PORT149, NULL); + gpio_request(GPIO_FN_MMC1_D1_PORT148, NULL); + gpio_request(GPIO_FN_MMC1_D2_PORT147, NULL); + gpio_request(GPIO_FN_MMC1_D3_PORT146, NULL); + gpio_request(GPIO_FN_MMC1_D4_PORT145, NULL); + gpio_request(GPIO_FN_MMC1_D5_PORT144, NULL); + gpio_request(GPIO_FN_MMC1_D6_PORT143, NULL); + gpio_request(GPIO_FN_MMC1_D7_PORT142, NULL); + /* * CAUTION *