| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Watchdog timer for PowerPC Book-E systems |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * Copyright 2005, 2008, 2010-2011 Freescale Semiconductor Inc. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 10 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 11 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 12 | | - * option) any later version. |
|---|
| 13 | 9 | */ |
|---|
| 14 | 10 | |
|---|
| 15 | 11 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
|---|
| .. | .. |
|---|
| 25 | 21 | /* If the kernel parameter wdt=1, the watchdog will be enabled at boot. |
|---|
| 26 | 22 | * Also, the wdt_period sets the watchdog timer period timeout. |
|---|
| 27 | 23 | * For E500 cpus the wdt_period sets which bit changing from 0->1 will |
|---|
| 28 | | - * trigger a watchog timeout. This watchdog timeout will occur 3 times, the |
|---|
| 24 | + * trigger a watchdog timeout. This watchdog timeout will occur 3 times, the |
|---|
| 29 | 25 | * first time nothing will happen, the second time a watchdog exception will |
|---|
| 30 | 26 | * occur, and the final time the board will reset. |
|---|
| 31 | 27 | */ |
|---|
| .. | .. |
|---|
| 43 | 39 | module_param(booke_wdt_enabled, bool, 0); |
|---|
| 44 | 40 | static int booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT; |
|---|
| 45 | 41 | module_param(booke_wdt_period, int, 0); |
|---|
| 42 | +static bool nowayout = WATCHDOG_NOWAYOUT; |
|---|
| 43 | +module_param(nowayout, bool, 0); |
|---|
| 44 | +MODULE_PARM_DESC(nowayout, |
|---|
| 45 | + "Watchdog cannot be stopped once started (default=" |
|---|
| 46 | + __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |
|---|
| 46 | 47 | |
|---|
| 47 | 48 | #ifdef CONFIG_PPC_FSL_BOOK3E |
|---|
| 48 | 49 | |
|---|
| .. | .. |
|---|
| 219 | 220 | static int __init booke_wdt_init(void) |
|---|
| 220 | 221 | { |
|---|
| 221 | 222 | int ret = 0; |
|---|
| 222 | | - bool nowayout = WATCHDOG_NOWAYOUT; |
|---|
| 223 | 223 | |
|---|
| 224 | 224 | pr_info("powerpc book-e watchdog driver loaded\n"); |
|---|
| 225 | 225 | booke_wdt_info.firmware_version = cur_cpu_spec->pvr_value; |
|---|