* [PATCH linux dev-4.13] watchdog: aspeed: Clear secondary boot flag before restart
@ 2018-03-15 15:48 Eddie James
2018-03-19 2:21 ` Joel Stanley
0 siblings, 1 reply; 2+ messages in thread
From: Eddie James @ 2018-03-15 15:48 UTC (permalink / raw)
To: openbmc; +Cc: joel, Eddie James
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@linux.vnet.ibm.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH linux dev-4.13] watchdog: aspeed: Clear secondary boot flag before restart
2018-03-15 15:48 [PATCH linux dev-4.13] watchdog: aspeed: Clear secondary boot flag before restart Eddie James
@ 2018-03-19 2:21 ` Joel Stanley
0 siblings, 0 replies; 2+ messages in thread
From: Joel Stanley @ 2018-03-19 2:21 UTC (permalink / raw)
To: Eddie James; +Cc: OpenBMC Maillist
On Fri, Mar 16, 2018 at 2:18 AM, Eddie James <eajames@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@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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-19 2:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-15 15:48 [PATCH linux dev-4.13] watchdog: aspeed: Clear secondary boot flag before restart Eddie James
2018-03-19 2:21 ` Joel Stanley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.