Re: [PATCH v5 4/4] clk: samsung: add top clock support for ExynosAuto v920 SoC

From: Kwanghoon Son
Date: Mon Aug 12 2024 - 00:40:09 EST


On Tue, 2024-07-30 at 16:12 +0900, Sunyeal Hong wrote:
> This adds support for CMU_TOP which generates clocks for all the
> function blocks such as CORE, HSI0/1/2, PERIC0/1 and so on. For
> CMU_TOP, PLL_SHARED0,1,2,3,4 and 5 will be the sources of this block
> and they will generate bus clocks.
>
> Signed-off-by: Sunyeal Hong <sunyeal.hong@xxxxxxxxxxx>
> ---
> drivers/clk/samsung/Makefile | 1 +
> drivers/clk/samsung/clk-exynosautov920.c | 1173 ++++++++++++++++++++++
> 2 files changed, 1174 insertions(+)
> create mode 100644 drivers/clk/samsung/clk-exynosautov920.c
>

[snip]

> +static const struct samsung_cmu_info peric0_cmu_info __initconst = {
> + .mux_clks = peric0_mux_clks,
> + .nr_mux_clks = ARRAY_SIZE(peric0_mux_clks),
> + .div_clks = peric0_div_clks,
> + .nr_div_clks = ARRAY_SIZE(peric0_div_clks),
> + .nr_clk_ids = CLKS_NR_PERIC0,
> + .clk_regs = peric0_clk_regs,
> + .nr_clk_regs = ARRAY_SIZE(peric0_clk_regs),
> + .clk_name = "dout_clkcmu_peric0_noc",

Maybe silly question, (I'm really new to this cmu).
Isn't it should be "noc"?

I thought this name is from dt binding.
(drivers/clk/samsung/clk-exynos-arm64.c)


parent_clk = clk_get(dev, cmu->clk_name);
data = dev_get_drvdata(dev);

That's why GS101, and my recent v9 patch name like "bus".

Best regards,
kwang.

> +};
> +
> +static int __init exynosautov920_cmu_probe(struct platform_device *pdev)
> +{
> + const struct samsung_cmu_info *info;
> + struct device *dev = &pdev->dev;
> +
> + info = of_device_get_match_data(dev);
> + exynos_arm64_register_cmu(dev, dev->of_node, info);
> +
> + return 0;
> +}
> +
> +static const struct of_device_id exynosautov920_cmu_of_match[] = {
> + {
> + .compatible = "samsung,exynosautov920-cmu-peric0",
> + .data = &peric0_cmu_info,
> + },
> +};
> +
> +static struct platform_driver exynosautov920_cmu_driver __refdata = {
> + .driver = {
> + .name = "exynosautov920-cmu",
> + .of_match_table = exynosautov920_cmu_of_match,
> + .suppress_bind_attrs = true,
> + },
> + .probe = exynosautov920_cmu_probe,
> +};
> +
> +static int __init exynosautov920_cmu_init(void)
> +{
> + return platform_driver_register(&exynosautov920_cmu_driver);
> +}
> +core_initcall(exynosautov920_cmu_init);