summaryrefslogtreecommitdiff
path: root/drivers/timer
diff options
context:
space:
mode:
authorKuan-Wei Chiu <[email protected]>2026-05-16 16:39:56 +0900
committerTom Rini <[email protected]>2026-05-22 16:47:54 -0600
commit75a1d7280a72d587d54b6af653234a96210f7177 (patch)
treeeedaa3c658f047847aef0ecd73acfd7d65f464f0 /drivers/timer
parent5116fed77dee99a513f17f18be0dbf2e63363eef (diff)
timer: goldfish: Use __raw_readl()
The Goldfish timer registers are native endian, so they act as big-endian on the m68k virt machine. Currently, this driver uses readl(), which works by luck because it's currently broken on m68k. Use __raw_readl() instead to avoid breaking this driver when the endianness of readl() is fixed. Signed-off-by: Kuan-Wei Chiu <[email protected]> Tested-by: Daniel Palmer <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Daniel Palmer <[email protected]>
Diffstat (limited to 'drivers/timer')
-rw-r--r--drivers/timer/goldfish_timer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/timer/goldfish_timer.c b/drivers/timer/goldfish_timer.c
index 70673bbd93c..91277d7932a 100644
--- a/drivers/timer/goldfish_timer.c
+++ b/drivers/timer/goldfish_timer.c
@@ -31,8 +31,8 @@ static u64 goldfish_timer_get_count(struct udevice *dev)
* We must read LOW before HIGH to latch the high 32-bit value
* and ensure a consistent 64-bit timestamp.
*/
- low = readl(priv->base + TIMER_TIME_LOW);
- high = readl(priv->base + TIMER_TIME_HIGH);
+ low = __raw_readl(priv->base + TIMER_TIME_LOW);
+ high = __raw_readl(priv->base + TIMER_TIME_HIGH);
time = ((u64)high << 32) | low;