[PATCH linux dev-4.13] watchdog: aspeed: Clear secondary boot flag before restart
Joel Stanley
joel at jms.id.au
Mon Mar 19 13:21:46 AEDT 2018
On Fri, Mar 16, 2018 at 2:18 AM, Eddie James <eajames at linux.vnet.ibm.com> wrote:
> If a watchdog device is configured to boot from the secondary boot
> source upon timeout, and that watchdog is used as the restart device,
> then the system will switch chips on every reboot. This is not desired.
> Clear the secondary boot bit from the watchdog control register before
> restarting the system.
>
> Fixes: 30e055280e3a ("watchdog: aspeed: Allow configuring for alternate boot")
> Signed-off-by: Eddie James <eajames at linux.vnet.ibm.com>
Thanks, I merged in the upstream commit.
Cheers,
Joel
> ---
> drivers/watchdog/aspeed_wdt.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c
> index f41d246..a5b8eb2 100644
> --- a/drivers/watchdog/aspeed_wdt.c
> +++ b/drivers/watchdog/aspeed_wdt.c
> @@ -159,6 +159,7 @@ static int aspeed_wdt_restart(struct watchdog_device *wdd,
> {
> struct aspeed_wdt *wdt = to_aspeed_wdt(wdd);
>
> + wdt->ctrl &= ~WDT_CTRL_BOOT_SECONDARY;
> aspeed_wdt_enable(wdt, 128 * WDT_RATE_1MHZ / 1000);
>
> mdelay(1000);
> --
> 1.8.3.1
>
More information about the openbmc
mailing list