Skip to content

Commit

Permalink
watchdog: mpc8xx: Revert the 8xx watchdog back to CONFIG_HW_WATCHDOG
Browse files Browse the repository at this point in the history
Commit f3729ba ("watchdog: mpc8xx_wdt: Watchdog driver and macros
cleanup") switched the watchdog to CONFIG_WATCHDOG. But this is not
compatible with the 8xx because it starts the watchdog HW timer at
reset and must be serviced from the very beginning including while
U-boot is executed in the firmware before relocation in RAM.

Select CONFIG_HW_WATCHDOG and make hw_watchdog_reset() visible.

Meanwhile, finalise the cleanup of arch/powerpc/cpu/mpc8xx/Kconfig by
removing the lines put in comment in that commit, and also remove
again the selection of CONFIG_MPC8xx_WATCHDOG which was removed by
that commit and brought back by mistake by commit b3134ff
("watchdog: Kconfig: Sort entry alphabetically")

Note that there was an 'imply WATCHDOG' in the original commit but
it disappeared in the Kconfig alphabetical sorting, so no need to
remove it here.

Fixes: f3729ba ("watchdog: mpc8xx_wdt: Watchdog driver and macros cleanup")
Fixes: b3134ff ("watchdog: Kconfig: Sort entry alphabetically")
Signed-off-by: Christophe Leroy <[email protected]>
Cc: Stefan Roese <[email protected]>
Cc: Patrice Chotard <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
  • Loading branch information
chleroy authored and trini committed Feb 28, 2020
1 parent 12fdbbe commit a682560
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions arch/powerpc/cpu/mpc8xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ config MPC885

endchoice

#config MPC8xx_WATCHDOG
# bool "Watchdog"
# select HW_WATCHDOG

config 8xx_GCLK_FREQ
int "CPU GCLK Frequency"

Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ config WDT_CORTINA
config WDT_MPC8xx
bool "MPC8xx watchdog timer support"
depends on WDT && MPC8xx
select CONFIG_MPC8xx_WATCHDOG
select HW_WATCHDOG
help
Select this to enable mpc8xx watchdog timer

Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/mpc8xx_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <asm/cpm_8xx.h>
#include <asm/io.h>

static void hw_watchdog_reset(void)
void hw_watchdog_reset(void)
{
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;

Expand Down

0 comments on commit a682560

Please sign in to comment.