[RFC PATCH v1 6/7] clk: treewide: switch to clock dump from clk_ops
Michal Simek
michal.simek at amd.com
Tue May 2 16:02:00 CEST 2023
On 4/27/23 22:37, Igor Prusov wrote:
> Switch to using new dump operation in clock provider drivers instead of
> overriding soc_clk_dump.
>
> Signed-off-by: Igor Prusov <ivprusov at sberdevices.ru>
> ---
> arch/mips/mach-pic32/cpu.c | 23 ---------------
> drivers/clk/aspeed/clk_ast2600.c | 13 ++++-----
> drivers/clk/clk_k210.c | 11 +++-----
> drivers/clk/clk_pic32.c | 39 ++++++++++++++++++++++++++
> drivers/clk/clk_versal.c | 7 ++++-
> drivers/clk/clk_zynq.c | 19 ++++---------
> drivers/clk/clk_zynqmp.c | 13 ++++-----
> drivers/clk/imx/clk-imx8.c | 11 +++-----
> drivers/clk/mvebu/armada-37xx-periph.c | 5 +++-
> drivers/clk/stm32/clk-stm32mp1.c | 29 ++++++-------------
> 10 files changed, 83 insertions(+), 87 deletions(-)
>
> diff --git a/arch/mips/mach-pic32/cpu.c b/arch/mips/mach-pic32/cpu.c
> index de449e3c6a..2875a1ec7c 100644
> --- a/arch/mips/mach-pic32/cpu.c
> +++ b/arch/mips/mach-pic32/cpu.c
> @@ -148,26 +148,3 @@ const char *get_core_name(void)
> return str;
> }
> #endif
> -#ifdef CONFIG_CMD_CLK
> -
> -int soc_clk_dump(void)
> -{
> - int i;
> -
> - printf("PLL Speed: %lu MHz\n",
> - CLK_MHZ(rate(PLLCLK)));
> -
> - printf("CPU Speed: %lu MHz\n", CLK_MHZ(rate(PB7CLK)));
> -
> - printf("MPLL Speed: %lu MHz\n", CLK_MHZ(rate(MPLL)));
> -
> - for (i = PB1CLK; i <= PB7CLK; i++)
> - printf("PB%d Clock Speed: %lu MHz\n", i - PB1CLK + 1,
> - CLK_MHZ(rate(i)));
> -
> - for (i = REF1CLK; i <= REF5CLK; i++)
> - printf("REFO%d Clock Speed: %lu MHz\n", i - REF1CLK + 1,
> - CLK_MHZ(rate(i)));
> - return 0;
> -}
> -#endif
> diff --git a/drivers/clk/aspeed/clk_ast2600.c b/drivers/clk/aspeed/clk_ast2600.c
> index b3cc8392fa..08db21d394 100644
> --- a/drivers/clk/aspeed/clk_ast2600.c
> +++ b/drivers/clk/aspeed/clk_ast2600.c
> @@ -1109,6 +1109,7 @@ struct aspeed_clks {
> const char *name;
> };
>
> +#if IS_ENABLED(CONFIG_CMD_CLK)
> static struct aspeed_clks aspeed_clk_names[] = {
> { ASPEED_CLK_HPLL, "hpll" },
> { ASPEED_CLK_MPLL, "mpll" },
> @@ -1123,18 +1124,12 @@ static struct aspeed_clks aspeed_clk_names[] = {
> { ASPEED_CLK_HUARTX, "huxclk" },
> };
>
> -int soc_clk_dump(void)
> +int ast2600_clk_dump(struct udevice *dev)
static? apply for all below too.
M
More information about the U-Boot
mailing list