From e67efe439b4c1a535a9d784fef3547d95584a909 Mon Sep 17 00:00:00 2001 From: pca006132 Date: Tue, 7 Jul 2020 10:17:15 +0800 Subject: [PATCH] libsupport: fixed core1 restart. The TRM mentioned that user should stop the clock, de-assert the reset, and then restart the clock for core reset. This fixes the kernel restart problem in one of the zc706 board. --- libsupport_zynq/src/boot.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libsupport_zynq/src/boot.rs b/libsupport_zynq/src/boot.rs index 70a47a5..79eb9e6 100644 --- a/libsupport_zynq/src/boot.rs +++ b/libsupport_zynq/src/boot.rs @@ -158,7 +158,9 @@ impl Core1 { pub fn restart(&self) { slcr::RegisterBlock::unlocked(|slcr| { slcr.a9_cpu_rst_ctrl.modify(|_, w| w.a9_rst1(true)); + slcr.a9_cpu_rst_ctrl.modify(|_, w| w.a9_clkstop1(true)); slcr.a9_cpu_rst_ctrl.modify(|_, w| w.a9_rst1(false)); + slcr.a9_cpu_rst_ctrl.modify(|_, w| w.a9_clkstop1(false)); }); } }