diff mbox

[U-Boot,16/23] ARM64: zynqmp: Setup correct COUNTER_FREQUENCY for silicon

Message ID 07e5f470a7f1b6d53b33a0c8f4486845df165471.1452779188.git.michal.simek@xilinx.com
State Accepted
Commit 713b616459eb0d8a7805e31f4b8e9a6fe786b3aa
Delegated to: Michal Simek
Headers show

Commit Message

Michal Simek Jan. 14, 2016, 1:46 p.m. UTC
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    | 4 +++-
 include/configs/xilinx_zynqmp_ep.h | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index ac68998aeb90..dcd7552bd1ad 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -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)
diff --git a/include/configs/xilinx_zynqmp_ep.h b/include/configs/xilinx_zynqmp_ep.h
index 0204d2c59320..9906c426f50f 100644
--- a/include/configs/xilinx_zynqmp_ep.h
+++ b/include/configs/xilinx_zynqmp_ep.h
@@ -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 */