From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_PASS,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C80C1C43219 for ; Fri, 26 Apr 2019 20:53:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 97DD720679 for ; Fri, 26 Apr 2019 20:53:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oDEvIPug"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ki91WcVZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97DD720679 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TqYWmVHCcMu5OfpQ2BI4cmr4o/ekzblSAfTrnqm08xg=; b=oDEvIPug0YNSRV 0OrOVShwxaatSeB+WkZmcMOrO7safavYEPnVyfNa01nj2+eQHcKw/1bIQNWmTCW9LIH+iXwpbU9QG dmu8jxE5wwxkDxx4Q+Fa8zRNP8eUbZd6imewyKBtTPU1Q8+eyfxG6Rx2Y5eaAeaxOm3BsdJechXe8 hYAuB3XVMi5kd/gCQrpdKE2+W9+0C8Ue9H8gtHfidSNUs0XX0BwgdXH6DtyfGRkJKVDM5+OSw/frA h+crlmrH1lYwt8/UvXlW0cDOBZr4S3zM/LZB2HnW7TlaLuliOBHim9kvRb0OBbiuZ6siYNzmxX/xn 3ynWe96b5UnXvunjnXsQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK7qD-0008H9-Fs; Fri, 26 Apr 2019 20:53:05 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK7qB-0008Gp-I6 for linux-arm-kernel@bombadil.infradead.org; Fri, 26 Apr 2019 20:53:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=NRkY+b+VSW+F/EdakbdNFm6Ix5zfov5TjGk8NpqfsFw=; b=ki91WcVZ28OeUDIZ7LCT9jCDw kM+xs2KYwzUkjLSdlN9mbpzfi2r7V6PWzry8EJhxsQutjrZmTDbYQD9w/zUzfpesR5epDUQArumN+ z0tHR3RtGaPemaQAMOknOzrLM7rhs04zod7CVyNYfaYQZ1A0mjMJOATSHC2xAnzef5/U84X3Pa/wK Ztz3fd6z4e/mOTJKrQQxLbdIxlq3PKErLNxdsPV80R/letZuS/2iG+VBjEUJd7HCu8X6isMmNo31Y TpvDjO6bZnuX6RC7LcLTuNeU8lwSXCNfuPd+rqIQ9GAitLLn4WNm572pusEPzdvf7hdD2FTJT5QYd sGRNOW65A==; Received: from relay10.mail.gandi.net ([217.70.178.230]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK7q7-0004Tf-Q8 for linux-arm-kernel@lists.infradead.org; Fri, 26 Apr 2019 20:53:01 +0000 Received: from localhost (lfbn-1-3034-80.w90-66.abo.wanadoo.fr [90.66.53.80]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 1CC11240008; Fri, 26 Apr 2019 20:52:13 +0000 (UTC) Date: Fri, 26 Apr 2019 22:52:13 +0200 From: Alexandre Belloni To: Stephen Boyd Subject: Re: [PATCH v3 7/7] clk: at91: add sam9x60 pmc driver Message-ID: <20190426205213.GW14604@piout.net> References: <20190402125056.21509-1-alexandre.belloni@bootlin.com> <20190402125056.21509-8-alexandre.belloni@bootlin.com> <155622113579.15276.15900194435736283135@swboyd.mtv.corp.google.com> <20190425203139.GO14604@piout.net> <155622589096.15276.8583738150370510787@swboyd.mtv.corp.google.com> <155622689471.15276.16322042541342557062@swboyd.mtv.corp.google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <155622689471.15276.16322042541342557062@swboyd.mtv.corp.google.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190426_165300_034488_2DB2871D X-CRM114-Status: GOOD ( 16.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Turquette , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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