aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-nomadik/cpu-8815.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-08-09 18:43:40 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-09-03 07:21:37 -0400
commit2601ccfeac08ae5e9165ef3942e6d45611de6fd1 (patch)
tree092323e611d993e8d9b7eeb7d9669e2da769d011 /arch/arm/mach-nomadik/cpu-8815.c
parentf79c5ed9dab3ae80f6cbe9edaafbc8a4dadb8408 (diff)
ARM: nomadik: configure Nomadik for pin control
This converts the Nomadik to using pin control using the driver for the STN8815 ASIC. Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-nomadik/cpu-8815.c')
-rw-r--r--arch/arm/mach-nomadik/cpu-8815.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 6fd8e46567a4..b617eaed0ce5 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -83,6 +83,18 @@ void cpu8815_add_gpios(resource_size_t *base, int num, int irq,
83 } 83 }
84} 84}
85 85
86static inline void
87cpu8815_add_pinctrl(struct device *parent, const char *name)
88{
89 struct platform_device_info pdevinfo = {
90 .parent = parent,
91 .name = name,
92 .id = -1,
93 };
94
95 platform_device_register_full(&pdevinfo);
96}
97
86static int __init cpu8815_init(void) 98static int __init cpu8815_init(void)
87{ 99{
88 struct nmk_gpio_platform_data pdata = { 100 struct nmk_gpio_platform_data pdata = {
@@ -91,6 +103,7 @@ static int __init cpu8815_init(void)
91 103
92 cpu8815_add_gpios(cpu8815_gpio_base, ARRAY_SIZE(cpu8815_gpio_base), 104 cpu8815_add_gpios(cpu8815_gpio_base, ARRAY_SIZE(cpu8815_gpio_base),
93 IRQ_GPIO0, &pdata); 105 IRQ_GPIO0, &pdata);
106 cpu8815_add_pinctrl(NULL, "pinctrl-stn8815");
94 amba_apb_device_add(NULL, "rng", NOMADIK_RNG_BASE, SZ_4K, 0, 0, NULL, 0); 107 amba_apb_device_add(NULL, "rng", NOMADIK_RNG_BASE, SZ_4K, 0, 0, NULL, 0);
95 amba_apb_device_add(NULL, "rtc-pl031", NOMADIK_RTC_BASE, SZ_4K, IRQ_RTC_RTT, 0, NULL, 0); 108 amba_apb_device_add(NULL, "rtc-pl031", NOMADIK_RTC_BASE, SZ_4K, IRQ_RTC_RTT, 0, NULL, 0);
96 return 0; 109 return 0;