irqchip: mmp: avoid use head file in a specific arch
Subsystems (2)
PATCH 1/2 irqchip: mmp: avoid use head file in a specific arch
For example, arm64 doesn't have mach/irq.h.
Signed-off-by Neil Zhang <[email protected]>
--- drivers/irqchip/irq-mmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-mmp.c +1 -1
@@ -22,7 +22,7 @@#include <linux/of_irq.h> #include <asm/exception.h> -#include <asm/mach/irq.h> +#include <asm/hardirq.h> #include "irqchip.h"
Signature · 1 line
1.7.9.5
PATCH 2/2 irqchip: mmp: add dt support for wakeup
Some of the Marvell SoCs use GIC as its interrupt controller, and ICU only used as wakeup logic. When AP subsystem is powered off, GIC will lose its context, the PMU will need ICU to wakeup the AP subsystem. So add wakeup entry for such kind of usage.
Signed-off-by Neil Zhang <[email protected]>
--- .../devicetree/bindings/arm/mrvl/intc.txt | 14 ++- drivers/irqchip/irq-mmp.c | 124 ++++++++++++++++++++ include/linux/irqchip/mmp.h | 14 +++ 3 files changed, 151 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/mrvl/intc.txt +13 -1
@@ -2,7 +2,7 @@ Required properties: - compatible : Should be "mrvl,mmp-intc", "mrvl,mmp2-intc" or - "mrvl,mmp2-mux-intc" + "mrvl,mmp2-mux-intc", "mrvl,mmp-intc-wakeupgen" - reg : Address and length of the register set of the interrupt controller. If the interrupt controller is intc, address and length means the range of the whold interrupt controller. If the interrupt controller is mux-intc,
@@ -15,6 +15,9 @@ Required properties: - interrupt-controller : Identifies the node as an interrupt controller. - #interrupt-cells : Specifies the number of cells needed to encode an interrupt source. +- mrvl,intc-gbl-mask : Specifies the address and value for global mask in the + interrupt controller. +- mrvl,intc-for-cp : Specifies the irqs that will be routed to cp - mrvl,intc-nr-irqs : Specifies the number of interrupts in the interrupt controller. - mrvl,clr-mfp-irq : Specifies the interrupt that needs to clear MFP edge
@@ -39,6 +42,15 @@ Example: mrvl,intc-nr-irqs = <2>; }; + intc: wakeupgen@d4282000 { + compatible = "mrvl,mmp-intc-wakeupgen"; + reg = <0xd4282000 0x1000>; + mrvl,intc-nr-irqs = <64>; + mrvl,intc-gbl-mask = <0x114 0x3 + 0x144 0x3>; + mrvl,intc-for-cp = <0 31 32>; + }; + * Marvell Orion Interrupt controller Required properties
drivers/irqchip/irq-mmp.c +124 -0
147 lines not on this page · raw message
include/linux/irqchip/mmp.h +14 -0
@@ -1,6 +1,20 @@#ifndef __IRQCHIP_MMP_H#define __IRQCHIP_MMP_H +#define ICU_CONF_CPU3 (1 << 9) +#define ICU_CONF_CPU2 (1 << 8) +#define ICU_CONF_CPU1 (1 << 7) +#define ICU_CONF_CPU0 (1 << 6) +#define ICU_CONF_AP (n) (1 << (6 + (n & 0x3))) +#define ICU_CONF_AP_MASK (0xF << 6) +#define ICU_CONF_SEAGULL (1 << 5) +#define ICU_CONF_IRQ_FIQ (1 << 4) +#define ICU_CONF_PRIO (n) (n & 0xF) + +#define ICU_IRQ_CPU0_MASKED (ICU_CONF_IRQ_FIQ | ICU_CONF_CPU0) +extern struct irq_chip icu_irq_chip; +extern void __init mmp_of_wakeup_init (void ); +#endif /* __IRQCHIP_MMP_H */
Signature · 1 line
1.7.9.5