From patchwork Sat Mar 23 05:13:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Prisk X-Patchwork-Id: 2324231 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 59ADC3FC8A for ; Sat, 23 Mar 2013 05:22:54 +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 1UJGn8-00053w-9y; Sat, 23 Mar 2013 05:14:54 +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 1UJGmB-0004vj-7f for linux-arm-kernel@lists.infradead.org; Sat, 23 Mar 2013 05:13:56 +0000 Received: from localhost.localdomain (unknown [192.168.0.102]) by server.prisktech.co.nz (Postfix) with ESMTP id 2588FFC0C63; Sat, 23 Mar 2013 18:13:57 +1300 (NZDT) From: Tony Prisk To: Linus Walleij Subject: [PATCHv2 7/7] arm: vt8500: Remove pinmux configuration from mach-vt8500/vt8500.c Date: Sat, 23 Mar 2013 18:13:53 +1300 Message-Id: <1364015633-18580-8-git-send-email-linux@prisktech.co.nz> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1364015633-18580-1-git-send-email-linux@prisktech.co.nz> References: <1364015633-18580-1-git-send-email-linux@prisktech.co.nz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130323_011355_647678_245D85E6 X-CRM114-Status: GOOD ( 13.27 ) X-Spam-Score: -4.4 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.5 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, rob.herring@calxeda.com, 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