irqchip: New driver for ST's SysCfg controlled IRQs
Subsystems (5)
v2 cover irqchip: New driver for ST's SysCfg controlled IRQs
This driver enables IRQs which are controlled using System Configuration registers. Without it Performance Monitoring, Core Sight Tracing and some L2 Caches will fail to function.
v1 => v2:
- Fixed up Jason's review comments
Lee Jones (8):
dt: bindings: Supply shared ST IRQ defines
irqchip: Supply new driver for STi based devices
irqchip: irq-st: Add documentation for STi based syscfg IRQs
ARM: STi: STiH416: Enable Cortex-A9 PMU support
ARM: STi: STiH416: Enable PMU IRQs
ARM: STi: STiH407: Enable Cortex-A9 PMU support
ARM: STi: STiH407: Enable PMU IRQs
ARM: STI: Ensure requested STi's SysCfg Controlled IRQs are enabled at
boot
.../interrupt-controller/st,sti-irq-syscfg.txt | 35 ++++ arch/arm/boot/dts/stih407.dtsi | 16 ++ arch/arm/boot/dts/stih416.dtsi | 16 ++ arch/arm/mach-sti/Kconfig | 1 + drivers/irqchip/Kconfig | 7 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-st.c | 208 +++++++++++++++++++++ include/dt-bindings/interrupt-controller/irq-st.h | 30 +++ 8 files changed, 314 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt create mode 100644 drivers/irqchip/irq-st.c create mode 100644 include/dt-bindings/interrupt-controller/irq-st.h
Signature · 1 line
1.9.1
PATCH v2 1/8 dt: bindings: Supply shared ST IRQ defines
These defines are used to allow values used for configuration to be easily human readable and will lessen the chance of logical mistakes.
--- include/dt-bindings/interrupt-controller/irq-st.h | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 include/dt-bindings/interrupt-controller/irq-st.h
include/dt-bindings/interrupt-controller/irq-st.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* include/linux/irqchip/irq-st.h +* +* Copyright (C) 2014 STMicroelectronics ? All Rights Reserved +* +* Author: Lee Jones <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef _DT_BINDINGS_INTERRUPT_CONTROLLER_ST_H +#define _DT_BINDINGS_INTERRUPT_CONTROLLER_ST_H + +#define ST_IRQ_SYSCFG_EXT_0 0 +#define ST_IRQ_SYSCFG_EXT_1 1 +#define ST_IRQ_SYSCFG_EXT_2 2 +#define ST_IRQ_SYSCFG_CTI_0 3 +#define ST_IRQ_SYSCFG_CTI_1 4 +#define ST_IRQ_SYSCFG_PMU_0 5 +#define ST_IRQ_SYSCFG_PMU_1 6 +#define ST_IRQ_SYSCFG_pl310_L2 7 +#define ST_IRQ_SYSCFG_DISABLED 0xFFFFFFFF + +#define ST_IRQ_SYSCFG_EXT_1_INV 0x1 +#define ST_IRQ_SYSCFG_EXT_2_INV 0x2 +#define ST_IRQ_SYSCFG_EXT_3_INV 0x4 + +#endif
Signature · 1 line
1.9.1
PATCH v2 2/8 irqchip: Supply new driver for STi based devices
In reply to Lee JonesThis driver is used to enable System Configuration Register controlled External, CTI (Core Sight), PMU (Performance Management), and PL310 L2 Cache IRQs prior to use.
--- drivers/irqchip/Kconfig | 7 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-st.c | 208 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 216 insertions(+) create mode 100644 drivers/irqchip/irq-st.c
drivers/irqchip/Kconfig +7 -0
@@ -93,6 +93,13 @@ config RENESAS_IRQC bool select IRQ_DOMAIN +config ST_IRQCHIP + bool + select REGMAP + select MFD_SYSCON + help + Enables SysCfg Controlled IRQs on STi based platforms. + config TB10X_IRQC bool select IRQ_DOMAIN
drivers/irqchip/Makefile +1 -0
@@ -31,6 +31,7 @@ obj-$(CONFIG_RENESAS_IRQC) += irq-renesas-irqc.o obj-$(CONFIG_VERSATILE_FPGA_IRQ) += irq-versatile-fpga.o obj-$(CONFIG_ARCH_NSPIRE) += irq-zevio.o obj-$(CONFIG_ARCH_VT8500) += irq-vt8500.o +obj-$(CONFIG_ST_IRQCHIP) += irq-st.o obj-$(CONFIG_TB10X_IRQC) += irq-tb10x.o obj-$(CONFIG_XTENSA) += irq-xtensa-pic.o obj-$(CONFIG_XTENSA_MX) += irq-xtensa-mx.o
drivers/irqchip/irq-st.c new file +208 -0
208 lines not on this page · raw message
Signature · 1 line
1.9.1
Re: [PATCH v2 2/8] irqchip: Supply new driver for STi based devices
Quoted 5 lines · On Tuesday 25 November 2014 16:24:59 Lee Jones wrote:
drivers/irqchip/Kconfig +0
-0
drivers/irqchip/Kconfig config RENESAS_IRQC · line 102
Quoted 10 lines
drivers/irqchip/Kconfig +7
-0@@ -93,6 +93,13 @@ config RENESAS_IRQC bool select IRQ_DOMAIN +config ST_IRQCHIP + bool + select REGMAP + select MFD_SYSCON + help + Enables SysCfg Controlled IRQs on STi based platforms. +
I'm confused by the purpose of this code. It's apparently a driver in drivers/irqchip, the Kconfig symbol contains the string IRQCHIP, yet it doesn't actually register an irq_chip.
Also, the name is a bit too generic, ST has lots of different irqchips, and this apparently isn't even one of them ;-)
Arnd
Re: [PATCH v2 2/8] irqchip: Supply new driver for STi based devices
Quoted 22 lines · Arnd Bergmann
Quoted 5 lines · On Tuesday 25 November 2014 16:24:59 Lee Jones wrote:
drivers/irqchip/Kconfig +0
-0drivers/irqchip/Kconfig config RENESAS_IRQC · line 102
Quoted 10 lines
drivers/irqchip/Kconfig +7
-0@@ -93,6 +93,13 @@ config RENESAS_IRQC bool select IRQ_DOMAIN +config ST_IRQCHIP + bool + select REGMAP + select MFD_SYSCON + help + Enables SysCfg Controlled IRQs on STi based platforms. +I'm confused by the purpose of this code. It's apparently a driver in
drivers/irqchip, theKconfigsymbol contains the string IRQCHIP, yet it doesn't actually register anirq_chip.
Quoted 2 lines
Also, the name is a bit too generic, ST has lots of different irqchips, and this apparently isn't even one of them ;-)
Hmm... now you're going to ask me to remember who I had the conversation with that alluded to this as the best location for this driver. Unfortunately, I cannot. Can you think of a better place to put it then?
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v2 2/8] irqchip: Supply new driver for STi based devices
Quoted 24 lines · On Thursday 27 November 2014 09:02:55 Lee Jones wrote:
Quoted 22 lines · Arnd Bergmann
Quoted 5 lines · On Tuesday 25 November 2014 16:24:59 Lee Jones wrote:
drivers/irqchip/Kconfig +0
-0drivers/irqchip/Kconfig config RENESAS_IRQC · line 102
Quoted 10 lines
drivers/irqchip/Kconfig +7
-0@@ -93,6 +93,13 @@ config RENESAS_IRQC bool select IRQ_DOMAIN +config ST_IRQCHIP + bool + select REGMAP + select MFD_SYSCON + help + Enables SysCfg Controlled IRQs on STi based platforms. +I'm confused by the purpose of this code. It's apparently a driver in
drivers/irqchip, theKconfigsymbol contains the string IRQCHIP, yet it doesn't actually register anirq_chip.
Quoted 7 lines
Quoted 2 lines
Also, the name is a bit too generic, ST has lots of different irqchips, and this apparently isn't even one of them
Hmm... now you're going to ask me to remember who I had the conversation with that alluded to this as the best location for this driver. Unfortunately, I cannot. Can you think of a better place to put it then?
I suspect it's in the right place but should actually be an irqchip driver. I'm having trouble understanding what this code actually does, can you you explain the functionality in more detail so we can figure out what to do with it?
Arnd
Re: [PATCH v2 2/8] irqchip: Supply new driver for STi based devices
Quoted 33 lines · Arnd Bergmann
Quoted 24 lines · On Thursday 27 November 2014 09:02:55 Lee Jones wrote:
Quoted 22 lines · Arnd Bergmann
Quoted 5 lines · On Tuesday 25 November 2014 16:24:59 Lee Jones wrote:
drivers/irqchip/Kconfig +0
-0drivers/irqchip/Kconfig config RENESAS_IRQC · line 102
Quoted 10 lines
drivers/irqchip/Kconfig +7
-0@@ -93,6 +93,13 @@ config RENESAS_IRQC bool select IRQ_DOMAIN +config ST_IRQCHIP + bool + select REGMAP + select MFD_SYSCON + help + Enables SysCfg Controlled IRQs on STi based platforms. +I'm confused by the purpose of this code. It's apparently a driver in
drivers/irqchip, theKconfigsymbol contains the string IRQCHIP, yet it doesn't actually register anirq_chip.Quoted 7 lines
Quoted 2 lines
Also, the name is a bit too generic, ST has lots of different irqchips, and this apparently isn't even one of them
Hmm... now you're going to ask me to remember who I had the conversation with that alluded to this as the best location for this driver. Unfortunately, I cannot. Can you think of a better place to put it then?
Quoted 4 lines
I suspect it's in the right place but should actually be an irqchip driver. I'm having trouble understanding what this code actually does, can you you explain the functionality in more detail so we can figure out what to do with it?
In the simplest terms it's an IRQ unmasker. A9 Core IRQs are disabled on boot; PMU, CTI (CoreSight), PL310_L2 and EXT. In order for you to make use of them they need to be unmasked in SYSCFG.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v2 2/8] irqchip: Supply new driver for STi based devices
Quoted 34 lines · On Thursday 27 November 2014 09:29:01 Lee Jones wrote:
Quoted 33 lines · Arnd Bergmann
Quoted 31 lines · On Thursday 27 November 2014 09:02:55 Lee Jones wrote:
Quoted 22 lines · Arnd Bergmann
Quoted 5 lines · On Tuesday 25 November 2014 16:24:59 Lee Jones wrote:
drivers/irqchip/Kconfig +0
-0drivers/irqchip/Kconfig config RENESAS_IRQC · line 102
Quoted 10 lines
drivers/irqchip/Kconfig +7
-0@@ -93,6 +93,13 @@ config RENESAS_IRQC bool select IRQ_DOMAIN +config ST_IRQCHIP + bool + select REGMAP + select MFD_SYSCON + help + Enables SysCfg Controlled IRQs on STi based platforms. +I'm confused by the purpose of this code. It's apparently a driver in
drivers/irqchip, theKconfigsymbol contains the string IRQCHIP, yet it doesn't actually register anirq_chip.Quoted 2 lines
Also, the name is a bit too generic, ST has lots of different irqchips, and this apparently isn't even one of them
Hmm... now you're going to ask me to remember who I had the conversation with that alluded to this as the best location for this driver. Unfortunately, I cannot. Can you think of a better place to put it then?
Quoted 8 lines
Quoted 4 lines
I suspect it's in the right place but should actually be an irqchip driver. I'm having trouble understanding what this code actually does, can you you explain the functionality in more detail so we can figure out what to do with it?
In the simplest terms it's an IRQ unmasker. A9 Core IRQs are disabled on boot; PMU, CTI (CoreSight),
PL310_L2and EXT. In order for you to make use of them they need to be unmasked in SYSCFG.
So you just apply static configuration once, or are there reasons why you would mask the interrupts again later?
If it's all static, why doesn't the boot loader unmask all interrupts before starting the kernel?
Arnd
Re: [PATCH v2 2/8] irqchip: Supply new driver for STi based devices
Quoted 44 lines · Arnd Bergmann
Quoted 34 lines · On Thursday 27 November 2014 09:29:01 Lee Jones wrote:
Quoted 33 lines · Arnd Bergmann
Quoted 31 lines · On Thursday 27 November 2014 09:02:55 Lee Jones wrote:
Quoted 22 lines · Arnd Bergmann
Quoted 5 lines · On Tuesday 25 November 2014 16:24:59 Lee Jones wrote:
drivers/irqchip/Kconfig +0
-0drivers/irqchip/Kconfig config RENESAS_IRQC · line 102
Quoted 10 lines
drivers/irqchip/Kconfig +7
-0@@ -93,6 +93,13 @@ config RENESAS_IRQC bool select IRQ_DOMAIN +config ST_IRQCHIP + bool + select REGMAP + select MFD_SYSCON + help + Enables SysCfg Controlled IRQs on STi based platforms. +I'm confused by the purpose of this code. It's apparently a driver in
drivers/irqchip, theKconfigsymbol contains the string IRQCHIP, yet it doesn't actually register anirq_chip.Quoted 2 lines
Also, the name is a bit too generic, ST has lots of different irqchips, and this apparently isn't even one of them
Hmm... now you're going to ask me to remember who I had the conversation with that alluded to this as the best location for this driver. Unfortunately, I cannot. Can you think of a better place to put it then?
Quoted 8 lines
Quoted 4 lines
I suspect it's in the right place but should actually be an irqchip driver. I'm having trouble understanding what this code actually does, can you you explain the functionality in more detail so we can figure out what to do with it?
In the simplest terms it's an IRQ unmasker. A9 Core IRQs are disabled on boot; PMU, CTI (CoreSight),
PL310_L2and EXT. In order for you to make use of them they need to be unmasked in SYSCFG.
Quoted 5 lines
So you just apply static configuration once, or are there reasons why you would mask the interrupts again later?
If it's all static, why doesn't the boot loader unmask all interrupts before starting the kernel?
We'd like to configure them at boot-time, via DT.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v2 3/8 irqchip: irq-st: Add documentation for STi based syscfg IRQs
In reply to Lee Jones--- .../interrupt-controller/st,sti-irq-syscfg.txt | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt
Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt new file +35 -0
@@ -0,0 +1,35 @@ +STMicroelectronics STi System Configuration Controlled IRQs +----------------------------------------------------------- + +On STi based systems; External, CTI (Core Sight), PMU (Performance Management), +and PL310 L2 Cache IRQs are controlled using System Configuration registers. +This driver is used to unmask them prior to use. + +Required properties: +- compatible : Should be set to one of: + "st,stih415-irq-syscfg" + "st,stih416-irq-syscfg" + "st,stih407-irq-syscfg" + "st,stid127-irq-syscfg" +- st,syscfg : Phandle to Cortex-A9 IRQ system config registers +- st,irq-device : Array of IRQs to enable - should be 2 in length +- st,fiq-device : Array of FIQs to enable - should be 2 in length + +Optional properties: +- st,invert-ext : External IRQs can be inverted at will. This property inverts + these IRQs using bitwise logic. A number of defines have been + provided for convenience: + ST_IRQ_SYSCFG_EXT_1_INV + ST_IRQ_SYSCFG_EXT_2_INV + ST_IRQ_SYSCFG_EXT_3_INV +Example: + +irq-syscfg { + compatible = "st,stih416-irq-syscfg"; + st,syscfg = <&syscfg_cpu>; + st,irq-device = <ST_IRQ_SYSCFG_PMU_0>, + <ST_IRQ_SYSCFG_PMU_1>; + st,fiq-device = <ST_IRQ_SYSCFG_DISABLED>, + <ST_IRQ_SYSCFG_DISABLED>; + st,invert-ext = <(ST_IRQ_SYSCFG_EXT_1_INV | ST_IRQ_SYSCFG_EXT_3_INV)>; +};
Signature · 1 line
1.9.1
PATCH v2 4/8 ARM: STi: STiH416: Enable Cortex-A9 PMU support
In reply to Lee JonesThis is ARM's generic Performance Monitoring Unit.
--- arch/arm/boot/dts/stih416.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/stih416.dtsi +6 -0
@@ -21,6 +21,12 @@ cache-level = <2>; }; + arm-pmu { + compatible = "arm,cortex-a9-pmu"; + interrupt-parent = <&intc>; + interrupts = <GIC_PPI 15 IRQ_TYPE_LEVEL_HIGH>; + }; + soc { #address-cells = <1>; #size-cells = <1>;
Signature · 1 line
1.9.1
PATCH v2 5/8 ARM: STi: STiH416: Enable PMU IRQs
In reply to Lee JonesThis driver is used to enable System Configuration Register controlled External, CTI (Core Sight), PMU (Performance Management), and PL310 L2 Cache IRQs prior to use.
Here we are enabling PMU IRQs on both channels.
--- arch/arm/boot/dts/stih416.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/stih416.dtsi +10 -0
@@ -11,6 +11,7 @@ #include "stih416-pinctrl.dtsi" #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/reset-controller/stih416-resets.h> +#include <dt-bindings/interrupt-controller/irq-st.h> / { L2: cache-controller { compatible = "arm,pl310-cache";
@@ -90,6 +91,15 @@ reg = <0xfe4b5100 0x8>; }; + irq-syscfg { + compatible = "st,stih416-irq-syscfg"; + st,syscfg = <&syscfg_cpu>; + st,irq-device = <ST_IRQ_SYSCFG_PMU_0>, + <ST_IRQ_SYSCFG_PMU_1>; + st,fiq-device = <ST_IRQ_SYSCFG_DISABLED>, + <ST_IRQ_SYSCFG_DISABLED>; + }; + serial2: serial at fed32000{ compatible = "st,asc"; status = "disabled";
Signature · 1 line
1.9.1
PATCH v2 6/8 ARM: STi: STiH407: Enable Cortex-A9 PMU support
In reply to Lee JonesThis is ARM's generic Performance Monitoring Unit.
--- arch/arm/boot/dts/stih407.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/stih407.dtsi +6 -0
@@ -56,6 +56,12 @@ cache-level = <2>; }; + arm-pmu { + interrupt-parent = <&intc>; + compatible = "arm,cortex-a9-pmu"; + interrupts = <GIC_PPI 15 IRQ_TYPE_LEVEL_HIGH>; + }; + soc { #address-cells = <1>; #size-cells = <1>;
Signature · 1 line
1.9.1
PATCH v2 7/8 ARM: STi: STiH407: Enable PMU IRQs
In reply to Lee JonesThis driver is used to enable System Configuration Register controlled External, CTI (Core Sight), PMU (Performance Management), and PL310 L2 Cache IRQs prior to use.
Here we are enabling PMU IRQs on both channels.
--- arch/arm/boot/dts/stih407.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/stih407.dtsi +10 -0
@@ -8,6 +8,7 @@ */ #include "stih407-clock.dtsi" #include "stih407-pinctrl.dtsi" +#include <dt-bindings/interrupt-controller/irq-st.h> / { #address-cells = <1>; #size-cells = <1>;
@@ -104,6 +105,15 @@ reg = <0x94b5100 0x1000>; }; + irq-syscfg { + compatible = "st,stih407-irq-syscfg"; + st,syscfg = <&syscfg_core>; + st,irq-device = <ST_IRQ_SYSCFG_PMU_0>, + <ST_IRQ_SYSCFG_PMU_1>; + st,fiq-device = <ST_IRQ_SYSCFG_DISABLED>, + <ST_IRQ_SYSCFG_DISABLED>; + }; + serial at 9830000 { compatible = "st,asc"; reg = <0x9830000 0x2c>;
Signature · 1 line
1.9.1
PATCH v2 8/8 ARM: STI: Ensure requested STi's SysCfg Controlled IRQs are enabled at boot
In reply to Lee JonesThis driver is used to enable System Configuration Register controlled External, CTI (Core Sight), PMU (Performance Management), and PL310 L2 Cache IRQs prior to use.
--- arch/arm/mach-sti/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-sti/Kconfig +1 -0
@@ -1,6 +1,7 @@ menuconfig ARCH_STI bool "STMicroelectronics Consumer Electronics SOCs" if ARCH_MULTI_V7 select ARM_GIC + select ST_IRQCHIP select ARM_GLOBAL_TIMER select PINCTRL select PINCTRL_ST
Signature · 1 line
1.9.1
Jason, would you like me to send this set again?
Quoted 31 lines
This driver enables IRQs which are controlled using System Configuration registers. Without it Performance Monitoring, Core Sight Tracing and some L2 Caches will fail to function.
v1 => v2:
- Fixed up Jason's review commentsLee Jones (8):
dt: bindings: Supply shared ST IRQ defines
irqchip: Supply new driver for STi based devices
irqchip: irq-st: Add documentation for STi based syscfg IRQs
ARM: STi: STiH416: Enable Cortex-A9 PMU support
ARM: STi: STiH416: Enable PMU IRQs
ARM: STi: STiH407: Enable Cortex-A9 PMU support
ARM: STi: STiH407: Enable PMU IRQs
ARM: STI: Ensure requested STi's SysCfg Controlled IRQs are enabled at
boot.../interrupt-controller/st,sti-irq-syscfg.txt | 35 ++++ arch/arm/boot/dts/stih407.dtsi | 16 ++ arch/arm/boot/dts/stih416.dtsi | 16 ++ arch/arm/mach-sti/Kconfig | 1 + drivers/irqchip/Kconfig | 7 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-st.c | 208 +++++++++++++++++++++ include/dt-bindings/interrupt-controller/irq-st.h | 30 +++ 8 files changed, 314 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt create mode 100644 drivers/irqchip/irq-st.c create mode 100644 include/dt-bindings/interrupt-controller/irq-st.h
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 1 line · Lee Jones
Jason, would you like me to send this set again?
Please wait for -rc1 to land, then rebase on that.
thx,
Jason.
Quoted 4 lines · Jason Cooper
Quoted 1 line · Lee Jones
Jason, would you like me to send this set again?
Please wait for -rc1 to land, then rebase on that.
Can do. Thanks Jason.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog