summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2010-05-23 14:12:46 +0000
committerPaul Mundt <lethal@linux-sh.org>2010-05-31 13:44:41 +0900
commit341291a67f224e507df9b55501f659abd64fc976 (patch)
tree703f6e1cd691b2a87e054476f087f4f2c8e6d7af
parentc8ee3d4b5f9de761d65a588b5f243a7a7c01a722 (diff)
downloadtalos-op-linux-341291a67f224e507df9b55501f659abd64fc976.tar.gz
talos-op-linux-341291a67f224e507df9b55501f659abd64fc976.zip
ARM: mach-shmobile: add support for the second SD-/MMC-card slot on ap4evb
The ap4evb board is equipped with two card slots: one SD-card slot and one SD-/MMC-card slot. The latter is connected to the second SDHI interface on sh7372 (SDHI1). Its power supply can be jumpered either to 1.8 or 3.3V, we fix it at default 1.8V for now. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c44
1 files changed, 42 insertions, 2 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 8e8a6fb213fd..81618ba598e9 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -25,6 +25,7 @@
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/mfd/sh_mobile_sdhi.h>
+#include <linux/mmc/host.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
@@ -298,8 +299,8 @@ static struct platform_device sh_mmcif_device = {
/* SDHI0 */
static struct sh_mobile_sdhi_info sdhi0_info = {
- .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
- .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
+ .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
+ .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
};
static struct resource sdhi0_resources[] = {
@@ -325,6 +326,36 @@ static struct platform_device sdhi0_device = {
},
};
+/* SDHI1 */
+static struct sh_mobile_sdhi_info sdhi1_info = {
+ .dma_slave_tx = SHDMA_SLAVE_SDHI1_TX,
+ .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX,
+ .tmio_ocr_mask = MMC_VDD_165_195,
+};
+
+static struct resource sdhi1_resources[] = {
+ [0] = {
+ .name = "SDHI1",
+ .start = 0xe6860000,
+ .end = 0xe68601ff,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = evt2irq(0x0e80),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device sdhi1_device = {
+ .name = "sh_mobile_sdhi",
+ .num_resources = ARRAY_SIZE(sdhi1_resources),
+ .resource = sdhi1_resources,
+ .id = 1,
+ .dev = {
+ .platform_data = &sdhi1_info,
+ },
+};
+
/* USB1 */
void usb1_host_port_power(int port, int power)
{
@@ -497,6 +528,7 @@ static struct platform_device *ap4evb_devices[] __initdata = {
&smc911x_device,
&keysc_device,
&sdhi0_device,
+ &sdhi1_device,
&usb1_host_device,
&lcdc_device,
&mipidsi0_device,
@@ -739,6 +771,14 @@ static void __init ap4evb_init(void)
i2c_register_board_info(1, i2c1_devices,
ARRAY_SIZE(i2c1_devices));
+ /* SDHI1 */
+ gpio_request(GPIO_FN_SDHICMD1, NULL);
+ gpio_request(GPIO_FN_SDHICLK1, NULL);
+ gpio_request(GPIO_FN_SDHID1_3, NULL);
+ gpio_request(GPIO_FN_SDHID1_2, NULL);
+ gpio_request(GPIO_FN_SDHID1_1, NULL);
+ gpio_request(GPIO_FN_SDHID1_0, NULL);
+
sh7372_add_standard_devices();
platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices));
OpenPOWER on IntegriCloud