From patchwork Fri Oct 2 02:22:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 51277 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n922RO72007248 for ; Fri, 2 Oct 2009 02:27:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754936AbZJBC1b (ORCPT ); Thu, 1 Oct 2009 22:27:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754823AbZJBC1b (ORCPT ); Thu, 1 Oct 2009 22:27:31 -0400 Received: from mail-ew0-f211.google.com ([209.85.219.211]:61326 "EHLO mail-ew0-f211.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754516AbZJBC1a (ORCPT ); Thu, 1 Oct 2009 22:27:30 -0400 Received: by mail-ew0-f211.google.com with SMTP id 7so778329ewy.17 for ; Thu, 01 Oct 2009 19:27:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=eyqb0JTlYm5nQVItDJ7EV44DWWUx1spyC26C+JQ5gAQ=; b=DdJLMbDhANomoNjVHN0OgvfboEo2Vu1EW5QMgxAApNYP5aEFDtcnSc3wJjSLyNRJsI RU7hSiRuKtH5bbTAqYNe2vcAc+5VSWk1McgVj1F5ttMtASiXkyErjgXpc1RdY9RW2TRn ZNZfsPBWGRk3qEPkhlBnGAKkjoBDvfFnQ1Rn0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=DIFjdAeZnDY1DX1sqLayYNqtHoro1mU/Uk8nDWQcz5iGam5vG8Uz+Ob8kfTddfL7oH XUS7AfREOd6Kh68nPkxEe/YDCKGvem+/uuXH0wIfxVA2IXVDdzwlgZ3K5HPn/Nx2BQSz lyAjQeIV43igfp0q3O3wLt8w5RF+WnH0YdtGg= Received: by 10.210.153.2 with SMTP id a2mr8695769ebe.12.1254450453756; Thu, 01 Oct 2009 19:27:33 -0700 (PDT) Received: from rxone.opensource.se (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id 10sm925075eyz.2.2009.10.01.19.27.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 01 Oct 2009 19:27:32 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: akpm@linux-foundation.org, linux-mmc@vger.kernel.org, ian@mnementh.co.uk, lethal@linux-sh.org, Magnus Damm , g.liakhovetski@gmx.de Date: Fri, 02 Oct 2009 11:22:56 +0900 Message-Id: <20091002022256.8215.49366.sendpatchset@rxone.opensource.se> In-Reply-To: <20091002022158.8215.58317.sendpatchset@rxone.opensource.se> References: <20091002022158.8215.58317.sendpatchset@rxone.opensource.se> Subject: [PATCH 05/07] sh: SDHI platform data to the AP325RXA board Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org --- 0001/arch/sh/boards/board-ap325rxa.c +++ work/arch/sh/boards/board-ap325rxa.c 2009-10-02 09:44:21.000000000 +0900 @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include #include @@ -409,17 +407,25 @@ static struct platform_device ceu_device }, }; -struct spi_gpio_platform_data sdcard_cn3_platform_data = { - .sck = GPIO_PTD0, - .mosi = GPIO_PTD1, - .miso = GPIO_PTD2, - .num_chipselect = 1, +static struct resource sdhi0_cn3_resources[] = { + [0] = { + .name = "SDHI0", + .start = 0x04ce0000, + .end = 0x04ce01ff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = 101, + .flags = IORESOURCE_IRQ, + }, }; -static struct platform_device sdcard_cn3_device = { - .name = "spi_gpio", - .dev = { - .platform_data = &sdcard_cn3_platform_data, +static struct platform_device sdhi0_cn3_device = { + .name = "sh_mobile_sdhi", + .num_resources = ARRAY_SIZE(sdhi0_cn3_resources), + .resource = sdhi0_cn3_resources, + .archdata = { + .hwblk_id = HWBLK_SDHI0, }, }; @@ -470,20 +476,11 @@ static struct platform_device *ap325rxa_ &lcdc_device, &ceu_device, &nand_flash_device, - &sdcard_cn3_device, + &sdhi0_cn3_device, &ap325rxa_camera[0], &ap325rxa_camera[1], }; -static struct spi_board_info ap325rxa_spi_devices[] = { - { - .modalias = "mmc_spi", - .max_speed_hz = 5000000, - .chip_select = 0, - .controller_data = (void *) GPIO_PTD5, - }, -}; - static int __init ap325rxa_devices_setup(void) { /* LD3 and LD4 LEDs */ @@ -578,12 +575,19 @@ static int __init ap325rxa_devices_setup platform_resource_setup_memory(&ceu_device, "ceu", 4 << 20); + /* SDHI0 */ + gpio_request(GPIO_FN_SDHI0CD_PTD, NULL); + gpio_request(GPIO_FN_SDHI0WP_PTD, NULL); + gpio_request(GPIO_FN_SDHI0D3_PTD, NULL); + gpio_request(GPIO_FN_SDHI0D2_PTD, NULL); + gpio_request(GPIO_FN_SDHI0D1_PTD, NULL); + gpio_request(GPIO_FN_SDHI0D0_PTD, NULL); + gpio_request(GPIO_FN_SDHI0CMD_PTD, NULL); + gpio_request(GPIO_FN_SDHI0CLK_PTD, NULL); + i2c_register_board_info(0, ap325rxa_i2c_devices, ARRAY_SIZE(ap325rxa_i2c_devices)); - spi_register_board_info(ap325rxa_spi_devices, - ARRAY_SIZE(ap325rxa_spi_devices)); - return platform_add_devices(ap325rxa_devices, ARRAY_SIZE(ap325rxa_devices)); }