diff mbox

[U-Boot,v2,26/56] rockchip: rk3368: spl: define COUNTER_FREQUENCY to 24MHz

Message ID 1501065662-52029-27-git-send-email-philipp.tomsich@theobroma-systems.com
State Superseded
Delegated to: Philipp Tomsich
Headers show

Commit Message

Philipp Tomsich July 26, 2017, 10:40 a.m. UTC
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>
---

Changes in v2: None

 include/configs/rk3368_common.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Simon Glass July 28, 2017, 3:38 a.m. UTC | #1
On 26 July 2017 at 04:40, Philipp Tomsich
<philipp.tomsich@theobroma-systems.com> wrote:
> 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>
> ---
>
> Changes in v2: None
>
>  include/configs/rk3368_common.h | 2 ++
>  1 file changed, 2 insertions(+)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

diff --git a/include/configs/rk3368_common.h b/include/configs/rk3368_common.h
index b0c858c..ddb7df0 100644
--- a/include/configs/rk3368_common.h
+++ b/include/configs/rk3368_common.h
@@ -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