On 2019-12-02 5:12 AM, Shawn Guo wrote: > On Thu, Oct 31, 2019 at 11:50:22PM +0200, Leonard Crestez wrote: >> These clocks are only modified as part of DRAM frequency switches during >> which DRAM itself is briefly inaccessible. The switch is performed with >> a SMC call to by TF-A which runs from a SRAM area; upon returning to >> linux several clocks bits are modified and we need to update them. >> >> For rate bits an easy solution is to just mark with >> CLK_GET_RATE_NOCACHE so that new rates are always read back from >> registers. >> >> Signed-off-by: Leonard Crestez <leonard.crestez@xxxxxxx> >> --- >> drivers/clk/imx/clk-imx8mm.c | 11 +++++++++-- >> drivers/clk/imx/clk-imx8mn.c | 12 ++++++++++-- >> drivers/clk/imx/clk-imx8mq.c | 15 +++++++++++---- >> 3 files changed, 30 insertions(+), 8 deletions(-) >> >> diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c >> index 030b15d7c0ce..c58f988191a5 100644 >> --- a/drivers/clk/imx/clk-imx8mm.c >> +++ b/drivers/clk/imx/clk-imx8mm.c >> @@ -440,13 +440,20 @@ 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); >> >> + /* >> + * DRAM clocks are manipulated from TF-A outside clock framework. >> + * Mark with GET_RATE_NOCACHE to always read div value from hardware >> + */ >> + 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); >> + > > I think we prefer to ignore over-80-column warnings for i.MX clock > drivers, because doing that improve the readability of code. You're replying to an old version, v7 doesn't have this issue: * https://patchwork.kernel.org/patch/11258501/ * https://patchwork.kernel.org/patch/11258505/ It also has additional acks from Abel and Stephen and the devfreq parts of this series have already been accepted. -- Regards, Leonard