From patchwork Sun May 23 14:12:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 101740 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4NECXnJ027633 for ; Sun, 23 May 2010 14:12:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754789Ab0EWOMd (ORCPT ); Sun, 23 May 2010 10:12:33 -0400 Received: from mail.gmx.net ([213.165.64.20]:34566 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754654Ab0EWOMc (ORCPT ); Sun, 23 May 2010 10:12:32 -0400 Received: (qmail invoked by alias); 23 May 2010 14:12:30 -0000 Received: from p57BD181B.dip0.t-ipconnect.de (EHLO axis700.grange) [87.189.24.27] by mail.gmx.net (mp017) with SMTP; 23 May 2010 16:12:30 +0200 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX1/JBhR3heTJojm9hN+BUjy1kuk+9mzcfD/TAmvKVq W5Eknc9aFYL5hb Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1OGBv4-00014C-M0; Sun, 23 May 2010 16:12:46 +0200 Date: Sun, 23 May 2010 16:12:46 +0200 (CEST) From: Guennadi Liakhovetski To: "linux-sh@vger.kernel.org" cc: Ian Molton , Samuel Ortiz , linux-mmc@vger.kernel.org, Magnus Damm Subject: [PATCH 3/3 v2] ARM: mach-shmobile: add support for the second SD-/MMC-card slot on ap4evb In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Y-GMX-Trusted: 0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 23 May 2010 14:12:33 +0000 (UTC) diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index e02e09a..6c23d74 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -233,8 +234,8 @@ static struct platform_device keysc_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[] = { @@ -260,6 +261,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) { @@ -379,6 +410,7 @@ static struct platform_device *ap4evb_devices[] __initdata = { &smc911x_device, &keysc_device, &sdhi0_device, + &sdhi1_device, &usb1_host_device, &lcdc_device, &mipidsi0_device, @@ -544,6 +576,14 @@ static void __init ap4evb_init(void) /* setup USB phy */ __raw_writew(0x8a0a, 0xE6058130); /* USBCR2 */ + /* 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));