arm: common: Make timer configuration conditional
authorSoren Brinkmann <soren.brinkmann@xilinx.com>
Mon, 7 Mar 2016 04:23:39 +0000 (20:23 -0800)
committerSoren Brinkmann <soren.brinkmann@xilinx.com>
Fri, 1 Apr 2016 18:43:45 +0000 (11:43 -0700)
Make the timer configuration conditional on the optional interface being
available.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
plat/arm/common/aarch64/arm_common.c

index c84a65b3ade81ee52972c5e03d50c9e368bcb022..c3b85fd436179c315ee818e0315dbf3b4f8be795 100644 (file)
@@ -137,6 +137,7 @@ uint32_t arm_get_spsr_for_bl33_entry(void)
 /*******************************************************************************
  * Configures access to the system counter timer module.
  ******************************************************************************/
+#ifdef ARM_SYS_TIMCTL_BASE
 void arm_configure_sys_timer(void)
 {
        unsigned int reg_val;
@@ -151,6 +152,7 @@ void arm_configure_sys_timer(void)
        reg_val = (1 << CNTNSAR_NS_SHIFT(PLAT_ARM_NSTIMER_FRAME_ID));
        mmio_write_32(ARM_SYS_TIMCTL_BASE + CNTNSAR, reg_val);
 }
+#endif /* ARM_SYS_TIMCTL_BASE */
 
 /*******************************************************************************
  * Returns ARM platform specific memory map regions.