Commit 0a4266bb authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Rafael J. Wysocki

ARM: mach-shmobile: armadillo800eva: add MMCIF support

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: default avatarSimon Horman <horms@verge.net.au>
Acked-by: default avatarMagnus Damm <damm@opensource.se>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent 2e3a5ef2
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <linux/usb/renesas_usbhs.h> #include <linux/usb/renesas_usbhs.h>
#include <linux/mfd/tmio.h> #include <linux/mfd/tmio.h>
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <linux/mmc/sh_mmcif.h>
#include <linux/mmc/sh_mobile_sdhi.h> #include <linux/mmc/sh_mobile_sdhi.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/irqs.h> #include <mach/irqs.h>
...@@ -492,6 +493,44 @@ static struct platform_device sdhi1_device = { ...@@ -492,6 +493,44 @@ static struct platform_device sdhi1_device = {
.resource = sdhi1_resources, .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 */ /* I2C */
static struct i2c_board_info i2c0_devices[] = { static struct i2c_board_info i2c0_devices[] = {
{ {
...@@ -508,6 +547,7 @@ static struct platform_device *eva_devices[] __initdata = { ...@@ -508,6 +547,7 @@ static struct platform_device *eva_devices[] __initdata = {
&gpio_keys_device, &gpio_keys_device,
&sh_eth_device, &sh_eth_device,
&sdhi0_device, &sdhi0_device,
&sh_mmcif_device,
}; };
static void __init eva_clock_init(void) static void __init eva_clock_init(void)
...@@ -648,6 +688,23 @@ static void __init eva_init(void) ...@@ -648,6 +688,23 @@ static void __init eva_init(void)
/* we can use GPIO_FN_IRQ31_PORT167 here for SDHI0 CD irq */ /* 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 * CAUTION
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment