Linux clock framework development
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Alim Akhtar <alim.akhtar@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Conor Dooley <conor+dt@kernel.org>,
	Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh@kernel.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] clk: samsung: introduce Exynos2200 clock driver
Date: Tue, 04 Mar 2025 10:19:00 -0800	[thread overview]
Message-ID: <7b182615f1439dd39a17b8e74cf740bf.sboyd@kernel.org> (raw)
In-Reply-To: <20250223115601.723886-4-ivo.ivanov.ivanov1@gmail.com>

Quoting Ivaylo Ivanov (2025-02-23 03:56:00)
> diff --git a/drivers/clk/samsung/clk-exynos2200.c b/drivers/clk/samsung/clk-exynos2200.c
> new file mode 100644
> index 000000000..151bdb35a
> --- /dev/null
> +++ b/drivers/clk/samsung/clk-exynos2200.c
> @@ -0,0 +1,3928 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (C) 2025 Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
> + * Author: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
> + *
> + * Common Clock Framework support for Exynos2200 SoC.
> + */
> +
> +#include <linux/clk.h>

Remove this include because this is a clk provider and not a clk
consumer.

> +#include <linux/clk-provider.h>
> +#include <linux/of.h>
> +#include <linux/platform_device.h>
> +
> +#include <dt-bindings/clock/samsung,exynos2200-cmu.h>
> +
> +#include "clk.h"
> +#include "clk-exynos-arm64.h"
> +
> +/* NOTE: Must be equal to the last clock ID increased by one */
> +#define CLKS_NR_TOP                    (CLK_DOUT_TCXO_DIV4 + 1)
> +#define CLKS_NR_ALIVE                  (CLK_DOUT_ALIVE_DSP_NOC + 1)
> +#define CLKS_NR_PERIS                  (CLK_DOUT_PERIS_DDD_CTRL + 1)
> +#define CLKS_NR_CMGP                   (CLK_DOUT_CMGP_USI6 + 1)
> +#define CLKS_NR_HSI0                   (CLK_DOUT_DIV_CLK_HSI0_EUSB + 1)
[...]
> +
> +static int __init exynos2200_cmu_probe(struct platform_device *pdev)
> +{
> +       const struct samsung_cmu_info *info;
> +       struct device *dev = &pdev->dev;
> +
> +       info = of_device_get_match_data(dev);

Use device APIs to be firmware agnostic: device_get_match_data() 

> +       exynos_arm64_register_cmu(dev, dev->of_node, info);
> +
> +       return 0;
> +}
> +
> +static const struct of_device_id exynos2200_cmu_of_match[] = {
> +       {
> +               .compatible = "samsung,exynos2200-cmu-cmgp",
> +               .data = &cmgp_cmu_info,
> +       }, {
> +               .compatible = "samsung,exynos2200-cmu-hsi0",
> +               .data = &hsi0_cmu_info,
> +       }, {
> +               .compatible = "samsung,exynos2200-cmu-peric0",
> +               .data = &peric0_cmu_info,
> +       }, {
> +               .compatible = "samsung,exynos2200-cmu-peric1",
> +               .data = &peric1_cmu_info,
> +       }, {
> +               .compatible = "samsung,exynos2200-cmu-peric2",
> +               .data = &peric2_cmu_info,
> +       }, {
> +               .compatible = "samsung,exynos2200-cmu-ufs",
> +               .data = &ufs_cmu_info,
> +       }, {
> +               .compatible = "samsung,exynos2200-cmu-vts",
> +               .data = &vts_cmu_info,
> +       }, { }
> +};
> +
> +static struct platform_driver exynos2200_cmu_driver __refdata = {
> +       .driver = {
> +               .name = "exynos2200-cmu",
> +               .of_match_table = exynos2200_cmu_of_match,
> +               .suppress_bind_attrs = true,
> +       },
> +       .probe = exynos2200_cmu_probe,
> +};
> +
> +static int __init exynos2200_cmu_init(void)
> +{
> +       return platform_driver_register(&exynos2200_cmu_driver);

Was this supposed to be platform_driver_probe()? The __refdata usage
suggests that but all of the __init markings and stuff in the samsung
clk driver worry me.

  parent reply	other threads:[~2025-03-04 18:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-23 11:55 [PATCH v2 0/3] clk: samsung: introduce Exynos2200 clock driver Ivaylo Ivanov
2025-02-23 11:55 ` [PATCH v2 1/3] dt-bindings: clock: add Exynos2200 SoC Ivaylo Ivanov
2025-03-01 14:01   ` Krzysztof Kozlowski
2025-03-01 14:13   ` (subset) " Krzysztof Kozlowski
2025-02-23 11:55 ` [PATCH v2 2/3] clk: samsung: clk-pll: add support for pll_4311 Ivaylo Ivanov
2025-03-01 14:13   ` (subset) " Krzysztof Kozlowski
2025-02-23 11:56 ` [PATCH v2 3/3] clk: samsung: introduce Exynos2200 clock driver Ivaylo Ivanov
2025-03-01 14:13   ` (subset) " Krzysztof Kozlowski
2025-03-04 18:19   ` Stephen Boyd [this message]
2025-03-05 20:37     ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b182615f1439dd39a17b8e74cf740bf.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=alim.akhtar@samsung.com \
    --cc=conor+dt@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ivo.ivanov.ivanov1@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=robh@kernel.org \
    --cc=s.nawrocki@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox