]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: at91: common: guard ATMEL_PIT code by ifdef
authorEugen Hristev <eugen.hristev@microchip.com>
Thu, 20 Aug 2020 13:11:52 +0000 (16:11 +0300)
committerEugen Hristev <eugen.hristev@microchip.com>
Tue, 22 Sep 2020 08:27:18 +0000 (11:27 +0300)
Atmel PIT timer is not available for next products that
have another timer hardware block.
To be able to use the common at91 code, guard the code that uses PIT
by ifdefs.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
arch/arm/mach-at91/armv7/cpu.c

index a8f4356ce94fdd247e0c01be33711778599f448d..8b7355042baadb7fd6351cced08bba1346cc0424 100644 (file)
@@ -29,6 +29,7 @@ int arch_cpu_init(void)
 
 void arch_preboot_os(void)
 {
+#if (IS_ENABLED(CONFIG_ATMEL_PIT_TIMER))
        ulong cpiv;
        at91_pit_t *pit = (at91_pit_t *)ATMEL_BASE_PIT;
 
@@ -40,6 +41,7 @@ void arch_preboot_os(void)
         * without waiting for wrapping back to 0
         */
        writel(cpiv + 0x1000, &pit->mr);
+#endif
 }
 
 #if defined(CONFIG_DISPLAY_CPUINFO)