From: yixun.lan@amlogic.com (Yixun Lan)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH v6 3/6] clk: meson-axg: add clock controller drivers
Date: Mon, 11 Dec 2017 18:16:52 +0800 [thread overview]
Message-ID: <a6a9454f-be94-4fee-9083-f37eae2c1749@amlogic.com> (raw)
In-Reply-To: <1512985560.334.17.camel@baylibre.com>
HI Jerome:
On 12/11/17 17:46, Jerome Brunet wrote:
> On Mon, 2017-12-11 at 14:48 +0800, Yixun Lan wrote:
>> From: Qiufang Dai <qiufang.dai@amlogic.com>
>>
>> Add clock controller drivers for Amlogic Meson-AXG SoC.
>>
>> Acked-by: Neil Armstrong <narmstrong@baylibre.com>
>> Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
>> Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
>> ---
>> arch/arm64/Kconfig.platforms | 1 +
>> drivers/clk/meson/Kconfig | 8 +
>> drivers/clk/meson/Makefile | 1 +
>> drivers/clk/meson/axg.c | 944
>> +++++++++++++++++++++++++++++++++++++++++++
>> drivers/clk/meson/axg.h | 126 ++++++
>> 5 files changed, 1080 insertions(+)
>> create mode 100644 drivers/clk/meson/axg.c
>> create mode 100644 drivers/clk/meson/axg.h
>
> Overall, the changes looks good to me.
> I still have a few comments which I'd like to see addressed quickly after this
> series is merged
did you say that:
you will merge these patches now, then I could send fixes later?
or I can send another version (v7) to address this..
>
> [...]
>
>>
>> +static struct meson_clk_pll axg_fixed_pll = {
>> + .m = {
>> + .reg_off = HHI_MPLL_CNTL,
>> + .shift = 0,
>> + .width = 9,
>> + },
>> + .n = {
>> + .reg_off = HHI_MPLL_CNTL,
>> + .shift = 9,
>> + .width = 5,
>> + },
>> + .od = {
>> + .reg_off = HHI_MPLL_CNTL,
>> + .shift = 16,
>> + .width = 2,
>> + },
>> + .lock = &clk_lock,
>> + .hw.init = &(struct clk_init_data){
>> + .name = "fixed_pll",
>> + .ops = &meson_clk_pll_ro_ops,
>> + .parent_names = (const char *[]){ "xtal" },
>> + .num_parents = 1,
>> + .flags = CLK_GET_RATE_NOCACHE,
>
> Is the rate of this clock supposed to changed by something else than
> the CCF after boot ?
>
> If not, you should drop this flag.
> Same comment goes for axg_sys_pll and axg_gp0_pll
>
we need to keep the CLK_GET_RATE_NOCACHE flag for axg_sys_pll, since the
BL30 will change it for the frequency change.
for the other two, we can drop them safely
>> + },
>> +};
>
> [...]
>
>> +/*
>> + * FIXME The legacy composite clocks (e.g. clk81) are both PLL post-dividers
>> + * and should be modeled with their respective PLLs via the forthcoming
>> + * coordinated clock rates feature
>> + */
>> +static u32 mux_table_clk81[] = { 0, 2, 3, 4, 5, 6, 7 };
>> +static const char * const clk81_parent_names[] = {
>> + "xtal", "fclk_div7", "mpll1", "mpll2", "fclk_div4",
>> + "fclk_div3", "fclk_div5"
>> +};
>> +
>> +static struct clk_mux axg_mpeg_clk_sel = {
>> + .reg = (void *)HHI_MPEG_CLK_CNTL,
>> + .mask = 0x7,
>> + .shift = 12,
>> + .flags = CLK_MUX_READ_ONLY,
>> + .table = mux_table_clk81,
>> + .lock = &clk_lock,
>> + .hw.init = &(struct clk_init_data){
>> + .name = "mpeg_clk_sel",
>> + .ops = &clk_mux_ro_ops,
>> + /*
>> + * bits 14:12 selects from 8 possible parents:
>> + * xtal, 1'b0 (wtf), fclk_div7, mpll_clkout1, mpll_clkout2,
>> + * fclk_div4, fclk_div3, fclk_div5
>> + */
>
> This comment is not necessary with table above.
>
can drop
>> + .parent_names = clk81_parent_names,
>> + .num_parents = ARRAY_SIZE(clk81_parent_names),
>> + .flags = CLK_SET_RATE_NO_REPARENT,
>
> With ro_ops, this flag is not necessary, consider removing it.
>
can drop
>> + },
>> +};
>> +
>>
>
> .
>
next prev parent reply other threads:[~2017-12-11 10:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-11 6:48 [PATCH v6 0/6] add clk controller driver for Meson-AXG SoC Yixun Lan
2017-12-11 6:48 ` [PATCH v6 1/6] dt-bindings: clock: add compatible variant for the Meson-AXG Yixun Lan
2017-12-11 6:48 ` [PATCH v6 2/6] clk: meson-axg: add clocks dt-bindings required header Yixun Lan
2017-12-11 6:48 ` [PATCH v6 3/6] clk: meson-axg: add clock controller drivers Yixun Lan
2017-12-11 9:46 ` Jerome Brunet
2017-12-11 10:16 ` Yixun Lan [this message]
2017-12-11 10:21 ` Jerome Brunet
2017-12-11 6:48 ` [PATCH v6 4/6] clk: meson: make the spinlock naming more specific Yixun Lan
2017-12-11 9:26 ` Jerome Brunet
2017-12-11 11:27 ` Jerome Brunet
2017-12-11 6:48 ` [PATCH v6 5/6] arm64: dts: meson-axg: add clock DT info for Meson AXG SoC Yixun Lan
2017-12-11 6:48 ` [PATCH v6 6/6] arm64: dts: meson-axg: switch uart_ao clock to CLK81 Yixun Lan
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=a6a9454f-be94-4fee-9083-f37eae2c1749@amlogic.com \
--to=yixun.lan@amlogic.com \
--cc=linus-amlogic@lists.infradead.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
all inboxes | Powered by JetHome®