2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

ICAP: prevent sayma from using it (#1740)

This commit is contained in:
Star Chen 2021-08-06 15:08:30 +08:00 committed by GitHub
parent dc546630e4
commit 5111132ef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -114,6 +114,7 @@ pub unsafe fn write(mut addr: usize, mut data: &[u8]) {
}
}
#[cfg(any(soc_platform = "kasli", soc_platform = "metlino", soc_platform = "kc705"))]
pub unsafe fn reload () -> ! {
csr::icap::iprog_write(1);
loop {}

View File

@ -332,7 +332,8 @@ pub fn panic_impl(info: &core::panic::PanicInfo) -> ! {
println!("{:#08x}", ip - 2 * 4);
});
if config::read_str("panic_reset", |r| r == Ok("1")) && cfg!(has_spiflash) {
if config::read_str("panic_reset", |r| r == Ok("1")) &&
cfg!(any(soc_platform = "kasli", soc_platform = "metlino", soc_platform = "kc705")) {
println!("restarting...");
unsafe {
kernel::stop();