public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] powerpc: mpc85xx: Fix compilation with CONFIG_WDT
@ 2022-04-28 11:31 Pali Rohár
  2022-06-04 13:04 ` Pali Rohár
  0 siblings, 1 reply; 2+ messages in thread
From: Pali Rohár @ 2022-04-28 11:31 UTC (permalink / raw)
  To: Priyanka Jain, Wolfgang Denk, Sinan Akman; +Cc: u-boot

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 <pali@kernel.org>
---
 arch/powerpc/cpu/mpc85xx/cpu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index 261f79e40585..226a26ba320a 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -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.
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-04 13:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-28 11:31 [PATCH] powerpc: mpc85xx: Fix compilation with CONFIG_WDT Pali Rohár
2022-06-04 13:04 ` Pali Rohár

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox