]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: aspeed: add support for dual boot
authorIvan Mikhaylov <i.mikhaylov@yadro.com>
Wed, 28 Aug 2019 10:24:01 +0000 (13:24 +0300)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Tue, 17 Sep 2019 06:59:13 +0000 (08:59 +0200)
commitee75d7609f2ff93fafc3bbcbc2f9de138db33835
treebc133ab7d038785b930a0acc2647744911f91271
parent2b9340e7a21fb027c3ef513294b123c3a126c2d3
watchdog: aspeed: add support for dual boot

Set WDT_CLEAR_TIMEOUT_AND_BOOT_CODE_SELECTION into WDT_CLEAR_TIMEOUT_STATUS
to clear out boot code source and re-enable access to the primary SPI flash
chip while booted via wdt2 from the alternate chip.

AST2400 datasheet says:
"In the 2nd flash booting mode, all the address mapping to CS0# would be
re-directed to CS1#. And CS0# is not accessible under this mode. To access
CS0#, firmware should clear the 2nd boot mode register in the WDT2 status
register WDT30.bit[1]."

Signed-off-by: Ivan Mikhaylov <i.mikhaylov@yadro.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20190828102402.13155-4-i.mikhaylov@yadro.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/aspeed_wdt.c