]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
powerpc: mpc85xx: Fix compilation with CONFIG_WDT
authorPali Rohár <pali@kernel.org>
Thu, 28 Apr 2022 11:31:43 +0000 (13:31 +0200)
committerPeng Fan <peng.fan@nxp.com>
Mon, 20 Jun 2022 01:18:26 +0000 (09:18 +0800)
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

index a82516a75bdc6c3271817feb52d215b86e83a7bd..ba9736ebef45c6a2ec7f98947c619c168fad8fc6 100644 (file)
@@ -344,6 +344,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
@@ -372,6 +373,7 @@ watchdog_reset(void)
                enable_interrupts();
 }
 #endif /* CONFIG_WATCHDOG */
+#endif
 
 /*
  * Initializes on-chip MMC controllers.