From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Tue, 7 May 2019 00:15:06 +0200 Subject: [U-Boot] [i.MX8MM+CCF 11/41] clk: fixed_rate: export clk_fixed_rate In-Reply-To: <20190430103056.32537-12-peng.fan@nxp.com> References: <20190430103056.32537-1-peng.fan@nxp.com> <20190430103056.32537-12-peng.fan@nxp.com> Message-ID: <20190507001506.313fe117@jawa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Peng, > Export the structure for others to use. > > Signed-off-by: Peng Fan > --- > drivers/clk/clk_fixed_rate.c | 8 +------- > include/linux/clk-provider.h | 7 +++++++ > 2 files changed, 8 insertions(+), 7 deletions(-) > > diff --git a/drivers/clk/clk_fixed_rate.c > b/drivers/clk/clk_fixed_rate.c index 089f060a23..069e643fbc 100644 > --- a/drivers/clk/clk_fixed_rate.c > +++ b/drivers/clk/clk_fixed_rate.c > @@ -6,13 +6,7 @@ > #include > #include > #include > - > -struct clk_fixed_rate { > - struct clk clk; > - unsigned long fixed_rate; > -}; > - > -#define to_clk_fixed_rate(dev) ((struct clk_fixed_rate > *)dev_get_platdata(dev)) +#include > > static ulong clk_fixed_rate_get_rate(struct clk *clk) > { > diff --git a/include/linux/clk-provider.h > b/include/linux/clk-provider.h index 3ed0db86d2..b2bed768b6 100644 > --- a/include/linux/clk-provider.h > +++ b/include/linux/clk-provider.h > @@ -112,6 +112,13 @@ struct clk_fixed_factor { > #define to_clk_fixed_factor(_clk) container_of(_clk, struct > clk_fixed_factor,\ clk) > > +struct clk_fixed_rate { > + struct clk clk; > + unsigned long fixed_rate; > +}; I think that this struct shall stay where it was. Moreover, the clk-provider.h is not the API to be used by other parts of the clock API. The clk_fixed_rate shall be accessed via get_rate() only and in IMX6Q it is available in early SPL (parsed from dts /clocks property - the 24MHz OSC) > + > +#define to_clk_fixed_rate(dev) ((struct clk_fixed_rate > *)dev_get_platdata(dev)) + > int clk_register(struct clk *clk, const char *drv_name, > ulong drv_data, const char *name, > const char *parent_name); Please explain why iMX8MM needs such global export? Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: