mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-10 09:44:13 +00:00
utils: Use CPU timer instead of AIC timer
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
bc82dbea4e
commit
425daaedbd
1 changed files with 3 additions and 5 deletions
|
@ -87,13 +87,11 @@ void __assert_fail(const char *assertion, const char *file, unsigned int line, c
|
|||
flush_and_reboot();
|
||||
}
|
||||
|
||||
#define AIC_TIMER 0x23b108020
|
||||
|
||||
void udelay(u32 d)
|
||||
{
|
||||
u32 delay = d * 24;
|
||||
u32 val = read32(AIC_TIMER);
|
||||
while ((read32(AIC_TIMER) - val) < delay)
|
||||
u64 delay = (u64)d * mrs(CNTFRQ_EL0) / 1000000;
|
||||
u32 val = mrs(CNTPCT_EL0);
|
||||
while ((mrs(CNTPCT_EL0) - val) < delay)
|
||||
;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue