ARM64: zynqmp: Setup correct COUNTER_FREQUENCY for silicon
authorMichal Simek <michal.simek@xilinx.com>
Thu, 5 Nov 2015 07:32:14 +0000 (08:32 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 27 Jan 2016 14:55:57 +0000 (15:55 +0100)
When U-Boot runs from EL3 system timer is setup based on this macro.
Software default freq for silicon is 100MHz but enable opton to rewrite
it. Emulation platform is using 4MHz.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
include/configs/xilinx_zynqmp.h
include/configs/xilinx_zynqmp_ep.h

index ac68998aeb9025fd41efd6f16e7e9a298f1d5c13..dcd7552bd1ada622393326077730d142c36d554a 100644 (file)
@@ -43,7 +43,9 @@
 #define CONFIG_OF_LIBFDT
 
 /* Generic Timer Definitions - setup in EL3. Setup by ATF for other cases */
-#define COUNTER_FREQUENCY              4000000
+#if !defined(COUNTER_FREQUENCY)
+# define COUNTER_FREQUENCY             100000000
+#endif
 
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 0x2000000)
index 0204d2c593202b1bf395ebd1e35bb73d0ca249b9..9906c426f50f05d135f64a70f1dd1e17c2e4c9e0 100644 (file)
@@ -28,6 +28,8 @@
 #define CONFIG_SYS_SDRAM_BASE          0
 #define CONFIG_SYS_SDRAM_SIZE          0x40000000
 
+#define COUNTER_FREQUENCY      4000000
+
 #include <configs/xilinx_zynqmp.h>
 
 #endif /* __CONFIG_ZYNQMP_EP_H */