From: Jerome Brunet <jbrunet@baylibre.com>
To: Jian Hu <jian.hu@amlogic.com>
Cc: Xianwei Zhao <xianwei.zhao@amlogic.com>,
Chuan Liu <chuan.liu@amlogic.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
"Stephen Boyd" <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
"Dmitry Rokosov" <ddrokosov@sberdevices.ru>,
robh+dt <robh+dt@kernel.org>, Rob Herring <robh@kernel.org>,
devicetree <devicetree@vger.kernel.org>,
linux-clk <linux-clk@vger.kernel.org>,
linux-amlogic <linux-amlogic@lists.infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 5/6] clk: meson: add MESON_PCLK_V2 for sys gate clock
Date: Wed, 14 May 2025 09:39:07 +0200 [thread overview]
Message-ID: <1jzfffy738.fsf@starbuckisacylon.baylibre.com> (raw)
In-Reply-To: <20250509074825.1933254-6-jian.hu@amlogic.com> (Jian Hu's message of "Fri, 9 May 2025 07:48:23 +0000")
On Fri 09 May 2025 at 07:48, Jian Hu <jian.hu@amlogic.com> wrote:
> A new MESON_PCLK_V2 macro is introduced for the sys gate clock. Its parent
> is an SCMI clock. It belongs to another clock controller, and the parent
> configuration is different from that of MESON_PCLK. This avoids new macro
> definition in the peripheral clock driver.
>
> Signed-off-by: Jian Hu <jian.hu@amlogic.com>
> ---
> drivers/clk/meson/clk-regmap.h | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/drivers/clk/meson/clk-regmap.h b/drivers/clk/meson/clk-regmap.h
> index e365312da54e..61b8fc2d875f 100644
> --- a/drivers/clk/meson/clk-regmap.h
> +++ b/drivers/clk/meson/clk-regmap.h
This file is not meant for amlogic specific stuff. I know some found
their way in regardless but that's being fixed
> @@ -134,4 +134,28 @@ struct clk_regmap _name = { \
>
> #define MESON_PCLK_RO(_name, _reg, _bit, _pname) \
> __MESON_PCLK(_name, _reg, _bit, &clk_regmap_gate_ro_ops, _pname)
> +
> +#define __MESON_PCLK_V2(_name, _reg, _bit, _ops, _pname) \
> +struct clk_regmap _name = { \
> + .data = &(struct clk_regmap_gate_data){ \
> + .offset = (_reg), \
> + .bit_idx = (_bit), \
> + }, \
> + .hw.init = &(struct clk_init_data) { \
> + .name = #_name, \
> + .ops = _ops, \
> + .parent_data = &(const struct clk_parent_data) { \
> + .fw_name = #_pname, \
> + }, \
> + .num_parents = 1, \
> + .flags = (CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED), \
> + }, \
> +}
The proliferation of those macros has been going on for far too long,
add using CLK_IGNORE_UNUSED inside is certainly a mistake I won't
repeat.
This will be part of more general clean-up that currently depends on a
this [1] patch to go further. You'll have to be patient.
[1]: https://lore.kernel.org/r/20250417-clk-hw-get-helpers-v1-0-7743e509612a@baylibre.com
> +
> +#define MESON_PCLK_V2(_name, _reg, _bit, _pname) \
> + __MESON_PCLK_V2(_name, _reg, _bit, &clk_regmap_gate_ops, _pname)
> +
> +#define MESON_PCLK_RO_V2(_name, _reg, _bit, _pname) \
> + __MESON_PCLK_V2(_name, _reg, _bit, &clk_regmap_gate_ro_ops, _pname)
> +
> #endif /* __CLK_REGMAP_H */
--
Jerome
next prev parent reply other threads:[~2025-05-14 7:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 7:48 [PATCH v3 0/6] add support for T7 family clock controller Jian Hu
2025-05-09 7:48 ` [PATCH v3 1/6] dt-bindings: clock: add Amlogic T7 PLL " Jian Hu
2025-05-09 16:09 ` Conor Dooley
2025-05-09 7:48 ` [PATCH v3 2/6] dt-bindings: clock: add Amlogic T7 SCMI " Jian Hu
2025-05-09 7:48 ` [PATCH v3 3/6] dt-bindings: clock: add Amlogic T7 peripherals " Jian Hu
2025-05-09 7:48 ` [PATCH v3 4/6] clk: meson: t7: add support for the T7 SoC PLL clock Jian Hu
2025-05-14 7:52 ` Jerome Brunet
2025-06-12 13:02 ` Jian Hu
2025-06-16 16:27 ` Jerome Brunet
2025-06-25 2:52 ` Jian Hu
2025-06-25 7:46 ` Jerome Brunet
2025-07-03 3:42 ` Jian Hu
2025-05-09 7:48 ` [PATCH v3 5/6] clk: meson: add MESON_PCLK_V2 for sys gate clock Jian Hu
2025-05-14 7:39 ` Jerome Brunet [this message]
[not found] ` <ea83e375-7088-4047-92f1-31d0e7c2c331@amlogic.com>
2025-06-16 16:28 ` Jerome Brunet
2025-06-20 9:21 ` Jian Hu
2025-05-09 7:48 ` [PATCH v3 6/6] clk: meson: t7: add t7 clock peripherals controller driver Jian Hu
2025-05-14 8:00 ` Jerome Brunet
2025-06-13 9:39 ` Jian Hu
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=1jzfffy738.fsf@starbuckisacylon.baylibre.com \
--to=jbrunet@baylibre.com \
--cc=chuan.liu@amlogic.com \
--cc=ddrokosov@sberdevices.ru \
--cc=devicetree@vger.kernel.org \
--cc=jian.hu@amlogic.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=neil.armstrong@linaro.org \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=xianwei.zhao@amlogic.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