From patchwork Sat Mar 9 05:39:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Prisk X-Patchwork-Id: 2241121 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 817E3E033A for ; Sat, 9 Mar 2013 05:44:55 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UECWX-0001KO-EC; Sat, 09 Mar 2013 05:40:49 +0000 Received: from server.prisktech.co.nz ([115.188.14.127]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UECVi-0001GG-S8 for linux-arm-kernel@lists.infradead.org; Sat, 09 Mar 2013 05:40:00 +0000 Received: from localhost.localdomain (unknown [192.168.0.102]) by server.prisktech.co.nz (Postfix) with ESMTP id 81EAFFC0C16; Sat, 9 Mar 2013 18:39:43 +1300 (NZDT) From: Tony Prisk To: linus.walleij@linaro.org Subject: [PATCH 6/6] arm: vt8500: Remove pinmux configuration from mach-vt8500/vt8500.c Date: Sat, 9 Mar 2013 18:39:38 +1300 Message-Id: <1362807578-23089-7-git-send-email-linux@prisktech.co.nz> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1362807578-23089-1-git-send-email-linux@prisktech.co.nz> References: <1362807578-23089-1-git-send-email-linux@prisktech.co.nz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130309_003959_294545_500E57E2 X-CRM114-Status: GOOD ( 13.34 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.6 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: Tony Prisk , arnd@arndb.de, swarren@wwwdotorg.org, grant.likely@secretlab.ca, olof@lixom.net, vt8500-wm8505-linux-kernel@googlegroups.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org With the new pinctrl driver and wm,pinmux property the configuration code required for initializing the framebuffer hardware can be removed from vt8500.c and configured in devicetree with pinctrl driver properties. Signed-off-by: Tony Prisk --- arch/arm/mach-vt8500/vt8500.c | 70 +---------------------------------------- 1 file changed, 1 insertion(+), 69 deletions(-) diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c index 49e8005..b06b7fc 100644 --- a/arch/arm/mach-vt8500/vt8500.c +++ b/arch/arm/mach-vt8500/vt8500.c @@ -34,12 +34,8 @@ #include "common.h" -#define LEGACY_GPIO_BASE 0xD8110000 #define LEGACY_PMC_BASE 0xD8130000 -/* Registers in GPIO Controller */ -#define VT8500_GPIO_MUX_REG 0x200 - /* Registers in Power Management Controller */ #define VT8500_HCR_REG 0x12 #define VT8500_PMSR_REG 0x60 @@ -77,71 +73,6 @@ static void vt8500_power_off(void) void __init vt8500_init(void) { struct device_node *np; -#if defined(CONFIG_FB_VT8500) || defined(CONFIG_FB_WM8505) - struct device_node *fb; - void __iomem *gpio_base; -#endif - -#ifdef CONFIG_FB_VT8500 - fb = of_find_compatible_node(NULL, NULL, "via,vt8500-fb"); - if (fb) { - np = of_find_compatible_node(NULL, NULL, "via,vt8500-gpio"); - if (np) { - gpio_base = of_iomap(np, 0); - - if (!gpio_base) - pr_err("%s: of_iomap(gpio_mux) failed\n", - __func__); - - of_node_put(np); - } else { - gpio_base = ioremap(LEGACY_GPIO_BASE, 0x1000); - if (!gpio_base) - pr_err("%s: ioremap(legacy_gpio_mux) failed\n", - __func__); - } - if (gpio_base) { - writel(readl(gpio_base + VT8500_GPIO_MUX_REG) | 1, - gpio_base + VT8500_GPIO_MUX_REG); - iounmap(gpio_base); - } else - pr_err("%s: Could not remap GPIO mux\n", __func__); - - of_node_put(fb); - } -#endif - -#ifdef CONFIG_FB_WM8505 - fb = of_find_compatible_node(NULL, NULL, "wm,wm8505-fb"); - if (fb) { - np = of_find_compatible_node(NULL, NULL, "wm,wm8505-gpio"); - if (!np) - np = of_find_compatible_node(NULL, NULL, - "wm,wm8650-gpio"); - if (np) { - gpio_base = of_iomap(np, 0); - - if (!gpio_base) - pr_err("%s: of_iomap(gpio_mux) failed\n", - __func__); - - of_node_put(np); - } else { - gpio_base = ioremap(LEGACY_GPIO_BASE, 0x1000); - if (!gpio_base) - pr_err("%s: ioremap(legacy_gpio_mux) failed\n", - __func__); - } - if (gpio_base) { - writel(readl(gpio_base + VT8500_GPIO_MUX_REG) | - 0x80000000, gpio_base + VT8500_GPIO_MUX_REG); - iounmap(gpio_base); - } else - pr_err("%s: Could not remap GPIO mux\n", __func__); - - of_node_put(fb); - } -#endif np = of_find_compatible_node(NULL, NULL, "via,vt8500-pmc"); if (np) { @@ -156,6 +87,7 @@ void __init vt8500_init(void) if (!pmc_base) pr_err("%s:ioremap(power_off) failed\n", __func__); } + if (pmc_base) pm_power_off = &vt8500_power_off; else