Skip to content

Commit f31afb5

Browse files
jamieilesWim Van Sebroeck
authored andcommitted
watchdog: sbsa: only use 32-bit accessors
SBSA says of the generic watchdog: All registers are 32 bits in size and should be accessed using 32-bit reads and writes. If an access size other than 32 bits is used then the results are IMPLEMENTATION DEFINED. and for qemu, the implementation will only allow 32-bit accesses resulting in a synchronous external abort when configuring the watchdog. Use lo_hi_* accessors rather than a readq/writeq. Fixes: abd3ac7 ("watchdog: sbsa: Support architecture version 1") Signed-off-by: Jamie Iles <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Reviewed-by: Shaokun Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 6e7733e commit f31afb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/watchdog/sbsa_gwdt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ static u64 sbsa_gwdt_reg_read(struct sbsa_gwdt *gwdt)
130130
if (gwdt->version == 0)
131131
return readl(gwdt->control_base + SBSA_GWDT_WOR);
132132
else
133-
return readq(gwdt->control_base + SBSA_GWDT_WOR);
133+
return lo_hi_readq(gwdt->control_base + SBSA_GWDT_WOR);
134134
}
135135

136136
static void sbsa_gwdt_reg_write(u64 val, struct sbsa_gwdt *gwdt)
137137
{
138138
if (gwdt->version == 0)
139139
writel((u32)val, gwdt->control_base + SBSA_GWDT_WOR);
140140
else
141-
writeq(val, gwdt->control_base + SBSA_GWDT_WOR);
141+
lo_hi_writeq(val, gwdt->control_base + SBSA_GWDT_WOR);
142142
}
143143

144144
/*

0 commit comments

Comments
 (0)