public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel•org>
To: Chanwoo Choi <cw00.choi@samsung•com>,
	Leonard Crestez <leonard.crestez@nxp•com>,
	MyungJoo Ham <myungjoo.ham@samsung•com>,
	Rob Herring <robh+dt@kernel•org>, Shawn Guo <shawnguo@kernel•org>
Cc: Mark Rutland <mark.rutland@arm•com>,
	Artur Świgoń <a.swigon@partner•samsung.com>,
	Abel Vesa <abel.vesa@nxp•com>,
	Saravana Kannan <saravanak@google•com>,
	Anson Huang <Anson.Huang@nxp•com>,
	linux-arm-kernel@lists•infradead.org,
	Viresh Kumar <viresh.kumar@linaro•org>,
	Michael Turquette <mturquette@baylibre•com>,
	linux-pm@vger•kernel.org, linux-imx@nxp•com,
	Krzysztof Kozlowski <krzk@kernel•org>,
	linux-clk@vger•kernel.org,
	Kyungmin Park <kyungmin.park@samsung•com>,
	Alexandre Bailon <abailon@baylibre•com>,
	kernel@pengutronix•de, Dong Aisheng <aisheng.dong@nxp•com>,
	Fabio Estevam <fabio.estevam@nxp•com>,
	Georgi Djakov <georgi.djakov@linaro•org>,
	devicetree@vger•kernel.org, Jacky Bai <ping.bai@nxp•com>
Subject: Re: [PATCH v2 1/7] clk: imx8m: Set CLK_GET_RATE_NOCACHE on dram_alt/apb
Date: Mon, 16 Sep 2019 13:33:11 -0700	[thread overview]
Message-ID: <20190916203312.CF8D02067B@mail.kernel.org> (raw)
In-Reply-To: <90bfeebcb76e76d286ed7f022ea9e0d9a569ebe2.1566315740.git.leonard.crestez@nxp.com>

Quoting Leonard Crestez (2019-08-20 08:45:06)
> Dram frequency changes required modifying these clocks outside the
> control of clk framework. Mark them as CLK_GET_RATE_NOCACHE so that
> rates are always read back from registers.

Why can't we control the clks from the clk framework? Please add that
information in the commit text here.

> 
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp•com>
> ---
>  drivers/clk/imx/clk-imx8mm.c | 6 ++++--
>  drivers/clk/imx/clk-imx8mn.c | 6 ++++--
>  drivers/clk/imx/clk-imx8mq.c | 7 ++++---
>  3 files changed, 12 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c
> index 4ead3ea2713c..6cac80550f43 100644
> --- a/drivers/clk/imx/clk-imx8mm.c
> +++ b/drivers/clk/imx/clk-imx8mm.c
> @@ -526,12 +526,14 @@ static int imx8mm_clocks_probe(struct platform_device *pdev)
>         /* IPG */
>         clks[IMX8MM_CLK_IPG_ROOT] = imx_clk_divider2("ipg_root", "ahb", base + 0x9080, 0, 1);
>         clks[IMX8MM_CLK_IPG_AUDIO_ROOT] = imx_clk_divider2("ipg_audio_root", "audio_ahb", base + 0x9180, 0, 1);
>  
>         /* IP */
> -       clks[IMX8MM_CLK_DRAM_ALT] = imx8m_clk_composite("dram_alt", imx8mm_dram_alt_sels, base + 0xa000);
> -       clks[IMX8MM_CLK_DRAM_APB] = imx8m_clk_composite_critical("dram_apb", imx8mm_dram_apb_sels, base + 0xa080);
> +       clks[IMX8MM_CLK_DRAM_ALT] = __imx8m_clk_composite("dram_alt", imx8mm_dram_alt_sels, base + 0xa000,
> +                       CLK_GET_RATE_NOCACHE);
> +       clks[IMX8MM_CLK_DRAM_APB] = __imx8m_clk_composite("dram_apb", imx8mm_dram_apb_sels, base + 0xa080,
> +                       CLK_IS_CRITICAL | CLK_GET_RATE_NOCACHE);

