From patchwork Sat Dec 14 05:51:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 3345961 Return-Path: X-Original-To: patchwork-ltsi-dev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DF50CC0D4A for ; Sat, 14 Dec 2013 06:23:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2476420783 for ; Sat, 14 Dec 2013 06:23:54 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) by mail.kernel.org (Postfix) with ESMTP id 51C1020781 for ; Sat, 14 Dec 2013 06:23:53 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [IPv6:::1]) by mail.linuxfoundation.org (Postfix) with ESMTP id E83E9AF3; Sat, 14 Dec 2013 06:23:11 +0000 (UTC) X-Original-To: ltsi-dev@lists.linuxfoundation.org Delivered-To: ltsi-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTP id 95FC99AD for ; Sat, 14 Dec 2013 06:23:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from kirsty.vergenet.net (kirsty.vergenet.net [202.4.237.240]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id E29BB1F889 for ; Sat, 14 Dec 2013 06:23:06 +0000 (UTC) Received: from penelope.isobedori.kobe.vergenet.net (g1-27-253-251-111.bmobile.ne.jp [27.253.251.111]) by kirsty.vergenet.net (Postfix) with ESMTP id 5744F2671DE; Sat, 14 Dec 2013 16:58:34 +1100 (EST) Received: by penelope.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id C4A247C0390; Sat, 14 Dec 2013 14:53:56 +0900 (JST) From: Simon Horman To: ltsi-dev@lists.linuxfoundation.org Date: Sat, 14 Dec 2013 14:51:57 +0900 Message-Id: <1387000406-29111-149-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1387000406-29111-1-git-send-email-horms+renesas@verge.net.au> References: <1387000406-29111-1-git-send-email-horms+renesas@verge.net.au> X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org Cc: Magnus Damm Subject: [LTSI-dev] [PATCH 148/237] ARM: shmobile: bockw: enable global use of FPGA X-BeenThere: ltsi-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "A list to discuss patches, development, and other things related to the LTSI project" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ltsi-dev-bounces@lists.linuxfoundation.org Errors-To: ltsi-dev-bounces@lists.linuxfoundation.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto This patch enables global use of FPGA, since it will be used from many devices. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman (cherry picked from commit 71d7472f63385f4f6fb7c8548450b2e4665dc542) Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index f2bf61b..97e1f5e 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -38,6 +38,10 @@ #include #include +#define FPGA 0x18200000 +#define IRQ0MR 0x30 +static void __iomem *fpga; + /* * CN9(Upper side) SCIF/RCAN selection * @@ -250,8 +254,6 @@ static const struct pinctrl_map bockw_pinctrl_map[] = { "vin1_data8", "vin1"), }; -#define FPGA 0x18200000 -#define IRQ0MR 0x30 #define PFC 0xfffc0000 #define PUPR4 0x110 static void __init bockw_init(void) @@ -301,8 +303,8 @@ static void __init bockw_init(void) /* for SMSC */ - base = ioremap_nocache(FPGA, SZ_1M); - if (base) { + fpga = ioremap_nocache(FPGA, SZ_1M); + if (fpga) { /* * CAUTION * @@ -310,10 +312,9 @@ static void __init bockw_init(void) * it should be cared in the future * Now, it is assuming IRQ0 was used only from SMSC. */ - u16 val = ioread16(base + IRQ0MR); + u16 val = ioread16(fpga + IRQ0MR); val &= ~(1 << 4); /* enable SMSC911x */ - iowrite16(val, base + IRQ0MR); - iounmap(base); + iowrite16(val, fpga + IRQ0MR); regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));