From patchwork Fri Feb 19 09:54:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 80577 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 o1J9sf2U031950 for ; Fri, 19 Feb 2010 09:54:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751466Ab0BSJyk (ORCPT ); Fri, 19 Feb 2010 04:54:40 -0500 Received: from mail-yw0-f197.google.com ([209.85.211.197]:33489 "EHLO mail-yw0-f197.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750809Ab0BSJyj (ORCPT ); Fri, 19 Feb 2010 04:54:39 -0500 Received: by ywh35 with SMTP id 35so1883884ywh.4 for ; Fri, 19 Feb 2010 01:54:39 -0800 (PST) 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 :subject; bh=Yj3B7tDAG+Ugbsr9852AOoITYyABUR1AnI40JwY1nOI=; b=US33r6xkbzDJTsYEmXCbDITXrlT6umlOO6Tps6TXK7aZN7FKioC98qWGpoj3VrLymn hVLA4fqFczlSulWaDDiSi2+gi+dG4CGX6sqvTvuxflq3cS9QYapMGKI0S8QwhHGmNw1i wTJNpTRRGjrbyAuhokatxxak7M1hntLST9vjw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=m5lkRwzUF5SRRClM644qjL0Q4UlvvWHHZvJ7YeiXDn0uM8sWrDN3Dz3Ov/wX/4ingr RA0UpENiZwhhzQiJ7aC1DZpeBw2WKGu5mnZ0we7voRq/0UdK8qhsJ0yGrNs72oc5NNeZ kRXYFBWLhdDbaPC7HUuny4jW864MT5a9fNE3E= Received: by 10.90.148.3 with SMTP id v3mr2204145agd.40.1266573266714; Fri, 19 Feb 2010 01:54:26 -0800 (PST) Received: from ?127.0.0.1? (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id 15sm4079503yxh.22.2010.02.19.01.54.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 19 Feb 2010 01:54:26 -0800 (PST) From: Magnus Damm To: lethal@linux-sh.org Cc: Magnus Damm , linux-sh@vger.kernel.org Date: Fri, 19 Feb 2010 18:54:06 +0900 Message-Id: <20100219095406.5206.86934.sendpatchset@t400s> Subject: [PATCH] ARM: mach-shmobile: G3EVM FLCTL platform data 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, 19 Feb 2010 09:54:41 +0000 (UTC) --- 0003/arch/arm/mach-shmobile/board-g3evm.c +++ work/arch/arm/mach-shmobile/board-g3evm.c 2010-02-19 18:50:03.000000000 +0900 @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -166,10 +167,53 @@ static struct platform_device keysc_devi }, }; +static struct mtd_partition nand_partition_info[] = { + { + .name = "system", + .offset = 0, + .size = 64 * 1024 * 1024, + }, + { + .name = "userdata", + .offset = MTDPART_OFS_APPEND, + .size = 128 * 1024 * 1024, + }, + { + .name = "cache", + .offset = MTDPART_OFS_APPEND, + .size = 64 * 1024 * 1024, + }, +}; + +static struct resource nand_flash_resources[] = { + [0] = { + .start = 0xe6a30000, + .end = 0xe6a3009b, + .flags = IORESOURCE_MEM, + } +}; + +static struct sh_flctl_platform_data nand_flash_data = { + .parts = nand_partition_info, + .nr_parts = ARRAY_SIZE(nand_partition_info), + .flcmncr_val = QTSEL_E | FCKSEL_E | TYPESEL_SET | NANWF_E + | SHBUSSEL | SEL_16BIT, +}; + +static struct platform_device nand_flash_device = { + .name = "sh_flctl", + .resource = nand_flash_resources, + .num_resources = ARRAY_SIZE(nand_flash_resources), + .dev = { + .platform_data = &nand_flash_data, + }, +}; + static struct platform_device *g3evm_devices[] __initdata = { &nor_flash_device, &usb_host_device, &keysc_device, + &nand_flash_device, }; static struct map_desc g3evm_io_desc[] __initdata = { @@ -251,6 +295,29 @@ static void __init g3evm_init(void) gpio_request(GPIO_FN_PORT57_KEYIN5_PU, NULL); gpio_request(GPIO_FN_PORT58_KEYIN6_PU, NULL); + /* FLCTL */ + gpio_request(GPIO_FN_FCE0, NULL); + gpio_request(GPIO_FN_D0_ED0_NAF0, NULL); + gpio_request(GPIO_FN_D1_ED1_NAF1, NULL); + gpio_request(GPIO_FN_D2_ED2_NAF2, NULL); + gpio_request(GPIO_FN_D3_ED3_NAF3, NULL); + gpio_request(GPIO_FN_D4_ED4_NAF4, NULL); + gpio_request(GPIO_FN_D5_ED5_NAF5, NULL); + gpio_request(GPIO_FN_D6_ED6_NAF6, NULL); + gpio_request(GPIO_FN_D7_ED7_NAF7, NULL); + gpio_request(GPIO_FN_D8_ED8_NAF8, NULL); + gpio_request(GPIO_FN_D9_ED9_NAF9, NULL); + gpio_request(GPIO_FN_D10_ED10_NAF10, NULL); + gpio_request(GPIO_FN_D11_ED11_NAF11, NULL); + gpio_request(GPIO_FN_D12_ED12_NAF12, NULL); + gpio_request(GPIO_FN_D13_ED13_NAF13, NULL); + gpio_request(GPIO_FN_D14_ED14_NAF14, NULL); + gpio_request(GPIO_FN_D15_ED15_NAF15, NULL); + gpio_request(GPIO_FN_WE0_XWR0_FWE, NULL); + gpio_request(GPIO_FN_FRB, NULL); + /* FOE, FCDE, FSC on dedicated pins */ + __raw_writel(__raw_readl(0xe6158048) & ~(1 << 15), 0xe6158048); + sh7367_add_standard_devices(); platform_add_devices(g3evm_devices, ARRAY_SIZE(g3evm_devices));