* [U-Boot] [PATCH 0/1] rk3328: clk: Configure CPU clock during initialization
@ 2019-10-10 19:28 Simon South
2019-10-10 19:28 ` [U-Boot] [PATCH 1/1] clk: rockchip: rk3328: Configure CPU clock Simon South
0 siblings, 1 reply; 4+ messages in thread
From: Simon South @ 2019-10-10 19:28 UTC (permalink / raw)
To: u-boot
This patch changes the RK3328 CRU driver so it explicitly configures
the CPU clock during initialization, through a call to
rk3328_configure_cpu().
Previously rk3328_configure_cpu() was implemented but not called from
anywhere, which I'm assuming was unintentional.
This change matches the RK3399's CRU driver
(drivers/clk/rockchip/clk_rk3399.c) by
- Invoking the function at the start of rkclk_init() and
- Setting the CPU clock to the lowest defined frequency, 600 MHz.
It yields no real functional change (the CPU clock is already set to
600 MHz at power-on) but it does make it straightforward to set a
higher clock rate at compile time for systems like the ROCK64 that run
reliably at higher frequencies.
Tested on my ROCK64.
Simon South (1):
clk: rockchip: rk3328: Configure CPU clock
arch/arm/include/asm/arch-rockchip/cru_rk3328.h | 3 +++
drivers/clk/rockchip/clk_rk3328.c | 2 ++
2 files changed, 5 insertions(+)
--
2.23.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 1/1] clk: rockchip: rk3328: Configure CPU clock
2019-10-10 19:28 [U-Boot] [PATCH 0/1] rk3328: clk: Configure CPU clock during initialization Simon South
@ 2019-10-10 19:28 ` Simon South
2019-10-14 9:06 ` Kever Yang
0 siblings, 1 reply; 4+ messages in thread
From: Simon South @ 2019-10-10 19:28 UTC (permalink / raw)
To: u-boot
Add a call to rk3328_configure_cpu() during initialization to set the
CPU-clock frequency.
Signed-off-by: Simon South <simon@simonsouth.net>
---
arch/arm/include/asm/arch-rockchip/cru_rk3328.h | 3 +++
drivers/clk/rockchip/clk_rk3328.c | 2 ++
2 files changed, 5 insertions(+)
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3328.h b/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
index 15b9788d9c..4bf69dbe08 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
@@ -66,4 +66,7 @@ enum apll_frequencies {
APLL_600_MHZ,
};
+void rk3328_configure_cpu(struct rk3328_cru *cru,
+ enum apll_frequencies apll_freq);
+
#endif /* __ASM_ARCH_CRU_RK3328_H_ */
diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
index a89e2ecc4a..4331048a87 100644
--- a/drivers/clk/rockchip/clk_rk3328.c
+++ b/drivers/clk/rockchip/clk_rk3328.c
@@ -282,6 +282,8 @@ static void rkclk_init(struct rk3328_cru *cru)
u32 hclk_div;
u32 pclk_div;
+ rk3328_configure_cpu(cru, APLL_600_MHZ);
+
/* configure gpll cpll */
rkclk_set_pll(cru, CLK_GENERAL, &gpll_init_cfg);
rkclk_set_pll(cru, CLK_CODEC, &cpll_init_cfg);
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 1/1] clk: rockchip: rk3328: Configure CPU clock
2019-10-10 19:28 ` [U-Boot] [PATCH 1/1] clk: rockchip: rk3328: Configure CPU clock Simon South
@ 2019-10-14 9:06 ` Kever Yang
2019-10-14 9:54 ` [U-Boot] [PATCH 1/1] clk: rockchip: rk3328: Configure CPU clock【请注意,邮件由u-boot-bounces@lists.denx.de代发】 Kever Yang
0 siblings, 1 reply; 4+ messages in thread
From: Kever Yang @ 2019-10-14 9:06 UTC (permalink / raw)
To: u-boot
On 2019/10/11 上午3:28, Simon South wrote:
> Add a call to rk3328_configure_cpu() during initialization to set the
> CPU-clock frequency.
>
> Signed-off-by: Simon South <simon@simonsouth.net>
Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> arch/arm/include/asm/arch-rockchip/cru_rk3328.h | 3 +++
> drivers/clk/rockchip/clk_rk3328.c | 2 ++
> 2 files changed, 5 insertions(+)
>
> diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3328.h b/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
> index 15b9788d9c..4bf69dbe08 100644
> --- a/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
> +++ b/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
> @@ -66,4 +66,7 @@ enum apll_frequencies {
> APLL_600_MHZ,
> };
>
> +void rk3328_configure_cpu(struct rk3328_cru *cru,
> + enum apll_frequencies apll_freq);
> +
> #endif /* __ASM_ARCH_CRU_RK3328_H_ */
> diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
> index a89e2ecc4a..4331048a87 100644
> --- a/drivers/clk/rockchip/clk_rk3328.c
> +++ b/drivers/clk/rockchip/clk_rk3328.c
> @@ -282,6 +282,8 @@ static void rkclk_init(struct rk3328_cru *cru)
> u32 hclk_div;
> u32 pclk_div;
>
> + rk3328_configure_cpu(cru, APLL_600_MHZ);
> +
> /* configure gpll cpll */
> rkclk_set_pll(cru, CLK_GENERAL, &gpll_init_cfg);
> rkclk_set_pll(cru, CLK_CODEC, &cpll_init_cfg);
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 1/1] clk: rockchip: rk3328: Configure CPU clock【请注意,邮件由u-boot-bounces@lists.denx.de代发】
2019-10-14 9:06 ` Kever Yang
@ 2019-10-14 9:54 ` Kever Yang
0 siblings, 0 replies; 4+ messages in thread
From: Kever Yang @ 2019-10-14 9:54 UTC (permalink / raw)
To: u-boot
On 2019/10/14 下午5:06, Kever Yang wrote:
>
> On 2019/10/11 上午3:28, Simon South wrote:
>> Add a call to rk3328_configure_cpu() during initialization to set the
>> CPU-clock frequency.
>>
>> Signed-off-by: Simon South <simon@simonsouth.net>
>
> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
Applied to u-boot-rockchip master.
>
>
> Thanks,
> - Kever
>> ---
>> arch/arm/include/asm/arch-rockchip/cru_rk3328.h | 3 +++
>> drivers/clk/rockchip/clk_rk3328.c | 2 ++
>> 2 files changed, 5 insertions(+)
>>
>> diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
>> b/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
>> index 15b9788d9c..4bf69dbe08 100644
>> --- a/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
>> +++ b/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
>> @@ -66,4 +66,7 @@ enum apll_frequencies {
>> APLL_600_MHZ,
>> };
>> +void rk3328_configure_cpu(struct rk3328_cru *cru,
>> + enum apll_frequencies apll_freq);
>> +
>> #endif /* __ASM_ARCH_CRU_RK3328_H_ */
>> diff --git a/drivers/clk/rockchip/clk_rk3328.c
>> b/drivers/clk/rockchip/clk_rk3328.c
>> index a89e2ecc4a..4331048a87 100644
>> --- a/drivers/clk/rockchip/clk_rk3328.c
>> +++ b/drivers/clk/rockchip/clk_rk3328.c
>> @@ -282,6 +282,8 @@ static void rkclk_init(struct rk3328_cru *cru)
>> u32 hclk_div;
>> u32 pclk_div;
>> + rk3328_configure_cpu(cru, APLL_600_MHZ);
>> +
>> /* configure gpll cpll */
>> rkclk_set_pll(cru, CLK_GENERAL, &gpll_init_cfg);
>> rkclk_set_pll(cru, CLK_CODEC, &cpll_init_cfg);
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-14 9:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-10 19:28 [U-Boot] [PATCH 0/1] rk3328: clk: Configure CPU clock during initialization Simon South
2019-10-10 19:28 ` [U-Boot] [PATCH 1/1] clk: rockchip: rk3328: Configure CPU clock Simon South
2019-10-14 9:06 ` Kever Yang
2019-10-14 9:54 ` [U-Boot] [PATCH 1/1] clk: rockchip: rk3328: Configure CPU clock【请注意,邮件由u-boot-bounces@lists.denx.de代发】 Kever Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox