firmware: remove unnecessary inline assembly in libboard.

This commit is contained in:
whitequark 2017-02-02 00:21:34 +00:00
parent 715443e211
commit 9a9a3aa7de

View File

@ -1,3 +1,4 @@
use core::ptr;
use spr::{self, mfspr, mtspr};
use csr;
use mem;
@ -38,7 +39,7 @@ pub fn flush_l2_cache() {
unsafe {
for i in 0..2 * (csr::CONFIG_L2_SIZE as usize) / 4 {
let addr = mem::MAIN_RAM_BASE + i * 4;
asm!("l.lwz r13, 0(${0})"::"r"(addr):"r13":"volatile")
ptr::read_volatile(addr as *const usize);
}
}
}