summaryrefslogtreecommitdiff
path: root/arch/riscv
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-06-28 16:22:13 -0400
committerTom Rini <trini@konsulko.com>2021-06-28 16:22:13 -0400
commit6d0453d88915feeece6e55748a2476d8509e5fad (patch)
treef4564a64f771cb071a74787f11471250fdbdf47b /arch/riscv
parent67edf2553f15e5148efca213af3f41cef3410680 (diff)
parent3ef4572110a43acdd7d401b0cb184c6ebd6eaa17 (diff)
Merge tag 'v2021.07-rc5' into next
Prepare v2021.07-rc5 # gpg: Signature made Mon 28 Jun 2021 03:39:36 PM EDT # gpg: using RSA key 1A3C7F70E08FAB1707809BBF147C39FF9634B72C # gpg: Good signature from "Thomas Rini <trini@konsulko.com>" [ultimate] # Conflicts: # configs/am64x_evm_r5_defconfig
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/dts/ae350-u-boot.dtsi52
-rw-r--r--arch/riscv/dts/ae350_32.dts9
-rw-r--r--arch/riscv/dts/ae350_64.dts7
-rw-r--r--arch/riscv/lib/andes_plic.c4
4 files changed, 64 insertions, 8 deletions
diff --git a/arch/riscv/dts/ae350-u-boot.dtsi b/arch/riscv/dts/ae350-u-boot.dtsi
new file mode 100644
index 0000000000..0d4201cfae
--- /dev/null
+++ b/arch/riscv/dts/ae350-u-boot.dtsi
@@ -0,0 +1,52 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/ {
+ cpus {
+ u-boot,dm-spl;
+ CPU0: cpu@0 {
+ u-boot,dm-spl;
+ CPU0_intc: interrupt-controller {
+ u-boot,dm-spl;
+ };
+ };
+ CPU1: cpu@1 {
+ u-boot,dm-spl;
+ CPU1_intc: interrupt-controller {
+ u-boot,dm-spl;
+ };
+ };
+ CPU2: cpu@2 {
+ u-boot,dm-spl;
+ CPU2_intc: interrupt-controller {
+ u-boot,dm-spl;
+ };
+ };
+ CPU3: cpu@3 {
+ u-boot,dm-spl;
+ CPU3_intc: interrupt-controller {
+ u-boot,dm-spl;
+ };
+ };
+ };
+
+ memory@0 {
+ u-boot,dm-spl;
+ };
+
+ soc {
+ u-boot,dm-spl;
+
+ plic1: interrupt-controller@e6400000 {
+ u-boot,dm-spl;
+ };
+
+ plmt0@e6000000 {
+ u-boot,dm-spl;
+ };
+ };
+
+ serial0: serial@f0300000 {
+ u-boot,dm-spl;
+ };
+
+};
diff --git a/arch/riscv/dts/ae350_32.dts b/arch/riscv/dts/ae350_32.dts
index a0ab5e9be2..083f676333 100644
--- a/arch/riscv/dts/ae350_32.dts
+++ b/arch/riscv/dts/ae350_32.dts
@@ -1,6 +1,9 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
/dts-v1/;
#include "binman.dtsi"
+#include "ae350-u-boot.dtsi"
/ {
#address-cells = <1>;
@@ -14,7 +17,7 @@
};
chosen {
- bootargs = "console=ttyS0,38400n8 debug loglevel=7";
+ bootargs = "console=ttyS0,38400n8 debug loglevel=7";
stdout-path = "uart0:38400n8";
};
@@ -133,8 +136,7 @@
plic0: interrupt-controller@e4000000 {
compatible = "riscv,plic0";
- #address-cells = <1>;
- #interrupt-cells = <1>;
+ #interrupt-cells = <2>;
interrupt-controller;
reg = <0xe4000000 0x2000000>;
riscv,ndev=<71>;
@@ -146,7 +148,6 @@
plic1: interrupt-controller@e6400000 {
compatible = "riscv,plic1";
- #address-cells = <1>;
#interrupt-cells = <1>;
interrupt-controller;
reg = <0xe6400000 0x400000>;
diff --git a/arch/riscv/dts/ae350_64.dts b/arch/riscv/dts/ae350_64.dts
index f654f4809a..74cff9122d 100644
--- a/arch/riscv/dts/ae350_64.dts
+++ b/arch/riscv/dts/ae350_64.dts
@@ -1,6 +1,9 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
/dts-v1/;
#include "binman.dtsi"
+#include "ae350-u-boot.dtsi"
/ {
#address-cells = <2>;
@@ -14,7 +17,7 @@
};
chosen {
- bootargs = "console=ttyS0,38400n8 debug loglevel=7";
+ bootargs = "console=ttyS0,38400n8 debug loglevel=7";
stdout-path = "uart0:38400n8";
};
@@ -133,7 +136,6 @@
plic0: interrupt-controller@e4000000 {
compatible = "riscv,plic0";
- #address-cells = <2>;
#interrupt-cells = <2>;
interrupt-controller;
reg = <0x0 0xe4000000 0x0 0x2000000>;
@@ -146,7 +148,6 @@
plic1: interrupt-controller@e6400000 {
compatible = "riscv,plic1";
- #address-cells = <2>;
#interrupt-cells = <2>;
interrupt-controller;
reg = <0x0 0xe6400000 0x0 0x400000>;
diff --git a/arch/riscv/lib/andes_plic.c b/arch/riscv/lib/andes_plic.c
index 221a5fe324..5e113ee8c9 100644
--- a/arch/riscv/lib/andes_plic.c
+++ b/arch/riscv/lib/andes_plic.c
@@ -105,9 +105,11 @@ int riscv_clear_ipi(int hart)
int riscv_get_ipi(int hart, int *pending)
{
+ unsigned int ipi = (SEND_IPI_TO_HART(hart) << (8 * gd->arch.boot_hart));
+
*pending = readl((void __iomem *)PENDING_REG(gd->arch.plic,
gd->arch.boot_hart));
- *pending = !!(*pending & SEND_IPI_TO_HART(hart));
+ *pending = !!(*pending & ipi);
return 0;
}