rockchip: spl: RK3399: add COUNTER_FREQUENCY define to rk3399_common.h
PATCH 1/1 rockchip: spl: RK3399: add COUNTER_FREQUENCY define to rk3399_common.h
The BootROM of the RK3399 SoC does not initialise the cntfrq_el0 (which holds the value 0 (zero) on entry into the SPL. This causes the timebase for U-Boot not to advance (and will cause a hang where a timeout would be expected... e.g. if something goes wrong during MMC/SD card startup).
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 necessary).
---
include/configs/rk3399_common.h | 2 ++ 1 file changed, 2 insertions(+)
include/configs/rk3399_common.h +2 -0
@@ -19,6 +19,8 @@#define CONFIG_SPL_DRIVERS_MISC_SUPPORT #define CONFIG_SPL_SERIAL_SUPPORT +#define COUNTER_FREQUENCY 24000000 +#define CONFIG_SYS_NS16550_MEM32 #define CONFIG_SYS_TEXT_BASE 0x00200000
Signature · 1 line
1.9.1
PATCH 1/1 rockchip: spl: RK3399: add COUNTER_FREQUENCY define to rk3399_common.h
Hi Philipp,
Quoted 19 lines · Philipp Tomsich
The BootROM of the RK3399 SoC does not initialise the
cntfrq_el0(which holds the value 0 (zero) on entry into the SPL. This causes the timebase for U-Boot not to advance (and will cause a hang where a timeout would be expected... e.g. if something goes wrong during MMC/SD card startup).This change defines
COUNTER_FREQUENCY, which is used by the AArch64 init code inarch/arm/cpu/armv8/start.Sto set upcntfrq_el0(if necessary).Signed-off-by Philipp Tomsich <[email protected]>---
include/configs/rk3399_common.h | 2 ++ 1 file changed, 2 insertions(+)include/configs/rk3399_common.h +0
-0
include/configs/rk3399_common.h line 26
Quoted 8 lines
include/configs/rk3399_common.h +2
-0@@ -19,6 +19,8 @@#define CONFIG_SPL_DRIVERS_MISC_SUPPORT #define CONFIG_SPL_SERIAL_SUPPORT +#define COUNTER_FREQUENCY 24000000 +#define CONFIG_SYS_NS16550_MEM32 #define CONFIG_SYS_TEXT_BASE 0x00200000
Thanks,
- Kever
PATCH 1/1 rockchip: spl: RK3399: add COUNTER_FREQUENCY define to rk3399_common.h
Quoted 18 lines · Kever Yang
Hi Philipp,
Quoted 15 lines · Philipp Tomsich
The BootROM of the RK3399 SoC does not initialise the
cntfrq_el0(which holds the value 0 (zero) on entry into the SPL. This causes the timebase for U-Boot not to advance (and will cause a hang where a timeout would be expected... e.g. if something goes wrong during MMC/SD card startup).This change defines
COUNTER_FREQUENCY, which is used by the AArch64 init code inarch/arm/cpu/armv8/start.Sto set upcntfrq_el0(if necessary).Signed-off-by Philipp Tomsich <[email protected]>---
include/configs/rk3399_common.h | 2 ++ 1 file changed, 2 insertions(+)
Quoted 15 lines
include/configs/rk3399_common.h line 24
Quoted 12 lines
include/configs/rk3399_common.h +1
-0@@ -19,6 +19,8 @@#define CONFIG_SPL_DRIVERS_MISC_SUPPORT #define CONFIG_SPL_SERIAL_SUPPORT +#define COUNTER_FREQUENCY 24000000 +#define CONFIG_SYS_NS16550_MEM32 #define CONFIG_SYS_TEXT_BASE 0x00200000Reveiwed-by Kever Yang <[email protected]>
PATCH 1/1 rockchip: spl: RK3399: add COUNTER_FREQUENCY define to rk3399_common.h
Quoted 35 lines · Simon Glass
Quoted 18 lines · Kever Yang
Hi Philipp,
Quoted 15 lines · Philipp Tomsich
The BootROM of the RK3399 SoC does not initialise the
cntfrq_el0(which holds the value 0 (zero) on entry into the SPL. This causes the timebase for U-Boot not to advance (and will cause a hang where a timeout would be expected... e.g. if something goes wrong during MMC/SD card startup).This change defines
COUNTER_FREQUENCY, which is used by the AArch64 init code inarch/arm/cpu/armv8/start.Sto set upcntfrq_el0(if necessary).Signed-off-by Philipp Tomsich <[email protected]>---
include/configs/rk3399_common.h | 2 ++ 1 file changed, 2 insertions(+)Quoted 15 lines
include/configs/rk3399_common.h line 24
Quoted 12 lines
include/configs/rk3399_common.h +1
-0@@ -19,6 +19,8 @@#define CONFIG_SPL_DRIVERS_MISC_SUPPORT #define CONFIG_SPL_SERIAL_SUPPORT +#define COUNTER_FREQUENCY 24000000 +#define CONFIG_SYS_NS16550_MEM32 #define CONFIG_SYS_TEXT_BASE 0x00200000Reveiwed-by Kever Yang <[email protected]>
Quoted 1 line
Acked-by Simon Glass <[email protected]>
Applied to u-boot-rockchip, thanks!