diff mbox

[U-Boot] rockchip: spl: RK3399: add COUNTER_FREQUENCY define to rk3399_common.h

Message ID 1490308065-12420-1-git-send-email-philipp.tomsich@theobroma-systems.com
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Philipp Tomsich March 23, 2017, 10:27 p.m. UTC
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(+)

Comments

Kever Yang March 24, 2017, 3:39 a.m. UTC | #1
Hi Philipp,

On 03/24/2017 06:27 AM, Philipp Tomsich wrote:
> 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

Reveiwed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
Simon Glass March 26, 2017, 3:47 a.m. UTC | #2
On 23 March 2017 at 21:39, Kever Yang <kever.yang@rock-chips.com> wrote:
> Hi Philipp,
>
> On 03/24/2017 06:27 AM, Philipp Tomsich wrote:
>>
>> 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
>
>
> Reveiwed-by: Kever Yang <kever.yang@rock-chips.com>

Acked-by: Simon Glass <sjg@chromium.org>
Simon Glass April 2, 2017, 12:05 a.m. UTC | #3
On 25 March 2017 at 21:47, Simon Glass <sjg@chromium.org> wrote:
> On 23 March 2017 at 21:39, Kever Yang <kever.yang@rock-chips.com> wrote:
>> Hi Philipp,
>>
>> On 03/24/2017 06:27 AM, Philipp Tomsich wrote:
>>>
>>> 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
>>
>>
>> Reveiwed-by: Kever Yang <kever.yang@rock-chips.com>
>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-rockchip, thanks!
diff mbox

Patch

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