From patchwork Fri May 14 10:34: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: 99575 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 o4EAYVNC028078 for ; Fri, 14 May 2010 10:34:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753282Ab0ENKen (ORCPT ); Fri, 14 May 2010 06:34:43 -0400 Received: from mail.gmx.net ([213.165.64.20]:33397 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752471Ab0ENKem (ORCPT ); Fri, 14 May 2010 06:34:42 -0400 Received: (qmail invoked by alias); 14 May 2010 10:34:40 -0000 Received: from p57BD1CB8.dip0.t-ipconnect.de (EHLO axis700.grange) [87.189.28.184] by mail.gmx.net (mp051) with SMTP; 14 May 2010 12:34:40 +0200 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX1/D9PAWH+jDqAatv3e3KbWwkbgcUYk1rHMwZUNb02 kW5JLiFikMWhgU Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1OCsEA-0002Gm-DP; Fri, 14 May 2010 12:34:46 +0200 Date: Fri, 14 May 2010 12:34: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] ARM: 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]); Fri, 14 May 2010 10:34:44 +0000 (UTC) diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 865e024..9faed01 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 @@ -217,8 +218,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[] = { @@ -244,6 +245,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, + }, +}; + static struct sh_mobile_lcdc_info sh_mobile_lcdc_info = { .clock_source = LCDC_CLK_PERIPHERAL, /* One of interface clocks */ .ch[0] = { @@ -322,6 +353,7 @@ static struct platform_device *ap4evb_devices[] __initdata = { &smc911x_device, &keysc_device, &sdhi0_device, + &sdhi1_device, &lcdc_device, &mipidsi0_device, }; @@ -448,6 +480,14 @@ static void __init ap4evb_init(void) gpio_request(GPIO_FN_SDHID0_1, NULL); gpio_request(GPIO_FN_SDHID0_0, NULL); + /* 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));