Skip to content
Snippets Groups Projects
Verified Commit c322099c authored by Michal Hrusecky's avatar Michal Hrusecky :mouse:
Browse files

Hacky reboots on MOX

parent 2370e174
Branches
Tags
No related merge requests found
From b34fe18c7743dc181a3f168b73b971df9bb3f4fa Mon Sep 17 00:00:00 2001
From: Michal Hrusecky <michal.hrusecky@nic.cz>
Date: Mon, 14 Jan 2019 17:06:17 +0100
Subject: [PATCH] MOX: Hacky restart to make sure it works
---
...m64-restart-Armada-3700-restart-code.patch | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 target/linux/mvebu/patches-4.14/9999-arm64-restart-Armada-3700-restart-code.patch
diff --git a/target/linux/mvebu/patches-4.14/9999-arm64-restart-Armada-3700-restart-code.patch b/target/linux/mvebu/patches-4.14/9999-arm64-restart-Armada-3700-restart-code.patch
new file mode 100644
index 0000000000..b442f71bee
--- /dev/null
+++ b/target/linux/mvebu/patches-4.14/9999-arm64-restart-Armada-3700-restart-code.patch
@@ -0,0 +1,44 @@
+From d419edef1a2429acfa35341eb6fbfaea3b6c87c4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <marek.behun@nic.cz>
+Date: Mon, 14 Jan 2019 17:00:04 +0100
+Subject: [PATCH] arm64: restart: Armada 3700 restart code
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This is a bugfix for Turris Mox, do not send to mainline.
+
+Signed-off-by: Marek Behún <marek.behun@nic.cz>
+---
+ arch/arm64/kernel/process.c | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
+index 9e773732520c..2ae392c218fc 100644
+--- a/arch/arm64/kernel/process.c
++++ b/arch/arm64/kernel/process.c
+@@ -158,10 +158,17 @@ void machine_restart(char *cmd)
+ efi_reboot(reboot_mode, NULL);
+
+ /* Now call the architecture specific reboot code. */
+- if (arm_pm_restart)
+- arm_pm_restart(reboot_mode, cmd);
+- else
+- do_kernel_restart(cmd);
++ if (0) {
++ if (arm_pm_restart)
++ arm_pm_restart(reboot_mode, cmd);
++ else
++ do_kernel_restart(cmd);
++ } else {
++ void __iomem *r = ioremap(0xd0013000, 0x1000);
++ writel(0x1d1e, r + 0x840);
++ iounmap(r);
++ mdelay(1000);
++ }
+
+ /*
+ * Whoops - the architecture was unable to reboot.
+--
+2.19.2
+
--
2.20.1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment