rockchip: rk3368: spl: define COUNTER_FREQUENCY to 24MHz
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Thu, 22 Jun 2017 21:31:55 +0000 (23:31 +0200)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Sun, 13 Aug 2017 15:12:22 +0000 (17:12 +0200)
The BootROM of the RK3368 Boot ROM does not initialise cntfrq_el0.
This change defines COUNTER_FREQUENCY, which is used by the AArch64 init
code in arch/arm/cpu/armv8/start.S to set up cntfrq_el0.

If the counter-frequency is not correctly set up, the calculation of
delays using the ARMv8 generic timer can not work correctly.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/configs/rk3368_common.h

index b0c858c693cecb18f13e28b42fd59c11414d9916..ddb7df0b66714c5859fc9e8625af91aeafc381e3 100644 (file)
@@ -21,6 +21,8 @@
 #define CONFIG_SYS_CBSIZE              1024
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
+#define COUNTER_FREQUENCY               24000000
+
 #define CONFIG_SYS_NS16550_MEM32
 
 #define CONFIG_SYS_TEXT_BASE           0x00200000