From patchwork Thu Dec 27 18:02:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Dunn X-Patchwork-Id: 1913511 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id AE2F5DF2A2 for ; Thu, 27 Dec 2012 18:07:22 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1ToHom-000502-SU; Thu, 27 Dec 2012 18:04:33 +0000 Received: from smtp.newsguy.com ([74.209.136.69]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1ToHoR-0004ur-Tf for linux-arm-kernel@lists.infradead.org; Thu, 27 Dec 2012 18:04:13 +0000 Received: from localhost.localdomain (62.sub-70-199-234.myvzw.com [70.199.234.62]) by smtp.newsguy.com (8.14.3/8.14.3) with ESMTP id qBRI2pFU099268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 27 Dec 2012 10:04:07 -0800 (PST) (envelope-from mikedunn@newsguy.com) From: Mike Dunn To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/4] ARM: palmtreo: add docg4 device initialization Date: Thu, 27 Dec 2012 10:02:19 -0800 Message-Id: <1356631340-30328-4-git-send-email-mikedunn@newsguy.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1356631340-30328-1-git-send-email-mikedunn@newsguy.com> References: <1356631340-30328-1-git-send-email-mikedunn@newsguy.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121227_130412_181510_3321C58E X-CRM114-Status: GOOD ( 11.86 ) 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: Marek Vasut , Eric Miao , Tomas Cech , Mike Dunn , Haojian Zhuang 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 5775128..8ca152b 100644 --- a/arch/arm/mach-pxa/palmtreo.c +++ b/arch/arm/mach-pxa/palmtreo.c @@ -397,6 +397,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 IS_ENABLED(CONFIG_MTD_NAND_DOCG4) +static struct resource docg4_resources[] = { + { + .start = 0x00000000, + .end = 0x00001FFF, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device treo680_docg4_flash = { + .name = "docg4", + .id = -1, + .resource = docg4_resources, + .num_resources = ARRAY_SIZE(docg4_resources), +}; + +static void __init treo680_docg4_flash_init(void) +{ + platform_device_register(&treo680_docg4_flash); +} +#else +static inline void treo680_docg4_flash_init(void) {} +#endif +#endif + +/****************************************************************************** * Machine init ******************************************************************************/ static void __init treo_reserve(void) @@ -480,6 +510,7 @@ static void __init treo680_init(void) treo680_gpio_init(); palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY, GPIO_NR_TREO680_SD_POWER, 0); + treo680_docg4_flash_init(); } #endif