2021-01-22 20:48:52

by Bert Vermeulen

[permalink] [raw]
Subject: [PATCH v4 0/2] Realtek RTL838x/RTL839x interrupt controller driver

v4:
- Disable cascaded interrupts before mapping, not after.
- Set chained handlers as interrupt mappings are read, instead of beforehand.
- Removed timer interrupt clear.

v3:
- Fixed syntax and maxItems problems in DT bindings.

v2:
- Addressed all comments by Marc Zyngier.
- Moved interrupt routing symbols to device tree interrupt-map. Parsing
is done similar to the renesas,rza1-irqc driver.


Bert Vermeulen (2):
dt-bindings: interrupt-controller: Add Realtek RTL838x/RTL839x support
irqchip: Add support for Realtek RTL838x/RTL839x interrupt controller

.../realtek,rtl-intc.yaml | 57 ++++++
drivers/irqchip/Makefile | 1 +
drivers/irqchip/irq-realtek-rtl.c | 180 ++++++++++++++++++
3 files changed, 238 insertions(+)
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml
create mode 100644 drivers/irqchip/irq-realtek-rtl.c

--
2.25.1


2021-01-22 20:49:29

by Bert Vermeulen

[permalink] [raw]
Subject: [PATCH v4 1/2] dt-bindings: interrupt-controller: Add Realtek RTL838x/RTL839x support

Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Bert Vermeulen <[email protected]>
---
.../realtek,rtl-intc.yaml | 57 +++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml

diff --git a/Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml
new file mode 100644
index 000000000000..9e76fff20323
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/realtek,rtl-intc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek RTL SoC interrupt controller devicetree bindings
+
+maintainers:
+ - Birger Koblitz <[email protected]>
+ - Bert Vermeulen <[email protected]>
+ - John Crispin <[email protected]>
+
+properties:
+ compatible:
+ const: realtek,rtl-intc
+
+ "#interrupt-cells":
+ const: 1
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ "#address-cells":
+ const: 0
+
+ interrupt-map:
+ description: Describes mapping from SoC interrupts to CPU interrupts
+
+required:
+ - compatible
+ - reg
+ - "#interrupt-cells"
+ - interrupt-controller
+ - "#address-cells"
+ - interrupt-map
+
+additionalProperties: false
+
+examples:
+ - |
+ intc: interrupt-controller@3000 {
+ compatible = "realtek,rtl-intc";
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ reg = <0x3000 0x20>;
+ #address-cells = <0>;
+ interrupt-map =
+ <31 &cpuintc 2>,
+ <30 &cpuintc 1>,
+ <29 &cpuintc 5>;
+ };
--
2.25.1

2021-02-04 16:01:40

by Marc Zyngier

[permalink] [raw]
Subject: Re: [PATCH v4 0/2] Realtek RTL838x/RTL839x interrupt controller driver

On Fri, 22 Jan 2021 21:42:22 +0100, Bert Vermeulen wrote:
> v4:
> - Disable cascaded interrupts before mapping, not after.
> - Set chained handlers as interrupt mappings are read, instead of beforehand.
> - Removed timer interrupt clear.
>
> v3:
> - Fixed syntax and maxItems problems in DT bindings.
>
> [...]

Applied to irq/irqchip-next, thanks!

[1/2] dt-bindings: interrupt-controller: Add Realtek RTL838x/RTL839x support
commit: 4a2b92a5d3519fc2c1edda4d4aa0e05bff41e8de
[2/2] irqchip: Add support for Realtek RTL838x/RTL839x interrupt controller
commit: 9f3a0f34b84ad1b9a8f2bdae44b66f16685b2143

Cheers,

M.
--
Without deviation from the norm, progress is not possible.


2021-02-04 16:07:11

by tip-bot2 for Jacob Pan

[permalink] [raw]
Subject: [irqchip: irq/irqchip-next] dt-bindings: interrupt-controller: Add Realtek RTL838x/RTL839x support

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID: 4a2b92a5d3519fc2c1edda4d4aa0e05bff41e8de
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/4a2b92a5d3519fc2c1edda4d4aa0e05bff41e8de
Author: Bert Vermeulen <[email protected]>
AuthorDate: Fri, 22 Jan 2021 21:42:23 +01:00
Committer: Marc Zyngier <[email protected]>
CommitterDate: Thu, 04 Feb 2021 10:36:15

dt-bindings: interrupt-controller: Add Realtek RTL838x/RTL839x support

Document the binding for the Realtek RTL838x/RTL839x interrupt controller.

Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Bert Vermeulen <[email protected]>
[maz: Add a commit message, as the author couldn't be bothered...]
Signed-off-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml

diff --git a/Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml
new file mode 100644
index 0000000..9e76fff
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/realtek,rtl-intc.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/realtek,rtl-intc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek RTL SoC interrupt controller devicetree bindings
+
+maintainers:
+ - Birger Koblitz <[email protected]>
+ - Bert Vermeulen <[email protected]>
+ - John Crispin <[email protected]>
+
+properties:
+ compatible:
+ const: realtek,rtl-intc
+
+ "#interrupt-cells":
+ const: 1
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ "#address-cells":
+ const: 0
+
+ interrupt-map:
+ description: Describes mapping from SoC interrupts to CPU interrupts
+
+required:
+ - compatible
+ - reg
+ - "#interrupt-cells"
+ - interrupt-controller
+ - "#address-cells"
+ - interrupt-map
+
+additionalProperties: false
+
+examples:
+ - |
+ intc: interrupt-controller@3000 {
+ compatible = "realtek,rtl-intc";
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ reg = <0x3000 0x20>;
+ #address-cells = <0>;
+ interrupt-map =
+ <31 &cpuintc 2>,
+ <30 &cpuintc 1>,
+ <29 &cpuintc 5>;
+ };