Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARCv2: IDU-intc: Delete deprecated parameters in Device Trees

No need for specifying a list of interrupts in the declaration
of IDU interrupt controller anymore since the kernel can obtain
a number of supported interrupts from the build register.

Also delete support of the second parameter for devices which
are connected to IDU because it is not used anywhere.

Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>

authored by

Yuriy Kolerov and committed by
Vineet Gupta
ec69b269 fc73965e

+21 -101
+6 -18
Documentation/devicetree/bindings/interrupt-controller/snps,archs-idu-intc.txt
··· 8 8 - compatible: "snps,archs-idu-intc" 9 9 - interrupt-controller: This is an interrupt controller. 10 10 - interrupt-parent: <reference to parent core intc> 11 - - #interrupt-cells: Must be <2>. 12 - - interrupts: <...> specifies the upstream core irqs 11 + - #interrupt-cells: Must be <1>. 13 12 14 - First cell specifies the "common" IRQ from peripheral to IDU 15 - Second cell specifies the irq distribution mode to cores 16 - 0=Round Robin; 1=cpu0, 2=cpu1, 4=cpu2, 8=cpu3 17 - 18 - The second cell in interrupts property is deprecated and may be ignored by 19 - the kernel. 13 + Value of the cell specifies the "common" IRQ from peripheral to IDU. Number N 14 + of the particular interrupt line of IDU corresponds to the line N+24 of the 15 + core interrupt controller. 20 16 21 17 intc accessed via the special ARC AUX register interface, hence "reg" property 22 18 is not specified. ··· 28 32 compatible = "snps,archs-idu-intc"; 29 33 interrupt-controller; 30 34 interrupt-parent = <&core_intc>; 31 - 32 - /* 33 - * <hwirq distribution> 34 - * distribution: 0=RR; 1=cpu0, 2=cpu1, 4=cpu2, 8=cpu3 35 - */ 36 - #interrupt-cells = <2>; 37 - 38 - /* upstream core irqs: downstream these are "COMMON" irq 0,1.. */ 39 - interrupts = <24 25 26 27 28 29 30 31>; 35 + #interrupt-cells = <1>; 40 36 }; 41 37 42 38 some_device: serial@c0fc1000 { 43 39 interrupt-parent = <&idu_intc>; 44 - interrupts = <0 0>; /* upstream idu IRQ #24, Round Robin */ 40 + interrupts = <0>; /* upstream idu IRQ #24 */ 45 41 };
+3 -20
arch/arc/boot/dts/axc003_idu.dtsi
··· 40 40 compatible = "snps,archs-idu-intc"; 41 41 interrupt-controller; 42 42 interrupt-parent = <&core_intc>; 43 - 44 - /* 45 - * <hwirq distribution> 46 - * distribution: 0=RR; 1=cpu0, 2=cpu1, 4=cpu2, 8=cpu3 47 - */ 48 - #interrupt-cells = <2>; 49 - 50 - /* 51 - * upstream irqs to core intc - downstream these are 52 - * "COMMON" irq 0,1.. 53 - */ 54 - interrupts = <24 25>; 43 + #interrupt-cells = <1>; 55 44 }; 56 45 57 46 /* ··· 62 73 interrupt-controller; 63 74 #interrupt-cells = <2>; 64 75 interrupt-parent = <&idu_intc>; 65 - 66 - /* 67 - * cmn irq 1 -> cpu irq 25 68 - * Distribute to cpu0 only 69 - */ 70 - interrupts = <1 1>; 76 + interrupts = <1>; 71 77 }; 72 78 }; 73 79 ··· 103 119 reg = < 0xe0012000 0x200 >; 104 120 interrupt-controller; 105 121 interrupt-parent = <&idu_intc>; 106 - interrupts = <0 1>; /* cmn irq 0 -> cpu irq 24 107 - distribute to cpu0 only */ 122 + interrupts = <0>; 108 123 }; 109 124 110 125 memory {
+2 -8
arch/arc/boot/dts/haps_hs_idu.dts
··· 54 54 compatible = "snps,archs-idu-intc"; 55 55 interrupt-controller; 56 56 interrupt-parent = <&core_intc>; 57 - /* <hwirq distribution> 58 - distribution: 0=RR; 1=cpu0, 2=cpu1, 4=cpu2, 8=cpu3 */ 59 - #interrupt-cells = <2>; 60 - interrupts = <24 25 26 27 28 29 30 31>; 61 - 57 + #interrupt-cells = <1>; 62 58 }; 63 59 64 60 uart0: serial@f0000000 { ··· 62 66 compatible = "ns16550a"; 63 67 reg = <0xf0000000 0x2000>; 64 68 interrupt-parent = <&idu_intc>; 65 - /* interrupts = <0 1>; DEST=1*/ 66 - /* interrupts = <0 2>; DEST=2*/ 67 - interrupts = <0 0>; /* RR*/ 69 + interrupts = <0>; 68 70 clock-frequency = <50000000>; 69 71 baud = <115200>; 70 72 reg-shift = <2>;
+2 -13
arch/arc/boot/dts/nsim_hs_idu.dts
··· 46 46 compatible = "snps,archs-idu-intc"; 47 47 interrupt-controller; 48 48 interrupt-parent = <&core_intc>; 49 - 50 - /* 51 - * <hwirq distribution> 52 - * distribution: 0=RR; 1=cpu0, 2=cpu1, 4=cpu2, 8=cpu3 53 - */ 54 - #interrupt-cells = <2>; 55 - 56 - /* 57 - * upstream irqs to core intc - downstream these are 58 - * "COMMON" irq 0,1.. 59 - */ 60 - interrupts = <24 25 26 27 28 29 30 31>; 49 + #interrupt-cells = <1>; 61 50 }; 62 51 63 52 arcuart0: serial@c0fc1000 { 64 53 compatible = "snps,arc-uart"; 65 54 reg = <0xc0fc1000 0x100>; 66 55 interrupt-parent = <&idu_intc>; 67 - interrupts = <0 0>; 56 + interrupts = <0>; 68 57 clock-frequency = <80000000>; 69 58 current-speed = <115200>; 70 59 status = "okay";
+4 -16
arch/arc/boot/dts/nsimosci_hs_idu.dts
··· 50 50 compatible = "snps,archs-idu-intc"; 51 51 interrupt-controller; 52 52 interrupt-parent = <&core_intc>; 53 - 54 - /* 55 - * <hwirq distribution> 56 - * distribution: 0=RR; 1=cpu0, 2=cpu1, 4=cpu2, 8=cpu3 57 - */ 58 - #interrupt-cells = <2>; 59 - 60 - /* 61 - * upstream irqs to core intc - downstream these are 62 - * "COMMON" irq 0,1.. 63 - */ 64 - interrupts = <24 25 26 27 28 29 30 31>; 53 + #interrupt-cells = <1>; 65 54 }; 66 55 67 56 uart0: serial@f0000000 { 68 57 compatible = "ns8250"; 69 58 reg = <0xf0000000 0x2000>; 70 59 interrupt-parent = <&idu_intc>; 71 - interrupts = <0 0>; /* cmn irq 0 -> cpu irq 24 72 - RR distribute to all cpus */ 60 + interrupts = <0>; 73 61 clock-frequency = <3686400>; 74 62 baud = <115200>; 75 63 reg-shift = <2>; ··· 81 93 ps2: ps2@f9001000 { 82 94 compatible = "snps,arc_ps2"; 83 95 reg = <0xf9000400 0x14>; 84 - interrupts = <3 0>; 96 + interrupts = <3>; 85 97 interrupt-parent = <&idu_intc>; 86 98 interrupt-names = "arc_ps2_irq"; 87 99 }; ··· 90 102 compatible = "ezchip,nps-mgt-enet"; 91 103 reg = <0xf0003000 0x44>; 92 104 interrupt-parent = <&idu_intc>; 93 - interrupts = <1 2>; 105 + interrupts = <1>; 94 106 }; 95 107 96 108 arcpct0: pct {
+3 -10
arch/arc/boot/dts/vdk_axc003_idu.dtsi
··· 41 41 compatible = "snps,archs-idu-intc"; 42 42 interrupt-controller; 43 43 interrupt-parent = <&core_intc>; 44 - 45 - /* 46 - * <hwirq distribution> 47 - * distribution: 0=RR; 1=cpu0, 2=cpu1, 4=cpu2, 8=cpu3 48 - */ 49 - #interrupt-cells = <2>; 50 - 51 - interrupts = <24 25 26 27>; 44 + #interrupt-cells = <1>; 52 45 }; 53 46 54 47 debug_uart: dw-apb-uart@0x5000 { ··· 49 56 reg = <0x5000 0x100>; 50 57 clock-frequency = <2403200>; 51 58 interrupt-parent = <&idu_intc>; 52 - interrupts = <2 0>; 59 + interrupts = <2>; 53 60 baud = <115200>; 54 61 reg-shift = <2>; 55 62 reg-io-width = <4>; ··· 63 70 reg = < 0xe0012000 0x200 >; 64 71 interrupt-controller; 65 72 interrupt-parent = <&idu_intc>; 66 - interrupts = < 0 0 >; 73 + interrupts = <0>; 67 74 }; 68 75 69 76 memory {
+1 -16
arch/arc/kernel/mcip.c
··· 255 255 return 0; 256 256 } 257 257 258 - static int idu_irq_xlate(struct irq_domain *d, struct device_node *n, 259 - const u32 *intspec, unsigned int intsize, 260 - irq_hw_number_t *out_hwirq, unsigned int *out_type) 261 - { 262 - /* 263 - * Ignore value of interrupt distribution mode for common interrupts in 264 - * IDU which resides in intspec[1] since setting an affinity using value 265 - * from Device Tree is deprecated in ARC. 266 - */ 267 - *out_hwirq = intspec[0]; 268 - *out_type = IRQ_TYPE_NONE; 269 - 270 - return 0; 271 - } 272 - 273 258 static const struct irq_domain_ops idu_irq_ops = { 274 - .xlate = idu_irq_xlate, 259 + .xlate = irq_domain_xlate_onecell, 275 260 .map = idu_irq_map, 276 261 }; 277 262