linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Stephen Boyd <sboyd@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Claudiu Beznea <claudiu.beznea@microchip.com>
Subject: Re: [PATCH v3 7/7] clk: at91: add sam9x60 pmc driver
Date: Fri, 26 Apr 2019 22:52:13 +0200	[thread overview]
Message-ID: <20190426205213.GW14604@piout.net> (raw)
In-Reply-To: <155622689471.15276.16322042541342557062@swboyd.mtv.corp.google.com>

On 25/04/2019 14:14:54-0700, Stephen Boyd wrote:
> Quoting Stephen Boyd (2019-04-25 13:58:10)
> > Quoting Alexandre Belloni (2019-04-25 13:31:39)
> > > On 25/04/2019 12:38:55-0700, Stephen Boyd wrote:
> > > > 
> > > > const?
> > > > 
> > > 
> > > Right, can you fix that up or should I send a new version?
> > > 
> > 
> > I can fix it.
> 
> It's more complicated. I'll pile this patch on top. Maybe other
> static data in drivers/clk/at91 can be const, but this at least covers
> the struct clk_range ones.
> 

Seems good to me.

> diff --git a/drivers/clk/at91/at91sam9260.c b/drivers/clk/at91/at91sam9260.c
> index b1af5a395423..0aabe49aed09 100644
> --- a/drivers/clk/at91/at91sam9260.c
> +++ b/drivers/clk/at91/at91sam9260.c
> @@ -41,7 +41,7 @@ static u8 sam9260_plla_out[] = { 0, 2 };
>  
>  static u16 sam9260_plla_icpll[] = { 1, 1 };
>  
> -static struct clk_range sam9260_plla_outputs[] = {
> +static const struct clk_range sam9260_plla_outputs[] = {
>  	{ .min = 80000000, .max = 160000000 },
>  	{ .min = 150000000, .max = 240000000 },
>  };
> @@ -58,7 +58,7 @@ static u8 sam9260_pllb_out[] = { 1 };
>  
>  static u16 sam9260_pllb_icpll[] = { 1 };
>  
> -static struct clk_range sam9260_pllb_outputs[] = {
> +static const struct clk_range sam9260_pllb_outputs[] = {
>  	{ .min = 70000000, .max = 130000000 },
>  };
>  
> @@ -128,7 +128,7 @@ static u8 sam9g20_plla_out[] = { 0, 1, 2, 3, 0, 1, 2, 3 };
>  
>  static u16 sam9g20_plla_icpll[] = { 0, 0, 0, 0, 1, 1, 1, 1 };
>  
> -static struct clk_range sam9g20_plla_outputs[] = {
> +static const struct clk_range sam9g20_plla_outputs[] = {
>  	{ .min = 745000000, .max = 800000000 },
>  	{ .min = 695000000, .max = 750000000 },
>  	{ .min = 645000000, .max = 700000000 },
> @@ -151,7 +151,7 @@ static u8 sam9g20_pllb_out[] = { 0 };
>  
>  static u16 sam9g20_pllb_icpll[] = { 0 };
>  
> -static struct clk_range sam9g20_pllb_outputs[] = {
> +static const struct clk_range sam9g20_pllb_outputs[] = {
>  	{ .min = 30000000, .max = 100000000 },
>  };
>  
> @@ -182,7 +182,7 @@ static const struct clk_master_characteristics sam9261_mck_characteristics = {
>  	.divisors = { 1, 2, 4, 0 },
>  };
>  
> -static struct clk_range sam9261_plla_outputs[] = {
> +static const struct clk_range sam9261_plla_outputs[] = {
>  	{ .min = 80000000, .max = 200000000 },
>  	{ .min = 190000000, .max = 240000000 },
>  };
> @@ -199,7 +199,7 @@ static u8 sam9261_pllb_out[] = { 1 };
>  
>  static u16 sam9261_pllb_icpll[] = { 1 };
>  
> -static struct clk_range sam9261_pllb_outputs[] = {
> +static const struct clk_range sam9261_pllb_outputs[] = {
>  	{ .min = 70000000, .max = 130000000 },
>  };
>  
> @@ -262,7 +262,7 @@ static const struct clk_master_characteristics sam9263_mck_characteristics = {
>  	.divisors = { 1, 2, 4, 0 },
>  };
>  
> -static struct clk_range sam9263_pll_outputs[] = {
> +static const struct clk_range sam9263_pll_outputs[] = {
>  	{ .min = 80000000, .max = 200000000 },
>  	{ .min = 190000000, .max = 240000000 },
>  };
> diff --git a/drivers/clk/at91/at91sam9rl.c b/drivers/clk/at91/at91sam9rl.c
> index 5aeef68b4bdd..0ac34cdaa106 100644
> --- a/drivers/clk/at91/at91sam9rl.c
> +++ b/drivers/clk/at91/at91sam9rl.c
> @@ -14,7 +14,7 @@ static const struct clk_master_characteristics sam9rl_mck_characteristics = {
>  
>  static u8 sam9rl_plla_out[] = { 0, 2 };
>  
> -static struct clk_range sam9rl_plla_outputs[] = {
> +static const struct clk_range sam9rl_plla_outputs[] = {
>  	{ .min = 80000000, .max = 200000000 },
>  	{ .min = 190000000, .max = 240000000 },
>  };
> diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c
> index f5cfcbd85f10..0855f3a80cc7 100644
> --- a/drivers/clk/at91/at91sam9x5.c
> +++ b/drivers/clk/at91/at91sam9x5.c
> @@ -17,7 +17,7 @@ static u8 plla_out[] = { 0, 1, 2, 3, 0, 1, 2, 3 };
>  
>  static u16 plla_icpll[] = { 0, 0, 0, 0, 1, 1, 1, 1 };
>  
> -static struct clk_range plla_outputs[] = {
> +static const struct clk_range plla_outputs[] = {
>  	{ .min = 745000000, .max = 800000000 },
>  	{ .min = 695000000, .max = 750000000 },
>  	{ .min = 645000000, .max = 700000000 },
> diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h
> index fb9e9c4cdc8d..775b77a433f5 100644
> --- a/drivers/clk/at91/pmc.h
> +++ b/drivers/clk/at91/pmc.h
> @@ -66,7 +66,7 @@ extern const struct clk_pll_layout sama5d3_pll_layout;
>  struct clk_pll_characteristics {
>  	struct clk_range input;
>  	int num_output;
> -	struct clk_range *output;
> +	const struct clk_range *output;
>  	u16 *icpll;
>  	u8 *out;
>  	u8 upll : 1;
> diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c
> index 864ac060aed6..6340b1fc1828 100644
> --- a/drivers/clk/at91/sam9x60.c
> +++ b/drivers/clk/at91/sam9x60.c
> @@ -21,7 +21,7 @@ static const struct clk_master_layout sam9x60_master_layout = {
>  	.offset = 0x28,
>  };
>  
> -static struct clk_range plla_outputs[] = {
> +static const struct clk_range plla_outputs[] = {
>  	{ .min = 300000000, .max = 600000000 },
>  };
>  
> @@ -31,7 +31,7 @@ static const struct clk_pll_characteristics plla_characteristics = {
>  	.output = plla_outputs,
>  };
>  
> -static struct clk_range upll_outputs[] = {
> +static const struct clk_range upll_outputs[] = {
>  	{ .min = 300000000, .max = 500000000 },
>  };
>  
> diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c
> index 096156850e08..f3d3f6c8e261 100644
> --- a/drivers/clk/at91/sama5d2.c
> +++ b/drivers/clk/at91/sama5d2.c
> @@ -16,7 +16,7 @@ static u8 plla_out[] = { 0 };
>  
>  static u16 plla_icpll[] = { 0 };
>  
> -static struct clk_range plla_outputs[] = {
> +static const struct clk_range plla_outputs[] = {
>  	{ .min = 600000000, .max = 1200000000 },
>  };
>  
> diff --git a/drivers/clk/at91/sama5d4.c b/drivers/clk/at91/sama5d4.c
> index 840edca77821..25b156d4e645 100644
> --- a/drivers/clk/at91/sama5d4.c
> +++ b/drivers/clk/at91/sama5d4.c
> @@ -16,7 +16,7 @@ static u8 plla_out[] = { 0 };
>  
>  static u16 plla_icpll[] = { 0 };
>  
> -static struct clk_range plla_outputs[] = {
> +static const struct clk_range plla_outputs[] = {
>  	{ .min = 600000000, .max = 1200000000 },
>  };
>  

-- 
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

      reply	other threads:[~2019-04-26 20:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 12:50 [PATCH v3 0/7] clk: at91: add sam9x60 pmc clock support Alexandre Belloni
2019-04-02 12:50 ` [PATCH v3 1/7] clk: at91: allow configuring peripheral PCR layout Alexandre Belloni
2019-04-25 19:36   ` Stephen Boyd
2019-04-02 12:50 ` [PATCH v3 2/7] clk: at91: allow configuring generated " Alexandre Belloni
2019-04-25 19:37   ` Stephen Boyd
2019-04-02 12:50 ` [PATCH v3 3/7] clk: at91: usb: Add sam9x60 support Alexandre Belloni
2019-04-25 19:37   ` Stephen Boyd
2019-04-02 12:50 ` [PATCH v3 4/7] clk: at91: master: " Alexandre Belloni
2019-04-25 19:37   ` Stephen Boyd
2019-04-02 12:50 ` [PATCH v3 5/7] clk: at91: add sam9x60 PLL driver Alexandre Belloni
2019-04-25 19:37   ` Stephen Boyd
2019-04-02 12:50 ` [PATCH v3 6/7] dt-bindings: clk: at91: add bindings for SAM9X60 pmc Alexandre Belloni
2019-04-25 19:37   ` Stephen Boyd
2019-04-02 12:50 ` [PATCH v3 7/7] clk: at91: add sam9x60 pmc driver Alexandre Belloni
2019-04-25 19:38   ` Stephen Boyd
2019-04-25 20:31     ` Alexandre Belloni
2019-04-25 20:58       ` Stephen Boyd
2019-04-25 21:10         ` Alexandre Belloni
2019-04-25 21:20           ` Stephen Boyd
2019-04-26 21:06             ` Alexandre Belloni
2019-04-26 22:02               ` Stephen Boyd
2019-04-25 21:14         ` Stephen Boyd
2019-04-26 20:52           ` Alexandre Belloni [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=20190426205213.GW14604@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).