projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ARM: zynqmp: Add platform specific arch_get_page_table
[oweals/u-boot.git]
/
arch
/
arm
/
cpu
/
armv8
/
generic_timer.c
diff --git
a/arch/arm/cpu/armv8/generic_timer.c
b/arch/arm/cpu/armv8/generic_timer.c
index 223b95e210edd7146c6a8549bbf7f43b362d105b..8e60baebc53487d17556facc322003e23dfbd15f 100644
(file)
--- a/
arch/arm/cpu/armv8/generic_timer.c
+++ b/
arch/arm/cpu/armv8/generic_timer.c
@@
-25,7
+25,18
@@
unsigned long get_tbclk(void)
unsigned long timer_read_counter(void)
{
unsigned long cntpct;
unsigned long timer_read_counter(void)
{
unsigned long cntpct;
+#ifdef CONFIG_SYS_FSL_ERRATUM_A008585
+ /* This erratum number needs to be confirmed to match ARM document */
+ unsigned long temp;
+#endif
isb();
asm volatile("mrs %0, cntpct_el0" : "=r" (cntpct));
isb();
asm volatile("mrs %0, cntpct_el0" : "=r" (cntpct));
+#ifdef CONFIG_SYS_FSL_ERRATUM_A008585
+ asm volatile("mrs %0, cntpct_el0" : "=r" (temp));
+ while (temp != cntpct) {
+ asm volatile("mrs %0, cntpct_el0" : "=r" (cntpct));
+ asm volatile("mrs %0, cntpct_el0" : "=r" (temp));
+ }
+#endif
return cntpct;
}
return cntpct;
}