public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: linux-clk@vger.kernel.org, mturquette@baylibre.com,
	sboyd@kernel.org, p.zabel@pengutronix.de,
	lorenzo.bianconi83@gmail.com,
	linux-arm-kernel@lists.infradead.org, nbd@nbd.name,
	john@phrozen.org, upstream@airoha.com
Subject: Re: [PATCH 2/2] clk: en7523: fix scuclk io region for upcoming pinctrl
Date: Tue, 23 Jul 2024 08:25:09 +0200	[thread overview]
Message-ID: <Zp9MxSkxXctfe-F3@lore-rh-laptop> (raw)
In-Reply-To: <26151f58-9dd3-4e14-afaf-c62f539f8e26@collabora.com>

[-- Attachment #1: Type: text/plain, Size: 3639 bytes --]

> Il 09/07/24 09:48, Lorenzo Bianconi ha scritto:
> > EN7581 clock driver shares the IO region with the upcoming pinctrl
> > driver for Airoha EN7581 SoC. Fix it by reducing the clk mapped
> > region to only used registers in order to not overlap with pinctrl
> > one. This change is not introducing any backward compatibility issue
> > since the EN7581 dts is not upstream yet.
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >   drivers/clk/clk-en7523.c | 23 +++++++++++++++--------
> >   1 file changed, 15 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/clk/clk-en7523.c b/drivers/clk/clk-en7523.c
> > index b20e56337a6b..d9ecbb6bf55a 100644
> > --- a/drivers/clk/clk-en7523.c
> > +++ b/drivers/clk/clk-en7523.c
> > @@ -31,7 +31,14 @@
> >   #define   REG_RESET_CONTROL_PCIE1	BIT(27)
> >   #define   REG_RESET_CONTROL_PCIE2	BIT(26)
> >   /* EN7581 */
> > -#define REG_CRYPTO_CLKSRC2		0x20c
> > +#define REG_GSW_CLK_DIV_SEL2		0x00
> > +#define REG_EMI_CLK_DIV_SEL2		0x04
> > +#define REG_BUS_CLK_DIV_SEL2		0x08
> > +#define REG_SPI_CLK_DIV_SEL2		0x10
> > +#define REG_SPI_CLK_FREQ_SEL2		0x14
> > +#define REG_NPU_CLK_DIV_SEL2		0x48
> > +#define REG_CRYPTO_CLKSRC2		0x58
> > +
> >   #define REG_PCIE0_MEM			0x00
> >   #define REG_PCIE0_MEM_MASK		0x04
> >   #define REG_PCIE1_MEM			0x08
> > @@ -203,7 +210,7 @@ static const struct en_clk_desc en7581_base_clks[] = {
> >   		.id = EN7523_CLK_GSW,
> >   		.name = "gsw",
> > -		.base_reg = REG_GSW_CLK_DIV_SEL,
> > +		.base_reg = REG_GSW_CLK_DIV_SEL2,
> 
> This is practically just commit noise :-)
> 
> You are adding the en7581_base_clks[] in patch [1/2] with the wrong base register,
> then fixing it here ... and that's wrong.
> 
> Please squash the two patches.

ack, I will do.

Regards,
Lorenzo

> 
> Cheers,
> Angelo
> 
> >   		.base_bits = 1,
> >   		.base_shift = 8,
> >   		.base_values = gsw_base,
> > @@ -217,7 +224,7 @@ static const struct en_clk_desc en7581_base_clks[] = {
> >   		.id = EN7523_CLK_EMI,
> >   		.name = "emi",
> > -		.base_reg = REG_EMI_CLK_DIV_SEL,
> > +		.base_reg = REG_EMI_CLK_DIV_SEL2,
> >   		.base_bits = 2,
> >   		.base_shift = 8,
> >   		.base_values = emi7581_base,
> > @@ -231,7 +238,7 @@ static const struct en_clk_desc en7581_base_clks[] = {
> >   		.id = EN7523_CLK_BUS,
> >   		.name = "bus",
> > -		.base_reg = REG_BUS_CLK_DIV_SEL,
> > +		.base_reg = REG_BUS_CLK_DIV_SEL2,
> >   		.base_bits = 1,
> >   		.base_shift = 8,
> >   		.base_values = bus_base,
> > @@ -245,13 +252,13 @@ static const struct en_clk_desc en7581_base_clks[] = {
> >   		.id = EN7523_CLK_SLIC,
> >   		.name = "slic",
> > -		.base_reg = REG_SPI_CLK_FREQ_SEL,
> > +		.base_reg = REG_SPI_CLK_FREQ_SEL2,
> >   		.base_bits = 1,
> >   		.base_shift = 0,
> >   		.base_values = slic_base,
> >   		.n_base_values = ARRAY_SIZE(slic_base),
> > -		.div_reg = REG_SPI_CLK_DIV_SEL,
> > +		.div_reg = REG_SPI_CLK_DIV_SEL2,
> >   		.div_bits = 5,
> >   		.div_shift = 24,
> >   		.div_val0 = 20,
> > @@ -260,7 +267,7 @@ static const struct en_clk_desc en7581_base_clks[] = {
> >   		.id = EN7523_CLK_SPI,
> >   		.name = "spi",
> > -		.base_reg = REG_SPI_CLK_DIV_SEL,
> > +		.base_reg = REG_SPI_CLK_DIV_SEL2,
> >   		.base_value = 400000000,
> > @@ -272,7 +279,7 @@ static const struct en_clk_desc en7581_base_clks[] = {
> >   		.id = EN7523_CLK_NPU,
> >   		.name = "npu",
> > -		.base_reg = REG_NPU_CLK_DIV_SEL,
> > +		.base_reg = REG_NPU_CLK_DIV_SEL2,
> >   		.base_bits = 2,
> >   		.base_shift = 8,
> >   		.base_values = npu7581_base,
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2024-07-23  6:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09  7:48 [PATCH 0/2] en7523 clk changes for pinctrl support Lorenzo Bianconi
2024-07-09  7:48 ` [PATCH 1/2] clk: en7523: fix estimation of fixed rate for EN7581 Lorenzo Bianconi
2024-07-09  7:48 ` [PATCH 2/2] clk: en7523: fix scuclk io region for upcoming pinctrl Lorenzo Bianconi
2024-07-22 15:18   ` AngeloGioacchino Del Regno
2024-07-23  6:25     ` Lorenzo Bianconi [this message]

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=Zp9MxSkxXctfe-F3@lore-rh-laptop \
    --to=lorenzo@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=john@phrozen.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=lorenzo.bianconi83@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=nbd@nbd.name \
    --cc=p.zabel@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=upstream@airoha.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