From patchwork Wed Apr 4 18:36:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 7631 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 7E91023ED0 for ; Wed, 4 Apr 2012 18:37:16 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 45F12A189D3 for ; Wed, 4 Apr 2012 18:37:16 +0000 (UTC) Received: by yhpp61 with SMTP id p61so462000yhp.11 for ; Wed, 04 Apr 2012 11:37:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=mdT8MBLbu5vw3Ql0o0yVv1r64XWPIi+xvTrNokfOiWA=; b=CdTlywBTzMO4NCSVnXZjg4NOFBkvOdjNjEsvQ6Tw6jHeDpj/ZC+skXzssT1p1doDo5 eHQe+EfuEvDsXfqekX2fXcQfYqTyJC4twwa5yGStyqK3pxXbMfbTyU+2MzpOM13i+95D B54d154L4CSTLG3zo96iOsnQ4GEluw2TWUmKVyXx+efUbzmvOvTi+NFRDDLWXVVFRnt3 4RbJIeoZN5FFpD3cYWo0VnF172Rs5Z4aNnp6HyEeuVQcAI8dSQhJJzLMHjWk6TImoZuk oKrnMZifPjbbwjv6uuoKBQXOSmSiOAtZnzcUgWI9cIqJrf7o8um6hEYa640BUHLOedao RATg== Received: by 10.50.194.232 with SMTP id hz8mr2614922igc.38.1333564635385; Wed, 04 Apr 2012 11:37:15 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.164.217 with SMTP id f25csp53402iby; Wed, 4 Apr 2012 11:37:14 -0700 (PDT) Received: by 10.180.86.132 with SMTP id p4mr7698456wiz.15.1333564633200; Wed, 04 Apr 2012 11:37:13 -0700 (PDT) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx.google.com with ESMTPS id n52si1738531wed.17.2012.04.04.11.37.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Apr 2012 11:37:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of javier@dowhile0.org) client-ip=209.85.212.172; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of javier@dowhile0.org) smtp.mail=javier@dowhile0.org Received: by wibhj6 with SMTP id hj6so688870wib.13 for ; Wed, 04 Apr 2012 11:37:11 -0700 (PDT) Received: by 10.180.91.10 with SMTP id ca10mr7711191wib.17.1333564631490; Wed, 04 Apr 2012 11:37:11 -0700 (PDT) Received: from localhost.localdomain ([188.77.211.255]) by mx.google.com with ESMTPS id 17sm7060020wis.0.2012.04.04.11.37.09 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Apr 2012 11:37:10 -0700 (PDT) From: Javier Martinez Canillas To: Tony Lindgren Cc: Russell King , =?UTF-8?q?Enric=20Balletb=C3=B2=20i=20Serra?= , linux-omap@vger.kernel.org, linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linaro-dev@lists.linaro.org, patches@linaro.org, Javier Martinez Canillas Subject: [RESEND PATCH 1/2] ARM: OMAP2+: nand: Make board_onenand_init() visible to board code Date: Wed, 4 Apr 2012 20:36:25 +0200 Message-Id: <1333564586-3259-1-git-send-email-javier@dowhile0.org> X-Mailer: git-send-email 1.7.7.6 X-Gm-Message-State: ALoCoQl2uZjaCpUfOiGoluL7FyXQWkvGQcj2GpIpfR5ER83Zf9WHBV6vnL+DhEqG5e9J1FN6srtQ board_onenand_init() and board_nand_init() initialization functions are used to initialize OneNAND and NAND memories respectively. But only board_nand_init() was visible to be used from board code. This patch makes possible to initialize a OneNAND flash memory within platform code. Signed-off-by: Javier Martinez Canillas Acked-by: Enric Balletbo i Serra Tested-by: Enric Balletbo i Serra --- arch/arm/mach-omap2/board-flash.c | 4 ++-- arch/arm/mach-omap2/board-flash.h | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c index 0349fd2..70a81f9 100644 --- a/arch/arm/mach-omap2/board-flash.c +++ b/arch/arm/mach-omap2/board-flash.c @@ -87,7 +87,7 @@ static struct omap_onenand_platform_data board_onenand_data = { .dma_channel = -1, /* disable DMA in OMAP OneNAND driver */ }; -static void +void __init board_onenand_init(struct mtd_partition *onenand_parts, u8 nr_parts, u8 cs) { @@ -98,7 +98,7 @@ __init board_onenand_init(struct mtd_partition *onenand_parts, gpmc_onenand_init(&board_onenand_data); } #else -static void +void __init board_onenand_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs) { } diff --git a/arch/arm/mach-omap2/board-flash.h b/arch/arm/mach-omap2/board-flash.h index d25503a..c44b70d 100644 --- a/arch/arm/mach-omap2/board-flash.h +++ b/arch/arm/mach-omap2/board-flash.h @@ -47,3 +47,14 @@ static inline void board_nand_init(struct mtd_partition *nand_parts, { } #endif + +#if defined(CONFIG_MTD_ONENAND_OMAP2) || \ + defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) +extern void board_onenand_init(struct mtd_partition *nand_parts, + u8 nr_parts, u8 cs); +#else +static inline void board_onenand_init(struct mtd_partition *nand_parts, + u8 nr_parts, u8 cs) +{ +} +#endif