powerpc: mpc85xx: Fix compilation with CONFIG_WDT
PATCH 1/1 powerpc: mpc85xx: Fix compilation with CONFIG_WDT
When CONFIG_WDT is enabled then non-DM watchdog code cannot be used due to conflicting functions like watchdog_reset(). So disable compilation of mpc85xx watchdog_reset() function when CONFIG_WDT is enabled.
Signed-off-by Pali Rohár <[email protected]>
--- arch/powerpc/cpu/mpc85xx/cpu.c | 2 ++ 1 file changed, 2 insertions(+)
arch/powerpc/cpu/mpc85xx/cpu.c +2 -0
@@ -348,6 +348,7 @@ __weak unsigned long get_tbclk(void) } +#ifndef CONFIG_WDT #if defined(CONFIG_WATCHDOG )#define WATCHDOG_MASK (TCR_WP(63) | TCR_WRC(3) | TCR_WIE)void
@@ -376,6 +377,7 @@ watchdog_reset(void)enable_interrupts (); }#endif /* CONFIG_WATCHDOG */ +#endif /* * Initializes on-chip MMC controllers.
Signature · 1 line
2.20.1
PING
Quoted 32 lines · On Thursday 28 April 2022 13:31:43 Pali Rohár wrote:
When
CONFIG_WDTis enabled then non-DM watchdog code cannot be used due to conflicting functions likewatchdog_reset(). So disable compilation of mpc85xxwatchdog_reset()function whenCONFIG_WDTis enabled.Signed-off-by Pali Rohár <[email protected]>--- arch/powerpc/cpu/mpc85xx/cpu.c | 2 ++ 1 file changed, 2 insertions(+)arch/powerpc/cpu/mpc85xx/cpu.c +2
-0@@ -348,6 +348,7 @@ __weak unsigned long get_tbclk(void) } +#ifndef CONFIG_WDT #if defined(CONFIG_WATCHDOG )#define WATCHDOG_MASK (TCR_WP(63) | TCR_WRC(3) | TCR_WIE)void @@ -376,6 +377,7 @@ watchdog_reset(void)enable_interrupts (); }#endif /* CONFIG_WATCHDOG */ +#endif /* * Initializes on-chip MMC controllers. Signature · 1 line
2.20.1