From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Nicolas.Ferre@microchip.com
Cc: sboyd@kernel.org, mturquette@baylibre.com,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: at91: fix at91sam9x5 peripheral clock number
Date: Wed, 20 Feb 2019 11:29:01 +0100 [thread overview]
Message-ID: <20190220102901.GH11432@piout.net> (raw)
In-Reply-To: <c0688a84-bd8e-1874-6fab-727bb6bd657e@microchip.com>
On 20/02/2019 10:20:28+0000, Nicolas Ferre wrote:
> On 19/02/2019 at 17:51, Alexandre Belloni wrote:
> > nck() looks at the last id in an array and unfortunately,
> > at91sam9x35_periphck has a sentinel, hence the id is 0 and the calculated
>
> Well, the logic for all other SoC clk files is to not have such a
> sentinel and deal differently with this type of array: why not modify
> this file to match with others?
>
>
> > number of peripheral clocks is 1 instead of a maximum of 31.
> >
> > Fixes: 1eabdc2f9dd8 ("clk: at91: add at91sam9x5 PMCs driver")
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> > ---
> > drivers/clk/at91/at91sam9x5.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c
> > index 2fe225a697df..d37e7ed9eb90 100644
> > --- a/drivers/clk/at91/at91sam9x5.c
> > +++ b/drivers/clk/at91/at91sam9x5.c
> > @@ -144,8 +144,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
> > return;
> >
> > at91sam9x5_pmc = pmc_data_allocate(PMC_MAIN + 1,
> > - nck(at91sam9x5_systemck),
> > - nck(at91sam9x35_periphck), 0);
> > + nck(at91sam9x5_systemck), 31, 0);
>
> I would prefer like it's done on other SoC clk files.
>
Well, that is not possible, what do you suggest?
> > if (!at91sam9x5_pmc)
> > return;
> >
> >
>
>
> --
> Nicolas Ferre
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Nicolas.Ferre@microchip.com
Cc: sboyd@kernel.org, mturquette@baylibre.com,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: at91: fix at91sam9x5 peripheral clock number
Date: Wed, 20 Feb 2019 11:29:01 +0100 [thread overview]
Message-ID: <20190220102901.GH11432@piout.net> (raw)
In-Reply-To: <c0688a84-bd8e-1874-6fab-727bb6bd657e@microchip.com>
On 20/02/2019 10:20:28+0000, Nicolas Ferre wrote:
> On 19/02/2019 at 17:51, Alexandre Belloni wrote:
> > nck() looks at the last id in an array and unfortunately,
> > at91sam9x35_periphck has a sentinel, hence the id is 0 and the calculated
>
> Well, the logic for all other SoC clk files is to not have such a
> sentinel and deal differently with this type of array: why not modify
> this file to match with others?
>
>
> > number of peripheral clocks is 1 instead of a maximum of 31.
> >
> > Fixes: 1eabdc2f9dd8 ("clk: at91: add at91sam9x5 PMCs driver")
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> > ---
> > drivers/clk/at91/at91sam9x5.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c
> > index 2fe225a697df..d37e7ed9eb90 100644
> > --- a/drivers/clk/at91/at91sam9x5.c
> > +++ b/drivers/clk/at91/at91sam9x5.c
> > @@ -144,8 +144,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
> > return;
> >
> > at91sam9x5_pmc = pmc_data_allocate(PMC_MAIN + 1,
> > - nck(at91sam9x5_systemck),
> > - nck(at91sam9x35_periphck), 0);
> > + nck(at91sam9x5_systemck), 31, 0);
>
> I would prefer like it's done on other SoC clk files.
>
Well, that is not possible, what do you suggest?
> > if (!at91sam9x5_pmc)
> > return;
> >
> >
>
>
> --
> Nicolas Ferre
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-02-20 10:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 16:51 [PATCH] clk: at91: fix at91sam9x5 peripheral clock number Alexandre Belloni
2019-02-19 16:51 ` Alexandre Belloni
2019-02-20 10:20 ` Nicolas.Ferre
2019-02-20 10:20 ` Nicolas.Ferre
2019-02-20 10:29 ` Alexandre Belloni [this message]
2019-02-20 10:29 ` Alexandre Belloni
2019-02-20 10:48 ` Nicolas.Ferre
2019-02-20 10:48 ` Nicolas.Ferre
2019-02-20 11:18 ` Nicolas.Ferre
2019-02-20 11:18 ` Nicolas.Ferre
2019-02-20 19:39 ` Stephen Boyd
2019-02-20 19:39 ` Stephen Boyd
2019-02-20 19:39 ` Stephen Boyd
2019-02-20 19:39 ` 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=20190220102901.GH11432@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=Nicolas.Ferre@microchip.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
/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.