Also, add a comment to this effect about why it can't be done from the
clk framework wherever the CLK_GET_RATE_NOCACHE flag is set. Basically
this flag is a hack and is an example of something that we need to fix.

>         clks[IMX8MM_CLK_VPU_G1] = imx8m_clk_composite("vpu_g1", imx8mm_vpu_g1_sels, base + 0xa100);
>         clks[IMX8MM_CLK_VPU_G2] = imx8m_clk_composite("vpu_g2", imx8mm_vpu_g2_sels, base + 0xa180);
>         clks[IMX8MM_CLK_DISP_DTRC] = imx8m_clk_composite("disp_dtrc", imx8mm_disp_dtrc_sels, base + 0xa200);
>         clks[IMX8MM_CLK_DISP_DC8000] = imx8m_clk_composite("disp_dc8000", imx8mm_disp_dc8000_sels, base + 0xa280);
>         clks[IMX8MM_CLK_PCIE1_CTRL] = imx8m_clk_composite("pcie1_ctrl", imx8mm_pcie1_ctrl_sels, base + 0xa300);

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-09-16 20:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20 15:45 [PATCH v2 0/7] PM / devfreq: Add initial imx support Leonard Crestez
2019-08-20 15:45 ` [PATCH v2 1/7] clk: imx8m: Set CLK_GET_RATE_NOCACHE on dram_alt/apb Leonard Crestez
2019-09-16 20:33   ` Stephen Boyd [this message]
2019-09-16 23:03     ` Leonard Crestez
2019-09-17 16:32       ` Stephen Boyd
2019-09-17 16:59         ` Leonard Crestez
2019-08-20 15:45 ` [PATCH v2 2/7] dt-bindings: devfreq: Add bindings for generic imx buses Leonard Crestez
2019-08-20 15:45 ` [PATCH v2 3/7] PM / devfreq: Add generic imx bus driver Leonard Crestez
2019-08-20 15:45 ` [PATCH v2 4/7] dt-bindings: devfreq: Add bindings for imx ddr controller Leonard Crestez
2019-08-20 15:45 ` [PATCH v2 5/7] PM / devfreq: Add dynamic scaling " Leonard Crestez
2019-08-20 15:45 ` [PATCH v2 6/7] PM / devfreq: imx-ddrc: Measure bandwidth with perf Leonard Crestez
2019-08-20 15:45 ` [PATCH v2 7/7] arm64: dts: imx8mm: Add devfreq nodes Leonard Crestez

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=20190916203312.CF8D02067B@mail.kernel.org \
    --to=sboyd@kernel$(echo .)org \
    --cc=Anson.Huang@nxp$(echo .)com \
    --cc=a.swigon@partner$(echo .)samsung.com \
    --cc=abailon@baylibre$(echo .)com \
    --cc=abel.vesa@nxp$(echo .)com \
    --cc=aisheng.dong@nxp$(echo .)com \
    --cc=cw00.choi@samsung$(echo .)com \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=fabio.estevam@nxp$(echo .)com \
    --cc=georgi.djakov@linaro$(echo .)org \
    --cc=kernel@pengutronix$(echo .)de \
    --cc=krzk@kernel$(echo .)org \
    --cc=kyungmin.park@samsung$(echo .)com \
    --cc=leonard.crestez@nxp$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-clk@vger$(echo .)kernel.org \
    --cc=linux-imx@nxp$(echo .)com \
    --cc=linux-pm@vger$(echo .)kernel.org \
    --cc=mark.rutland@arm$(echo .)com \
    --cc=mturquette@baylibre$(echo .)com \
    --cc=myungjoo.ham@samsung$(echo .)com \
    --cc=ping.bai@nxp$(echo .)com \
    --cc=robh+dt@kernel$(echo .)org \
    --cc=saravanak@google$(echo .)com \
    --cc=shawnguo@kernel$(echo .)org \
    --cc=viresh.kumar@linaro$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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