From patchwork Sat Dec 22 19:31:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Dunn X-Patchwork-Id: 1906251 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id C0A303FC64 for ; Sat, 22 Dec 2012 19:35:30 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TmUnv-0002IC-PL; Sat, 22 Dec 2012 19:32:15 +0000 Received: from smtp.newsguy.com ([74.209.136.69]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TmUnW-0002Fh-5H for linux-arm-kernel@lists.infradead.org; Sat, 22 Dec 2012 19:31:51 +0000 Received: from localhost.localdomain (191.sub-70-199-233.myvzw.com [70.199.233.191]) by smtp.newsguy.com (8.14.3/8.14.3) with ESMTP id qBMJVYAB082365 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 22 Dec 2012 11:31:47 -0800 (PST) (envelope-from mikedunn@newsguy.com) From: Mike Dunn To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] ARM: pxa: palmtreo: add docg4 device initialization Date: Sat, 22 Dec 2012 11:31:59 -0800 Message-Id: <1356204719-3317-4-git-send-email-mikedunn@newsguy.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1356204719-3317-1-git-send-email-mikedunn@newsguy.com> References: <1356204719-3317-1-git-send-email-mikedunn@newsguy.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121222_143150_590164_A33914F7 X-CRM114-Status: GOOD ( 11.03 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: marex@denx.de, Mike Dunn X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch adds initialization of the docg4 nand flash device to the treo680. Signed-off-by: Mike Dunn Reviewed-by: Marek Vasut --- arch/arm/mach-pxa/palmtreo.c | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c index cb9cc7b..f3e2d08 100644 --- a/arch/arm/mach-pxa/palmtreo.c +++ b/arch/arm/mach-pxa/palmtreo.c @@ -404,6 +404,36 @@ static void __init palmtreo_leds_init(void) } /****************************************************************************** + * diskonchip docg4 flash + ******************************************************************************/ +#if defined(CONFIG_MACH_TREO680) +/* REVISIT: does the centro have this device also? */ +#if defined(CONFIG_MTD_NAND_DOCG4) || defined(CONFIG_MTD_NAND_DOCG4_MODULE) +static struct resource docg4_resources[] = { + { + .start = 0x00000000, + .end = 0x00001FFF, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device palmtreo680_docg4_flashdevice = { + .name = "docg4", + .id = -1, + .resource = docg4_resources, + .num_resources = ARRAY_SIZE(docg4_resources), +}; + +static void __init palmtreo680_docg4_flash_init(void) +{ + platform_device_register(&palmtreo680_docg4_flashdevice); +} +#else +static inline void palmtreo680_docg4_flash_init(void) {} +#endif +#endif + +/****************************************************************************** * Machine init ******************************************************************************/ static void __init treo_reserve(void) @@ -482,6 +512,7 @@ static void __init treo680_init(void) treo680_lcd_init(); palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY, GPIO_NR_TREO680_SD_POWER, 0); + palmtreo680_docg4_flash_init(); } #endif