Skip to content

Commit

Permalink
Fix test by using spin look instead of nop
Browse files Browse the repository at this point in the history
Signed-off-by: Graham MacDonald <[email protected]>
  • Loading branch information
gmacd authored and dancrossnyc committed Feb 5, 2023
1 parent bdd494d commit d8c7a94
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions aarch64/src/devcons.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Racy to start.

use core::arch::aarch64;
use core::mem;
use core::mem::MaybeUninit;
use core::ptr;
Expand Down Expand Up @@ -380,9 +379,7 @@ impl Uart for MiniUart {
fn putb(&self, b: u8) {
// Wait for UART to become ready to transmit
while read_reg(self.miniuart_reg, AUX_MU_LSR) & (1 << 5) == 0 {
unsafe {
aarch64::__nop();
}
core::hint::spin_loop();
}
write_reg(self.miniuart_reg, AUX_MU_IO, b as u32);
}
Expand Down

0 comments on commit d8c7a94

Please sign in to comment.