summaryrefslogtreecommitdiffstats
path: root/arch/mips/mach-loongson/loongson1_reset.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/mach-loongson/loongson1_reset.c')
-rw-r--r--arch/mips/mach-loongson/loongson1_reset.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/mips/mach-loongson/loongson1_reset.c b/arch/mips/mach-loongson/loongson1_reset.c
index a6c05905de..9b4da217f8 100644
--- a/arch/mips/mach-loongson/loongson1_reset.c
+++ b/arch/mips/mach-loongson/loongson1_reset.c
@@ -11,16 +11,20 @@
static void __noreturn longhorn_restart_soc(struct restart_handler *rst)
{
- __raw_writel(0x1, WDT_EN);
- __raw_writel(0x1, WDT_SET);
- __raw_writel(0x1, WDT_TIMER);
+ void __iomem *wdt = IOMEM(0);
+
+ OPTIMIZER_HIDE_VAR(wdt);
+
+ __raw_writel(0x1, wdt + WDT_EN);
+ __raw_writel(0x1, wdt + WDT_SET);
+ __raw_writel(0x1, wdt + WDT_TIMER);
hang();
}
static int restart_register_feature(void)
{
- restart_handler_register_fn(longhorn_restart_soc);
+ restart_handler_register_fn("soc-wdt", longhorn_restart_soc);
return 0;
}