diff options
author | Tony Lindgren <tony@atomide.com> | 2013-10-10 18:45:13 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-10-10 18:46:30 -0400 |
commit | 30a69ef785e87c791aab0b4dae76709a7baa3e85 (patch) | |
tree | d6c186411c9f61bf50d304a73a6a2d780f665cd1 /arch/arm | |
parent | 8651bd8ce36fb324c218167c970d6734dc825f2c (diff) |
ARM: OMAP: Move DT wake-up event handling over to use pinctrl-single-omap
Now pinctrl-single-omap can handle the wake-up events for us now
as long as the events are configured in the .dts files.
Done in collaboration with Roger Quadros <rogerq@ti.com>.
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Prakash Manjunathappa <prakash.pm@ti.com>
Cc: Roger Quadros <rogerq@ti.com>
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boot/dts/omap3.dtsi | 4 | ||||
-rw-r--r-- | arch/arm/boot/dts/omap4.dtsi | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pdata-quirks.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prm3xxx.h | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prm44xx_54xx.h | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prm_common.c | 11 |
7 files changed, 57 insertions, 4 deletions
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 7d95cda1fae4..695e2d34c9c6 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi | |||
@@ -107,6 +107,8 @@ | |||
107 | reg = <0x48002030 0x05cc>; | 107 | reg = <0x48002030 0x05cc>; |
108 | #address-cells = <1>; | 108 | #address-cells = <1>; |
109 | #size-cells = <0>; | 109 | #size-cells = <0>; |
110 | #interrupt-cells = <1>; | ||
111 | interrupt-controller; | ||
110 | pinctrl-single,register-width = <16>; | 112 | pinctrl-single,register-width = <16>; |
111 | pinctrl-single,function-mask = <0x7f1f>; | 113 | pinctrl-single,function-mask = <0x7f1f>; |
112 | }; | 114 | }; |
@@ -116,6 +118,8 @@ | |||
116 | reg = <0x48002a00 0x5c>; | 118 | reg = <0x48002a00 0x5c>; |
117 | #address-cells = <1>; | 119 | #address-cells = <1>; |
118 | #size-cells = <0>; | 120 | #size-cells = <0>; |
121 | #interrupt-cells = <1>; | ||
122 | interrupt-controller; | ||
119 | pinctrl-single,register-width = <16>; | 123 | pinctrl-single,register-width = <16>; |
120 | pinctrl-single,function-mask = <0x7f1f>; | 124 | pinctrl-single,function-mask = <0x7f1f>; |
121 | }; | 125 | }; |
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index 22d9f2b593d4..0415d5ed6014 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi | |||
@@ -114,6 +114,8 @@ | |||
114 | reg = <0x4a100040 0x0196>; | 114 | reg = <0x4a100040 0x0196>; |
115 | #address-cells = <1>; | 115 | #address-cells = <1>; |
116 | #size-cells = <0>; | 116 | #size-cells = <0>; |
117 | #interrupt-cells = <1>; | ||
118 | interrupt-controller; | ||
117 | pinctrl-single,register-width = <16>; | 119 | pinctrl-single,register-width = <16>; |
118 | pinctrl-single,function-mask = <0x7fff>; | 120 | pinctrl-single,function-mask = <0x7fff>; |
119 | }; | 121 | }; |
@@ -122,6 +124,8 @@ | |||
122 | reg = <0x4a31e040 0x0038>; | 124 | reg = <0x4a31e040 0x0038>; |
123 | #address-cells = <1>; | 125 | #address-cells = <1>; |
124 | #size-cells = <0>; | 126 | #size-cells = <0>; |
127 | #interrupt-cells = <1>; | ||
128 | interrupt-controller; | ||
125 | pinctrl-single,register-width = <16>; | 129 | pinctrl-single,register-width = <16>; |
126 | pinctrl-single,function-mask = <0x7fff>; | 130 | pinctrl-single,function-mask = <0x7fff>; |
127 | }; | 131 | }; |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index f82cf878d6af..48094b58c88f 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -811,6 +811,12 @@ int __init omap_mux_late_init(void) | |||
811 | } | 811 | } |
812 | } | 812 | } |
813 | 813 | ||
814 | omap_mux_dbg_init(); | ||
815 | |||
816 | /* see pinctrl-single-omap for the wake-up interrupt handling */ | ||
817 | if (of_have_populated_dt()) | ||
818 | return 0; | ||
819 | |||
814 | ret = request_irq(omap_prcm_event_to_irq("io"), | 820 | ret = request_irq(omap_prcm_event_to_irq("io"), |
815 | omap_hwmod_mux_handle_irq, IRQF_SHARED | IRQF_NO_SUSPEND, | 821 | omap_hwmod_mux_handle_irq, IRQF_SHARED | IRQF_NO_SUSPEND, |
816 | "hwmod_io", omap_mux_late_init); | 822 | "hwmod_io", omap_mux_late_init); |
@@ -818,8 +824,6 @@ int __init omap_mux_late_init(void) | |||
818 | if (ret) | 824 | if (ret) |
819 | pr_warning("mux: Failed to setup hwmod io irq %d\n", ret); | 825 | pr_warning("mux: Failed to setup hwmod io irq %d\n", ret); |
820 | 826 | ||
821 | omap_mux_dbg_init(); | ||
822 | |||
823 | return 0; | 827 | return 0; |
824 | } | 828 | } |
825 | 829 | ||
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 76abc5b63d6d..18afbde020f7 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/of_platform.h> | 14 | #include <linux/of_platform.h> |
15 | #include <linux/wl12xx.h> | 15 | #include <linux/wl12xx.h> |
16 | 16 | ||
17 | #include <linux/platform_data/pinctrl-single.h> | ||
18 | |||
17 | #include "common.h" | 19 | #include "common.h" |
18 | #include "common-board-devices.h" | 20 | #include "common-board-devices.h" |
19 | #include "dss-common.h" | 21 | #include "dss-common.h" |
@@ -105,7 +107,23 @@ static void __init omap5_uevm_legacy_init(void) | |||
105 | } | 107 | } |
106 | #endif | 108 | #endif |
107 | 109 | ||
110 | static struct pcs_pdata pcs_pdata; | ||
111 | |||
112 | void omap_pcs_legacy_init(int irq, void (*rearm)(void)) | ||
113 | { | ||
114 | pcs_pdata.irq = irq; | ||
115 | pcs_pdata.rearm = rearm; | ||
116 | } | ||
117 | |||
108 | struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { | 118 | struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { |
119 | #ifdef CONFIG_ARCH_OMAP3 | ||
120 | OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata), | ||
121 | OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata), | ||
122 | #endif | ||
123 | #ifdef CONFIG_ARCH_OMAP4 | ||
124 | OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a100040, "4a100040.pinmux", &pcs_pdata), | ||
125 | OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a31e040, "4a31e040.pinmux", &pcs_pdata), | ||
126 | #endif | ||
109 | { /* sentinel */ }, | 127 | { /* sentinel */ }, |
110 | }; | 128 | }; |
111 | 129 | ||
diff --git a/arch/arm/mach-omap2/prm3xxx.h b/arch/arm/mach-omap2/prm3xxx.h index 277f71794e61..f8eb83323b1a 100644 --- a/arch/arm/mach-omap2/prm3xxx.h +++ b/arch/arm/mach-omap2/prm3xxx.h | |||
@@ -144,7 +144,13 @@ extern u32 omap3_prm_vcvp_read(u8 offset); | |||
144 | extern void omap3_prm_vcvp_write(u32 val, u8 offset); | 144 | extern void omap3_prm_vcvp_write(u32 val, u8 offset); |
145 | extern u32 omap3_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset); | 145 | extern u32 omap3_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset); |
146 | 146 | ||
147 | extern void omap3xxx_prm_reconfigure_io_chain(void); | 147 | #ifdef CONFIG_ARCH_OMAP3 |
148 | void omap3xxx_prm_reconfigure_io_chain(void); | ||
149 | #else | ||
150 | static inline void omap3xxx_prm_reconfigure_io_chain(void) | ||
151 | { | ||
152 | } | ||
153 | #endif | ||
148 | 154 | ||
149 | /* PRM interrupt-related functions */ | 155 | /* PRM interrupt-related functions */ |
150 | extern void omap3xxx_prm_read_pending_irqs(unsigned long *events); | 156 | extern void omap3xxx_prm_read_pending_irqs(unsigned long *events); |
diff --git a/arch/arm/mach-omap2/prm44xx_54xx.h b/arch/arm/mach-omap2/prm44xx_54xx.h index 7cd22abb8f15..a085d9cc1f5d 100644 --- a/arch/arm/mach-omap2/prm44xx_54xx.h +++ b/arch/arm/mach-omap2/prm44xx_54xx.h | |||
@@ -42,7 +42,13 @@ extern u32 omap4_prm_vcvp_read(u8 offset); | |||
42 | extern void omap4_prm_vcvp_write(u32 val, u8 offset); | 42 | extern void omap4_prm_vcvp_write(u32 val, u8 offset); |
43 | extern u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset); | 43 | extern u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset); |
44 | 44 | ||
45 | extern void omap44xx_prm_reconfigure_io_chain(void); | 45 | #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) |
46 | void omap44xx_prm_reconfigure_io_chain(void); | ||
47 | #else | ||
48 | static inline void omap44xx_prm_reconfigure_io_chain(void) | ||
49 | { | ||
50 | } | ||
51 | #endif | ||
46 | 52 | ||
47 | /* PRM interrupt-related functions */ | 53 | /* PRM interrupt-related functions */ |
48 | extern void omap44xx_prm_read_pending_irqs(unsigned long *events); | 54 | extern void omap44xx_prm_read_pending_irqs(unsigned long *events); |
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c index 228b850e632f..a2e1174ad1b6 100644 --- a/arch/arm/mach-omap2/prm_common.c +++ b/arch/arm/mach-omap2/prm_common.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | 26 | ||
27 | #include "soc.h" | ||
27 | #include "prm2xxx_3xxx.h" | 28 | #include "prm2xxx_3xxx.h" |
28 | #include "prm2xxx.h" | 29 | #include "prm2xxx.h" |
29 | #include "prm3xxx.h" | 30 | #include "prm3xxx.h" |
@@ -322,6 +323,16 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup) | |||
322 | prcm_irq_chips[i] = gc; | 323 | prcm_irq_chips[i] = gc; |
323 | } | 324 | } |
324 | 325 | ||
326 | if (of_have_populated_dt()) { | ||
327 | int irq = omap_prcm_event_to_irq("io"); | ||
328 | if (cpu_is_omap34xx()) | ||
329 | omap_pcs_legacy_init(irq, | ||
330 | omap3xxx_prm_reconfigure_io_chain); | ||
331 | else | ||
332 | omap_pcs_legacy_init(irq, | ||
333 | omap44xx_prm_reconfigure_io_chain); | ||
334 | } | ||
335 | |||
325 | return 0; | 336 | return 0; |
326 | 337 | ||
327 | err: | 338 | err: |