aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorEugen Hristev <eugen.hristev@microchip.com>2020-08-20 16:11:52 +0300
committerEugen Hristev <eugen.hristev@microchip.com>2020-09-22 11:27:18 +0300
commit919c4f3639dba6e516591e8024a9392254744635 (patch)
treef2c4f326cced6e9f6043e4afc109e69ebed6bc56 /arch/arm/mach-at91
parent68d3ec599edff1c7ead539820efbc2234fb965ed (diff)
downloadu-boot-919c4f3639dba6e516591e8024a9392254744635.zip
u-boot-919c4f3639dba6e516591e8024a9392254744635.tar.gz
u-boot-919c4f3639dba6e516591e8024a9392254744635.tar.bz2
ARM: at91: common: guard ATMEL_PIT code by ifdef
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>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/armv7/cpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/armv7/cpu.c b/arch/arm/mach-at91/armv7/cpu.c
index a8f4356..8b73550 100644
--- a/arch/arm/mach-at91/armv7/cpu.c
+++ b/arch/arm/mach-at91/armv7/cpu.c
@@ -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)