apple_wdt.c (9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e) apple_wdt.c (d556b4ff5854a7120dd01c5aa2f9512b2c0bf949)
1// SPDX-License-Identifier: GPL-2.0-only OR MIT
2/*
3 * Apple SoC Watchdog driver
4 *
5 * Copyright (C) The Asahi Linux Contributors
6 */
7
8#include <linux/bits.h>

--- 116 unchanged lines hidden (view full) ---

125 writel_relaxed(0, wdt->regs + APPLE_WDT_WD1_CUR_TIME);
126
127 /*
128 * Flush writes and then wait for the SoC to reset. Even though the
129 * reset is queued almost immediately experiments have shown that it
130 * can take up to ~20-25ms until the SoC is actually reset. Just wait
131 * 50ms here to be safe.
132 */
1// SPDX-License-Identifier: GPL-2.0-only OR MIT
2/*
3 * Apple SoC Watchdog driver
4 *
5 * Copyright (C) The Asahi Linux Contributors
6 */
7
8#include <linux/bits.h>

--- 116 unchanged lines hidden (view full) ---

125 writel_relaxed(0, wdt->regs + APPLE_WDT_WD1_CUR_TIME);
126
127 /*
128 * Flush writes and then wait for the SoC to reset. Even though the
129 * reset is queued almost immediately experiments have shown that it
130 * can take up to ~20-25ms until the SoC is actually reset. Just wait
131 * 50ms here to be safe.
132 */
133 (void)readl_relaxed(wdt->regs + APPLE_WDT_WD1_CUR_TIME);
133 (void)readl(wdt->regs + APPLE_WDT_WD1_CUR_TIME);
134 mdelay(50);
135
136 return 0;
137}
138
139static struct watchdog_ops apple_wdt_ops = {
140 .owner = THIS_MODULE,
141 .start = apple_wdt_start,

--- 69 unchanged lines hidden ---
134 mdelay(50);
135
136 return 0;
137}
138
139static struct watchdog_ops apple_wdt_ops = {
140 .owner = THIS_MODULE,
141 .start = apple_wdt_start,

--- 69 unchanged lines hidden ---