From: Anson Huang <anson.huang@nxp.com>
To: Leonard Crestez <leonard.crestez@nxp.com>,
Abel Vesa <abel.vesa@nxp.com>, Jacky Bai <ping.bai@nxp.com>
Cc: "mturquette@baylibre.com" <mturquette@baylibre.com>,
"sboyd@kernel.org" <sboyd@kernel.org>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"festevam@gmail.com" <festevam@gmail.com>,
Peng Fan <peng.fan@nxp.com>, Fancy Fang <chen.fang@nxp.com>,
"S.j. Wang" <shengjiu.wang@nxp.com>,
Aisheng Dong <aisheng.dong@nxp.com>,
"sfr@canb.auug.org.au" <sfr@canb.auug.org.au>,
"l.stach@pengutronix.de" <l.stach@pengutronix.de>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>
Subject: RE: [PATCH 1/2] clk: imx8mm: Move 1443X/1416X PLL clock structure to common place
Date: Fri, 6 Sep 2019 01:03:58 +0000 [thread overview]
Message-ID: <DB3PR0402MB3916535DC3A2F539326A43E8F5BA0@DB3PR0402MB3916.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <VI1PR04MB7023460FBB9FB8D034ECC2A1EEBB0@VI1PR04MB7023.eurprd04.prod.outlook.com>
Hi, Leonard
> On 05.09.2019 12:59, Anson Huang wrote:
> > Many i.MX8M SoCs use same 1443X/1416X PLL, such as i.MX8MM,
> i.MX8MN
> > and later i.MX8M SoCs, moving these PLL definitions to common place
> > can save a lot of duplicated code on each platform.
>
> There are lots of similarities between imx8m clocks, do you plan to do
> combine them further?
I will consider it later, maybe we can create a new clock file named clk-imx8m.c
as common clock for i.MX8M SoCs which are similar.
>
> > Meanwhile, no need to define PLL clock structure for every module
> > which uses same type of PLL, e.g., audio/video/dram use 1443X PLL,
> > arm/gpu/vpu/sys use 1416X PLL, define 2 PLL clock structure for each
> > group is enough.
>
> > diff --git a/drivers/clk/imx/clk.c b/drivers/clk/imx/clk.c
>
> > +const struct imx_pll14xx_rate_table imx_pll1416x_tbl[] = {
> > + PLL_1416X_RATE(1800000000U, 225, 3, 0),
> > + PLL_1416X_RATE(1600000000U, 200, 3, 0),
> > + PLL_1416X_RATE(1200000000U, 300, 3, 1),
> > + PLL_1416X_RATE(1000000000U, 250, 3, 1),
> > + PLL_1416X_RATE(800000000U, 200, 3, 1),
> > + PLL_1416X_RATE(750000000U, 250, 2, 2),
> > + PLL_1416X_RATE(700000000U, 350, 3, 2),
> > + PLL_1416X_RATE(600000000U, 300, 3, 2), };
> > +
> > +const struct imx_pll14xx_rate_table imx_pll1443x_tbl[] = {
> > + PLL_1443X_RATE(650000000U, 325, 3, 2, 0),
> > + PLL_1443X_RATE(594000000U, 198, 2, 2, 0),
> > + PLL_1443X_RATE(393216000U, 262, 2, 3, 9437),
> > + PLL_1443X_RATE(361267200U, 361, 3, 3, 17511), };
> > +
> > +struct imx_pll14xx_clk imx_1443x_pll = {
> > + .type = PLL_1443X,
> > + .rate_table = imx_pll1443x_tbl,
> > + .rate_count = ARRAY_SIZE(imx_pll1443x_tbl), };
> > +
> > +struct imx_pll14xx_clk imx_1416x_pll = {
> > + .type = PLL_1416X,
> > + .rate_table = imx_pll1416x_tbl,
> > + .rate_count = ARRAY_SIZE(imx_pll1416x_tbl), };
>
> Perhaps these consts should be in clk-pll14xx.c? That way they won't be
> compiled for imx6 as well.
Make sense, I will do it in V2.
Thanks,
Anson
next prev parent reply other threads:[~2019-09-06 1:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-05 21:58 [PATCH 1/2] clk: imx8mm: Move 1443X/1416X PLL clock structure to common place Anson Huang
2019-09-05 13:05 ` Leonard Crestez
2019-09-06 1:03 ` Anson Huang [this message]
2019-09-05 21:58 ` [PATCH 2/2] clk: imx8mn: Use common 1443X/1416X PLL clock structure Anson Huang
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=DB3PR0402MB3916535DC3A2F539326A43E8F5BA0@DB3PR0402MB3916.eurprd04.prod.outlook.com \
--to=anson.huang@nxp.com \
--cc=abel.vesa@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=chen.fang@nxp.com \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=leonard.crestez@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=peng.fan@nxp.com \
--cc=ping.bai@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=shawnguo@kernel.org \
--cc=shengjiu.wang@nxp.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;
as well as URLs for NNTP newsgroup(s).