mirror of
https://github.com/Fishwaldo/build.git
synced 2025-06-20 21:28:36 +00:00
Enable crash detection. Sway a little with Banana Pi M3
This commit is contained in:
parent
e5c1088124
commit
ced9ca0c91
2 changed files with 260 additions and 285 deletions
|
@ -1,73 +0,0 @@
|
|||
From 0d0c1ff54f2f61282d6f1e66e2f27eb3a4f31595 Mon Sep 17 00:00:00 2001
|
||||
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
|
||||
Date: Wed, 23 Dec 2015 11:49:42 +0200
|
||||
Subject: [PATCH] ARM: sun8i: Add SMP support for the Allwinner H3
|
||||
|
||||
The H3 is a quad Cortex-A7. Add the logic to use the IPs used to
|
||||
control the CPU configuration and the CPU power so that we can
|
||||
bring up secondary CPUs at boot.
|
||||
|
||||
CPUCFG in H3 is similar to CPUCFG in A31, but not exactly the
|
||||
same. H3 PRCM is not documented at all. The SMP code in the
|
||||
Allwinner SDK is guarded by the same ifdefs for A31 and H3, so
|
||||
at least bringing up secondary CPU cores is likely compatible
|
||||
between these two SoC variants.
|
||||
|
||||
Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/sun8i-h3.dtsi | 11 +++++++++++
|
||||
arch/arm/mach-sunxi/platsmp.c | 6 ++++++
|
||||
2 files changed, 17 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
|
||||
index 0faa38a..d23ed84 100644
|
||||
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
|
||||
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
|
||||
@@ -51,6 +51,7 @@
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
+ enable-method = "allwinner,sun6i-a31";
|
||||
|
||||
cpu@0 {
|
||||
compatible = "arm,cortex-a7";
|
||||
@@ -591,5 +592,15 @@
|
||||
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
+
|
||||
+ prcm@01f01400 {
|
||||
+ compatible = "allwinner,sun8i-h3-prcm";
|
||||
+ reg = <0x01f01400 0x200>;
|
||||
+ };
|
||||
+
|
||||
+ cpucfg@01f01c00 {
|
||||
+ compatible = "allwinner,sun8i-h3-cpuconfig";
|
||||
+ reg = <0x01f01c00 0x300>;
|
||||
+ };
|
||||
};
|
||||
};
|
||||
diff --git a/arch/arm/mach-sunxi/platsmp.c b/arch/arm/mach-sunxi/platsmp.c
|
||||
index e8483ec7..8ca4064 100644
|
||||
--- a/arch/arm/mach-sunxi/platsmp.c
|
||||
+++ b/arch/arm/mach-sunxi/platsmp.c
|
||||
@@ -44,6 +44,9 @@ static void __init sun6i_smp_prepare_cpus(unsigned int max_cpus)
|
||||
struct device_node *node;
|
||||
|
||||
node = of_find_compatible_node(NULL, NULL, "allwinner,sun6i-a31-prcm");
|
||||
+ if (!node)
|
||||
+ node = of_find_compatible_node(NULL, NULL,
|
||||
+ "allwinner,sun8i-h3-prcm");
|
||||
if (!node) {
|
||||
pr_err("Missing A31 PRCM node in the device tree\n");
|
||||
return;
|
||||
@@ -57,6 +60,9 @@ static void __init sun6i_smp_prepare_cpus(unsigned int max_cpus)
|
||||
|
||||
node = of_find_compatible_node(NULL, NULL,
|
||||
"allwinner,sun6i-a31-cpuconfig");
|
||||
+ if (!node)
|
||||
+ node = of_find_compatible_node(NULL, NULL,
|
||||
+ "allwinner,sun8i-h3-cpuconfig");
|
||||
if (!node) {
|
||||
pr_err("Missing A31 CPU config node in the device tree\n");
|
||||
return;
|
Loading…
Add table
Add a link
Reference in a new issue