aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2010-05-23 10:12:46 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-05-31 00:44:41 -0400
commit341291a67f224e507df9b55501f659abd64fc976 (patch)
tree703f6e1cd691b2a87e054476f087f4f2c8e6d7af /arch/arm
parentc8ee3d4b5f9de761d65a588b5f243a7a7c01a722 (diff)
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>
Diffstat (limited to 'arch/arm')
-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 @@
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/mfd/sh_mobile_sdhi.h> 27#include <linux/mfd/sh_mobile_sdhi.h>
28#include <linux/mmc/host.h>
28#include <linux/mtd/mtd.h> 29#include <linux/mtd/mtd.h>
29#include <linux/mtd/partitions.h> 30#include <linux/mtd/partitions.h>
30#include <linux/mtd/physmap.h> 31#include <linux/mtd/physmap.h>
@@ -298,8 +299,8 @@ static struct platform_device sh_mmcif_device = {
298 299
299/* SDHI0 */ 300/* SDHI0 */
300static struct sh_mobile_sdhi_info sdhi0_info = { 301static struct sh_mobile_sdhi_info sdhi0_info = {
301 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, 302 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
302 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, 303 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
303}; 304};
304 305
305static struct resource sdhi0_resources[] = { 306static struct resource sdhi0_resources[] = {
@@ -325,6 +326,36 @@ static struct platform_device sdhi0_device = {
325 }, 326 },
326}; 327};
327 328
329/* SDHI1 */
330static struct sh_mobile_sdhi_info sdhi1_info = {
331 .dma_slave_tx = SHDMA_SLAVE_SDHI1_TX,
332 .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX,
333 .tmio_ocr_mask = MMC_VDD_165_195,
334};
335
336static struct resource sdhi1_resources[] = {
337 [0] = {
338 .name = "SDHI1",
339 .start = 0xe6860000,
340 .end = 0xe68601ff,
341 .flags = IORESOURCE_MEM,
342 },
343 [1] = {
344 .start = evt2irq(0x0e80),
345 .flags = IORESOURCE_IRQ,
346 },
347};
348
349static struct platform_device sdhi1_device = {
350 .name = "sh_mobile_sdhi",
351 .num_resources = ARRAY_SIZE(sdhi1_resources),
352 .resource = sdhi1_resources,
353 .id = 1,
354 .dev = {
355 .platform_data = &sdhi1_info,
356 },
357};
358
328/* USB1 */ 359/* USB1 */
329void usb1_host_port_power(int port, int power) 360void usb1_host_port_power(int port, int power)
330{ 361{
@@ -497,6 +528,7 @@ static struct platform_device *ap4evb_devices[] __initdata = {
497 &smc911x_device, 528 &smc911x_device,
498 &keysc_device, 529 &keysc_device,
499 &sdhi0_device, 530 &sdhi0_device,
531 &sdhi1_device,
500 &usb1_host_device, 532 &usb1_host_device,
501 &lcdc_device, 533 &lcdc_device,
502 &mipidsi0_device, 534 &mipidsi0_device,
@@ -739,6 +771,14 @@ static void __init ap4evb_init(void)
739 i2c_register_board_info(1, i2c1_devices, 771 i2c_register_board_info(1, i2c1_devices,
740 ARRAY_SIZE(i2c1_devices)); 772 ARRAY_SIZE(i2c1_devices));
741 773
774 /* SDHI1 */
775 gpio_request(GPIO_FN_SDHICMD1, NULL);
776 gpio_request(GPIO_FN_SDHICLK1, NULL);
777 gpio_request(GPIO_FN_SDHID1_3, NULL);
778 gpio_request(GPIO_FN_SDHID1_2, NULL);
779 gpio_request(GPIO_FN_SDHID1_1, NULL);
780 gpio_request(GPIO_FN_SDHID1_0, NULL);
781
742 sh7372_add_standard_devices(); 782 sh7372_add_standard_devices();
743 783
744 platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); 784 platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices));