watchdog: mpc8xx: Revert the 8xx watchdog back to CONFIG_HW_WATCHDOG
Subsystems (2)
PATCH 1/1 watchdog: mpc8xx: Revert the 8xx watchdog back to CONFIG_HW_WATCHDOG
Commit f3729ba6e7b2 ("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 b3134ffbd944 ("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.
--- arch/powerpc/cpu/mpc8xx/Kconfig | 4 ---- drivers/watchdog/Kconfig | 2 +- drivers/watchdog/mpc8xx_wdt.c | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-)
arch/powerpc/cpu/mpc8xx/Kconfig +0 -4
@@ -25,10 +25,6 @@ config MPC885 endchoice -#config MPC8xx_WATCHDOG -# bool "Watchdog" -# select HW_WATCHDOG - config 8xx_GCLK_FREQ int "CPU GCLK Frequency"
drivers/watchdog/Kconfig +1 -1
@@ -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
drivers/watchdog/mpc8xx_wdt.c +1 -1
@@ -11,7 +11,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 ;
Signature · 1 line
2.25.0
PATCH 1/1 watchdog: mpc8xx: Revert the 8xx watchdog back to CONFIG_HW_WATCHDOG
Quoted 18 lines · Christophe Leroy
Commit
f3729ba6e7b2("watchdog:mpc8xx_wdt: Watchdog driver and macros cleanup") switched the watchdog toCONFIG_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_WATCHDOGand makehw_watchdog_reset()visible.Meanwhile, finalise the cleanup of
arch/powerpc/cpu/mpc8xx/Kconfigby removing the lines put in comment in that commit, and also remove again the selection ofCONFIG_MPC8xx_WATCHDOGwhich was removed by that commit and brought back by mistake by commitb3134ffbd944("watchdog:Kconfig: Sort entry alphabetically")Note that there was an 'imply WATCHDOG' in the original commit but it disappeared in the
Kconfigalphabetical sorting, so no need to remove it here.
Quoted 5 lines
Fixes f3729ba6e7b2 ("watchdog: mpc8xx_wdt: Watchdog driver and macros cleanup")Fixes b3134ffbd944 ("watchdog: Kconfig: Sort entry alphabetically")Signed-off-by Christophe Leroy <[email protected]>Cc Stefan Roese <[email protected]>Cc Patrice Chotard <[email protected]>
Thanks,
Stefan
PATCH 1/1 watchdog: mpc8xx: Revert the 8xx watchdog back to CONFIG_HW_WATCHDOG
In reply to Christophe LeroyQuoted 18 lines · Christophe Leroy
Commit
f3729ba6e7b2("watchdog:mpc8xx_wdt: Watchdog driver and macros cleanup") switched the watchdog toCONFIG_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_WATCHDOGand makehw_watchdog_reset()visible.Meanwhile, finalise the cleanup of
arch/powerpc/cpu/mpc8xx/Kconfigby removing the lines put in comment in that commit, and also remove again the selection ofCONFIG_MPC8xx_WATCHDOGwhich was removed by that commit and brought back by mistake by commitb3134ffbd944("watchdog:Kconfig: Sort entry alphabetically")Note that there was an 'imply WATCHDOG' in the original commit but it disappeared in the
Kconfigalphabetical sorting, so no need to remove it here.
Quoted 6 lines
Fixes f3729ba6e7b2 ("watchdog: mpc8xx_wdt: Watchdog driver and macros cleanup")Fixes b3134ffbd944 ("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]>
Please note that as-is this causes a build failure:
+(MCR3000) In file included from ../arch/powerpc/cpu/mpc8xx/cpu.c:23:0:
+(MCR3000) ../include/watchdog.h:32:4: error: #error "Configuration error: CONFIG_HW_WATCHDOG and CONFIG_WATCHDOG can't be used together." +(MCR3000) # error "Configuration error: CONFIG_HW_WATCHDOG and CONFIG_WATCHDOG can't be used together."
+(MCR3000) ^~~~~
+(MCR3000) make[2]: *** [arch/powerpc/cpu/mpc8xx/cpu.o] Error 1
+(MCR3000) make[1]: *** [arch/powerpc/cpu/mpc8xx] Error 2
+(MCR3000) make: *** [sub-make] Error 2
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200225/28fc7b2d/attachment.sig>
PATCH 1/1 watchdog: mpc8xx: Revert the 8xx watchdog back to CONFIG_HW_WATCHDOG
Le 25/02/2020 ? 17:40, Tom Rini a ?crit?:
Quoted 29 lines · Christophe Leroy
Quoted 19 lines
Commit
f3729ba6e7b2("watchdog:mpc8xx_wdt: Watchdog driver and macros cleanup") switched the watchdog toCONFIG_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_WATCHDOGand makehw_watchdog_reset()visible.Meanwhile, finalise the cleanup of
arch/powerpc/cpu/mpc8xx/Kconfigby removing the lines put in comment in that commit, and also remove again the selection ofCONFIG_MPC8xx_WATCHDOGwhich was removed by that commit and brought back by mistake by commitb3134ffbd944("watchdog:Kconfig: Sort entry alphabetically")Note that there was an 'imply WATCHDOG' in the original commit but it disappeared in the
Kconfigalphabetical sorting, so no need to remove it here.Quoted 6 lines
Fixes f3729ba6e7b2 ("watchdog: mpc8xx_wdt: Watchdog driver and macros cleanup")Fixes b3134ffbd944 ("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]>Please note that as-is this causes a build failure:
Review
Quoted 7 lines
(quoted diff) +7
-0+(MCR3000) In file included from ../arch/powerpc/cpu/mpc8xx/cpu.c:23:0: +(MCR3000) ../include/watchdog.h:32:4: error: #error "Configuration error: CONFIG_HW_WATCHDOG and CONFIG_WATCHDOG can't be used together." +(MCR3000) # error "Configuration error: CONFIG_HW_WATCHDOG and CONFIG_WATCHDOG can't be used together." +(MCR3000) ^~~~~ +(MCR3000) make[2]: *** [arch/powerpc/cpu/mpc8xx/cpu.o] Error 1 +(MCR3000) make[1]: *** [arch/powerpc/cpu/mpc8xx] Error 2 +(MCR3000) make: *** [sub-make] Error 2
Right.
CONFIG_HW_WATCHDOG and CONFIG_WATCHDOG are mutually exclusive but CONFIG_WDT implicitely selects CONFIG_WATCHDOG since commit 06985289d452 ("watchdog: Implement generic watchdog_reset() version")
I've just sent a patch to fix that. Please take both together.
Christophe
PATCH 1/1 watchdog: mpc8xx: Revert the 8xx watchdog back to CONFIG_HW_WATCHDOG
In reply to Christophe LeroyQuoted 18 lines · Christophe Leroy
Commit
f3729ba6e7b2("watchdog:mpc8xx_wdt: Watchdog driver and macros cleanup") switched the watchdog toCONFIG_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_WATCHDOGand makehw_watchdog_reset()visible.Meanwhile, finalise the cleanup of
arch/powerpc/cpu/mpc8xx/Kconfigby removing the lines put in comment in that commit, and also remove again the selection ofCONFIG_MPC8xx_WATCHDOGwhich was removed by that commit and brought back by mistake by commitb3134ffbd944("watchdog:Kconfig: Sort entry alphabetically")Note that there was an 'imply WATCHDOG' in the original commit but it disappeared in the
Kconfigalphabetical sorting, so no need to remove it here.
Quoted 6 lines
Fixes f3729ba6e7b2 ("watchdog: mpc8xx_wdt: Watchdog driver and macros cleanup")Fixes b3134ffbd944 ("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]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200228/2fb2be42/attachment.sig>