public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] rockchip: spl: RK3399: add COUNTER_FREQUENCY define to rk3399_common.h
@ 2017-03-23 22:27 Philipp Tomsich
  2017-03-24  3:39 ` Kever Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Tomsich @ 2017-03-23 22:27 UTC (permalink / raw)
  To: u-boot

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).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---

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

diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
index aeee805..c44f8ad 100644
--- a/include/configs/rk3399_common.h
+++ b/include/configs/rk3399_common.h
@@ -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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-02  0:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-23 22:27 [U-Boot] [PATCH] rockchip: spl: RK3399: add COUNTER_FREQUENCY define to rk3399_common.h Philipp Tomsich
2017-03-24  3:39 ` Kever Yang
2017-03-26  3:47   ` Simon Glass
2017-04-02  0:05     ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox