From: Haylen Chu <heylenay@4d2.org>
To: Alex Elder <elder@riscstar.com>,
mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org
Cc: p.zabel@pengutronix.de, dlan@gentoo.org, guodong@riscstar.com,
paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, spacemit@lists.linux.dev,
devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/7] clk: spacemit: rename spacemit_ccu_data fields
Date: Tue, 15 Apr 2025 04:18:16 +0000 [thread overview]
Message-ID: <Z_3eCDmh_vnkpcFC@ketchup> (raw)
In-Reply-To: <20250414191715.2264758-3-elder@riscstar.com>
On Mon, Apr 14, 2025 at 02:17:09PM -0500, Alex Elder wrote:
> Add "clk_" to the names of the fields in the spacemit_ccu_data structure
> type. This prepares it for the addition of two similar fields dedicated
> to resets.
>
> Signed-off-by: Alex Elder <elder@riscstar.com>
Reviewed-by: Haylen Chu <heylenay@4d2.org>
> ---
> drivers/clk/spacemit/ccu-k1.c | 28 ++++++++++++++--------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/clk/spacemit/ccu-k1.c b/drivers/clk/spacemit/ccu-k1.c
> index a55957806db31..4db91c1b1d280 100644
> --- a/drivers/clk/spacemit/ccu-k1.c
> +++ b/drivers/clk/spacemit/ccu-k1.c
> @@ -130,8 +130,8 @@
> #define APMU_EMAC1_CLK_RES_CTRL 0x3ec
>
> struct spacemit_ccu_data {
> - struct clk_hw **hws;
> - size_t num;
> + struct clk_hw **clk_hws;
> + size_t clk_num;
> };
>
> /* APBS clocks start, APBS region contains and only contains all PLL clocks */
> @@ -819,8 +819,8 @@ static struct clk_hw *k1_ccu_pll_hws[] = {
> };
>
> static const struct spacemit_ccu_data k1_ccu_pll_data = {
> - .hws = k1_ccu_pll_hws,
> - .num = ARRAY_SIZE(k1_ccu_pll_hws),
> + .clk_hws = k1_ccu_pll_hws,
> + .clk_num = ARRAY_SIZE(k1_ccu_pll_hws),
> };
>
> static struct clk_hw *k1_ccu_mpmu_hws[] = {
> @@ -860,8 +860,8 @@ static struct clk_hw *k1_ccu_mpmu_hws[] = {
> };
>
> static const struct spacemit_ccu_data k1_ccu_mpmu_data = {
> - .hws = k1_ccu_mpmu_hws,
> - .num = ARRAY_SIZE(k1_ccu_mpmu_hws),
> + .clk_hws = k1_ccu_mpmu_hws,
> + .clk_num = ARRAY_SIZE(k1_ccu_mpmu_hws),
> };
>
> static struct clk_hw *k1_ccu_apbc_hws[] = {
> @@ -968,8 +968,8 @@ static struct clk_hw *k1_ccu_apbc_hws[] = {
> };
>
> static const struct spacemit_ccu_data k1_ccu_apbc_data = {
> - .hws = k1_ccu_apbc_hws,
> - .num = ARRAY_SIZE(k1_ccu_apbc_hws),
> + .clk_hws = k1_ccu_apbc_hws,
> + .clk_num = ARRAY_SIZE(k1_ccu_apbc_hws),
> };
>
> static struct clk_hw *k1_ccu_apmu_hws[] = {
> @@ -1038,8 +1038,8 @@ static struct clk_hw *k1_ccu_apmu_hws[] = {
> };
>
> static const struct spacemit_ccu_data k1_ccu_apmu_data = {
> - .hws = k1_ccu_apmu_hws,
> - .num = ARRAY_SIZE(k1_ccu_apmu_hws),
> + .clk_hws = k1_ccu_apmu_hws,
> + .clk_num = ARRAY_SIZE(k1_ccu_apmu_hws),
> };
>
> static int spacemit_ccu_register(struct device *dev,
> @@ -1050,13 +1050,13 @@ static int spacemit_ccu_register(struct device *dev,
> struct clk_hw_onecell_data *clk_data;
> int i, ret;
>
> - clk_data = devm_kzalloc(dev, struct_size(clk_data, hws, data->num),
> + clk_data = devm_kzalloc(dev, struct_size(clk_data, hws, data->clk_num),
> GFP_KERNEL);
> if (!clk_data)
> return -ENOMEM;
>
> - for (i = 0; i < data->num; i++) {
> - struct clk_hw *hw = data->hws[i];
> + for (i = 0; i < data->clk_num; i++) {
> + struct clk_hw *hw = data->clk_hws[i];
> struct ccu_common *common;
> const char *name;
>
> @@ -1081,7 +1081,7 @@ static int spacemit_ccu_register(struct device *dev,
> clk_data->hws[i] = hw;
> }
>
> - clk_data->num = data->num;
> + clk_data->num = data->clk_num;
>
> ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, clk_data);
> if (ret)
> --
> 2.45.2
>
WARNING: multiple messages have this Message-ID (diff)
From: Haylen Chu <heylenay@4d2.org>
To: Alex Elder <elder@riscstar.com>,
mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org
Cc: p.zabel@pengutronix.de, dlan@gentoo.org, guodong@riscstar.com,
paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, spacemit@lists.linux.dev,
devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/7] clk: spacemit: rename spacemit_ccu_data fields
Date: Tue, 15 Apr 2025 04:18:16 +0000 [thread overview]
Message-ID: <Z_3eCDmh_vnkpcFC@ketchup> (raw)
In-Reply-To: <20250414191715.2264758-3-elder@riscstar.com>
On Mon, Apr 14, 2025 at 02:17:09PM -0500, Alex Elder wrote:
> Add "clk_" to the names of the fields in the spacemit_ccu_data structure
> type. This prepares it for the addition of two similar fields dedicated
> to resets.
>
> Signed-off-by: Alex Elder <elder@riscstar.com>
Reviewed-by: Haylen Chu <heylenay@4d2.org>
> ---
> drivers/clk/spacemit/ccu-k1.c | 28 ++++++++++++++--------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/clk/spacemit/ccu-k1.c b/drivers/clk/spacemit/ccu-k1.c
> index a55957806db31..4db91c1b1d280 100644
> --- a/drivers/clk/spacemit/ccu-k1.c
> +++ b/drivers/clk/spacemit/ccu-k1.c
> @@ -130,8 +130,8 @@
> #define APMU_EMAC1_CLK_RES_CTRL 0x3ec
>
> struct spacemit_ccu_data {
> - struct clk_hw **hws;
> - size_t num;
> + struct clk_hw **clk_hws;
> + size_t clk_num;
> };
>
> /* APBS clocks start, APBS region contains and only contains all PLL clocks */
> @@ -819,8 +819,8 @@ static struct clk_hw *k1_ccu_pll_hws[] = {
> };
>
> static const struct spacemit_ccu_data k1_ccu_pll_data = {
> - .hws = k1_ccu_pll_hws,
> - .num = ARRAY_SIZE(k1_ccu_pll_hws),
> + .clk_hws = k1_ccu_pll_hws,
> + .clk_num = ARRAY_SIZE(k1_ccu_pll_hws),
> };
>
> static struct clk_hw *k1_ccu_mpmu_hws[] = {
> @@ -860,8 +860,8 @@ static struct clk_hw *k1_ccu_mpmu_hws[] = {
> };
>
> static const struct spacemit_ccu_data k1_ccu_mpmu_data = {
> - .hws = k1_ccu_mpmu_hws,
> - .num = ARRAY_SIZE(k1_ccu_mpmu_hws),
> + .clk_hws = k1_ccu_mpmu_hws,
> + .clk_num = ARRAY_SIZE(k1_ccu_mpmu_hws),
> };
>
> static struct clk_hw *k1_ccu_apbc_hws[] = {
> @@ -968,8 +968,8 @@ static struct clk_hw *k1_ccu_apbc_hws[] = {
> };
>
> static const struct spacemit_ccu_data k1_ccu_apbc_data = {
> - .hws = k1_ccu_apbc_hws,
> - .num = ARRAY_SIZE(k1_ccu_apbc_hws),
> + .clk_hws = k1_ccu_apbc_hws,
> + .clk_num = ARRAY_SIZE(k1_ccu_apbc_hws),
> };
>
> static struct clk_hw *k1_ccu_apmu_hws[] = {
> @@ -1038,8 +1038,8 @@ static struct clk_hw *k1_ccu_apmu_hws[] = {
> };
>
> static const struct spacemit_ccu_data k1_ccu_apmu_data = {
> - .hws = k1_ccu_apmu_hws,
> - .num = ARRAY_SIZE(k1_ccu_apmu_hws),
> + .clk_hws = k1_ccu_apmu_hws,
> + .clk_num = ARRAY_SIZE(k1_ccu_apmu_hws),
> };
>
> static int spacemit_ccu_register(struct device *dev,
> @@ -1050,13 +1050,13 @@ static int spacemit_ccu_register(struct device *dev,
> struct clk_hw_onecell_data *clk_data;
> int i, ret;
>
> - clk_data = devm_kzalloc(dev, struct_size(clk_data, hws, data->num),
> + clk_data = devm_kzalloc(dev, struct_size(clk_data, hws, data->clk_num),
> GFP_KERNEL);
> if (!clk_data)
> return -ENOMEM;
>
> - for (i = 0; i < data->num; i++) {
> - struct clk_hw *hw = data->hws[i];
> + for (i = 0; i < data->clk_num; i++) {
> + struct clk_hw *hw = data->clk_hws[i];
> struct ccu_common *common;
> const char *name;
>
> @@ -1081,7 +1081,7 @@ static int spacemit_ccu_register(struct device *dev,
> clk_data->hws[i] = hw;
> }
>
> - clk_data->num = data->num;
> + clk_data->num = data->clk_num;
>
> ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, clk_data);
> if (ret)
> --
> 2.45.2
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-04-15 4:18 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 19:17 [PATCH v4 0/7] clk: spacemit: add K1 reset support Alex Elder
2025-04-14 19:17 ` Alex Elder
2025-04-14 19:17 ` [PATCH v4 1/7] dt-bindings: soc: spacemit: define spacemit,k1-ccu resets Alex Elder
2025-04-14 19:17 ` Alex Elder
2025-04-14 19:17 ` [PATCH v4 2/7] clk: spacemit: rename spacemit_ccu_data fields Alex Elder
2025-04-14 19:17 ` Alex Elder
2025-04-15 4:18 ` Haylen Chu [this message]
2025-04-15 4:18 ` Haylen Chu
2025-04-14 19:17 ` [PATCH v4 3/7] clk: spacemit: add reset controller support Alex Elder
2025-04-14 19:17 ` Alex Elder
2025-04-15 8:24 ` Philipp Zabel
2025-04-15 8:24 ` Philipp Zabel
2025-04-14 19:17 ` [PATCH v4 4/7] clk: spacemit: define existing syscon resets Alex Elder
2025-04-14 19:17 ` Alex Elder
2025-04-14 19:17 ` [PATCH v4 5/7] clk: spacemit: make clocks optional Alex Elder
2025-04-14 19:17 ` Alex Elder
2025-04-14 19:17 ` [PATCH v4 6/7] clk: spacemit: define new syscons with only resets Alex Elder
2025-04-14 19:17 ` Alex Elder
2025-04-15 8:22 ` Philipp Zabel
2025-04-15 8:22 ` Philipp Zabel
2025-04-15 11:33 ` Alex Elder
2025-04-15 11:33 ` Alex Elder
2025-04-15 12:01 ` Alex Elder
2025-04-15 12:01 ` Alex Elder
2025-04-14 19:17 ` [PATCH v4 7/7] riscv: dts: spacemit: add reset support for the K1 SoC Alex Elder
2025-04-14 19:17 ` Alex Elder
2025-04-29 20:56 ` [PATCH v4 0/7] clk: spacemit: add K1 reset support Stephen Boyd
2025-04-29 20:56 ` Stephen Boyd
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=Z_3eCDmh_vnkpcFC@ketchup \
--to=heylenay@4d2.org \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.org \
--cc=elder@riscstar.com \
--cc=guodong@riscstar.com \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=spacemit@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.