Skip to content

Commit 36c1370

Browse files
committed
arch: arm: Fix incorrect Cortex-R device tree specification.
1. Replace the non-existent CPU device binding ("Cortex-R") specified by the CPU node with a proper one. 2. Relocate CPU node declaration to SoC dtsi: The CPU node should be declared in the SoC dtsi because the core type is SoC-dependent. In fact, this is exactly how it is done in the Cortex-M port. 3. Remove core_intc (supposedly Cortex-R VIC): Unlike the NVIC of Cortex-M, the VIC of Cortex-R is not a true interrupt controller in the conventional sense and merely acts as a CPU input port for aggregated interrupt request and vector index signals. For this reason, there is no point in declaring it in the device tree and specifying it as an interrupt parent. All SoCs incorporating Cortex-R implement a separate true interrupt controller (for instance, GIC for Zynq MPSoC and VIM for Hercules). Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 13ae3d5 commit 36c1370

File tree

2 files changed

+12
-21
lines changed

2 files changed

+12
-21
lines changed

dts/arm/armv7-r.dtsi

+1-19
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,14 @@
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6+
67
#include "skeleton.dtsi"
78

89
/ {
9-
cpus {
10-
#address-cells = <1>;
11-
#size-cells = <0>;
12-
13-
cpu@0 {
14-
device_type = "cpu";
15-
compatible = "Cortex-R";
16-
reg = <0>;
17-
};
18-
19-
core_intc: core_intc@0 {
20-
compatible = "armv7-r,core-intc";
21-
reg = <0x00 0x4>;
22-
interrupt-controller;
23-
#interrupt-cells = <2>;
24-
};
25-
};
26-
2710
soc {
2811
#address-cells = <1>;
2912
#size-cells = <1>;
3013
compatible = "simple-bus";
3114
ranges;
3215
};
3316
};
34-

dts/arm/xilinx/zynqmp.dtsi

+11-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,24 @@
22
* Copyright (c) 2019 Lexmark International, Inc.
33
*
44
* SPDX-License-Identifier: Apache-2.0
5-
*
65
*/
76

87
#include <mem.h>
98
#include <arm/armv7-r.dtsi>
109
#include <dt-bindings/interrupt-controller/arm-gic.h>
1110

1211
/ {
12+
cpus {
13+
#address-cells = <1>;
14+
#size-cells = <0>;
15+
16+
cpu@0 {
17+
device_type = "cpu";
18+
compatible = "arm,cortex-r4";
19+
reg = <0>;
20+
};
21+
};
22+
1323
soc {
1424
interrupt-parent = <&gic>;
1525

@@ -19,7 +29,6 @@
1929
<0xf9020000 0x100>;
2030
interrupt-controller;
2131
#interrupt-cells = <3>;
22-
interrupt-parent = <&core_intc>;
2332
label = "GIC";
2433
status = "okay";
2534
};

0 commit comments

Comments
 (0)