From: linux@prisktech.co.nz (Tony Prisk)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 7/7] arm: vt8500: Remove pinmux configuration from mach-vt8500/vt8500.c
Date: Sat, 23 Mar 2013 18:13:53 +1300 [thread overview]
Message-ID: <1364015633-18580-8-git-send-email-linux@prisktech.co.nz> (raw)
In-Reply-To: <1364015633-18580-1-git-send-email-linux@prisktech.co.nz>
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 <linux@prisktech.co.nz>
---
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
--
1.7.9.5
prev parent reply other threads:[~2013-03-23 5:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-23 5:13 [PATCHv2 0/7] arm: vt8500: Add support for pinctrl/gpio module Tony Prisk
2013-03-23 5:13 ` [PATCHv2 1/7] of: Add support for reading a u32 from a multi-value property Tony Prisk
2013-04-15 10:12 ` Grant Likely
2013-03-23 5:13 ` [PATCHv2 2/7] arm: vt8500: Increase available GPIOs on arch-vt8500 Tony Prisk
2013-03-23 10:44 ` Russell King - ARM Linux
2013-03-23 18:04 ` Tony Prisk
2013-03-23 5:13 ` [PATCHv2 3/7] pinctrl: gpio: vt8500: Add pincontrol driver for arch-vt8500 Tony Prisk
2013-03-25 17:05 ` Stephen Warren
2013-03-25 18:51 ` Tony Prisk
2013-03-26 20:28 ` Stephen Warren
2013-03-27 4:59 ` Tony Prisk
2013-03-27 16:47 ` Stephen Warren
2013-03-27 9:23 ` Tony Prisk
2013-03-27 15:53 ` Stephen Warren
2013-03-28 5:03 ` Tony Prisk
2013-03-23 5:13 ` [PATCHv2 4/7] arm: dts: vt8500: Update Wondermedia SoC dtsi files for pinctrl driver Tony Prisk
2013-03-23 5:13 ` [PATCHv2 5/7] arm: vt8500: Remove gpio devicetree nodes Tony Prisk
2013-03-23 5:13 ` [PATCHv2 6/7] gpio: vt8500: Remove arch-vt8500 gpio driver Tony Prisk
2013-03-23 5:13 ` Tony Prisk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1364015633-18580-8-git-send-email-linux@prisktech.co.nz \
--to=linux@prisktech.co.nz \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).