linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: imx6sl: ensure MMDC CH0 handshake is bypassed
@ 2018-11-30  7:23 Anson Huang
  2018-11-30  7:25 ` Stephen Boyd
  2018-12-10 19:34 ` Stephen Boyd
  0 siblings, 2 replies; 5+ messages in thread
From: Anson Huang @ 2018-11-30  7:23 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, Fabio Estevam, mturquette, sboyd,
	linux-arm-kernel, linux-clk, linux-kernel
  Cc: dl-linux-imx

Same as other i.MX6 SoCs, ensure unused MMDC channel's
handshake is bypassed, this is to make sure no request
signal will be generated when periphe_clk_sel is changed
or SRC warm reset is triggered.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/clk/imx/clk-imx6sl.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/clk/imx/clk-imx6sl.c b/drivers/clk/imx/clk-imx6sl.c
index 6fcfbbd..e13d881 100644
--- a/drivers/clk/imx/clk-imx6sl.c
+++ b/drivers/clk/imx/clk-imx6sl.c
@@ -17,6 +17,8 @@
 
 #include "clk.h"
 
+#define CCDR				0x4
+#define BM_CCM_CCDR_MMDC_CH0_MASK	(1 << 17)
 #define CCSR			0xc
 #define BM_CCSR_PLL1_SW_CLK_SEL	(1 << 2)
 #define CACRR			0x10
@@ -411,6 +413,10 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node)
 	clks[IMX6SL_CLK_USDHC3]       = imx_clk_gate2("usdhc3",       "usdhc3_podf",       base + 0x80, 6);
 	clks[IMX6SL_CLK_USDHC4]       = imx_clk_gate2("usdhc4",       "usdhc4_podf",       base + 0x80, 8);
 
+	/* Ensure the MMDC CH0 handshake is bypassed */
+	writel_relaxed(readl_relaxed(base + CCDR) |
+		BM_CCM_CCDR_MMDC_CH0_MASK, base + CCDR);
+
 	imx_check_clocks(clks, ARRAY_SIZE(clks));
 
 	clk_data.clks = clks;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] clk: imx6sl: ensure MMDC CH0 handshake is bypassed
  2018-11-30  7:23 [PATCH] clk: imx6sl: ensure MMDC CH0 handshake is bypassed Anson Huang
@ 2018-11-30  7:25 ` Stephen Boyd
  2018-11-30  7:37   ` Anson Huang
  2018-12-10 19:34 ` Stephen Boyd
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Boyd @ 2018-11-30  7:25 UTC (permalink / raw)
  To: kernel, linux-arm-kernel, linux-clk, linux-kernel, mturquette,
	s.hauer, shawnguo, Anson Huang, Fabio Estevam
  Cc: dl-linux-imx

Quoting Anson Huang (2018-11-29 23:23:47)
> Same as other i.MX6 SoCs, ensure unused MMDC channel's
> handshake is bypassed, this is to make sure no request
> signal will be generated when periphe_clk_sel is changed
> or SRC warm reset is triggered.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Does this need a fixes tag?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] clk: imx6sl: ensure MMDC CH0 handshake is bypassed
  2018-11-30  7:25 ` Stephen Boyd
@ 2018-11-30  7:37   ` Anson Huang
  2018-11-30  8:10     ` Stephen Boyd
  0 siblings, 1 reply; 5+ messages in thread
From: Anson Huang @ 2018-11-30  7:37 UTC (permalink / raw)
  To: Stephen Boyd, kernel, linux-arm-kernel, linux-clk, linux-kernel,
	mturquette, s.hauer, shawnguo, Fabio Estevam
  Cc: dl-linux-imx

Hi, Stephen

Best Regards!
Anson Huang

> -----Original Message-----
> From: Stephen Boyd [mailto:sboyd@kernel.org]
> Sent: 2018年11月30日 15:25
> To: kernel@pengutronix.de; linux-arm-kernel@lists.infradead.org;
> linux-clk@vger.kernel.org; linux-kernel@vger.kernel.org;
> mturquette@baylibre.com; s.hauer@pengutronix.de; shawnguo@kernel.org;
> Anson Huang <anson.huang@nxp.com>; Fabio Estevam
> <fabio.estevam@nxp.com>
> Cc: dl-linux-imx <linux-imx@nxp.com>
> Subject: Re: [PATCH] clk: imx6sl: ensure MMDC CH0 handshake is bypassed
> 
> Quoting Anson Huang (2018-11-29 23:23:47)
> > Same as other i.MX6 SoCs, ensure unused MMDC channel's handshake is
> > bypassed, this is to make sure no request signal will be generated
> > when periphe_clk_sel is changed or SRC warm reset is triggered.
> >
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> 
> Does this need a fixes tag?

Normally this bit is 1b'1 by reset, but during our development, it used to be
overwritten in u-boot and lead to some clock operation fail in Linux kernel, that is why we ensure it
in clock driver early phase. IMO, it should be OK to not add a fix tag, since it is just
to make sure the setting is correct and NOT depends on the hardware reset value which
could be changed in u-boot.

Anson.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] clk: imx6sl: ensure MMDC CH0 handshake is bypassed
  2018-11-30  7:37   ` Anson Huang
@ 2018-11-30  8:10     ` Stephen Boyd
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2018-11-30  8:10 UTC (permalink / raw)
  To: kernel, linux-arm-kernel, linux-clk, linux-kernel, mturquette,
	s.hauer, shawnguo, Anson Huang, Fabio Estevam
  Cc: dl-linux-imx

Quoting Anson Huang (2018-11-29 23:37:14)
> Hi, Stephen
> 
> Best Regards!
> Anson Huang
> 
> > -----Original Message-----
> > From: Stephen Boyd [mailto:sboyd@kernel.org]
> > Sent: 2018年11月30日 15:25
> > To: kernel@pengutronix.de; linux-arm-kernel@lists.infradead.org;
> > linux-clk@vger.kernel.org; linux-kernel@vger.kernel.org;
> > mturquette@baylibre.com; s.hauer@pengutronix.de; shawnguo@kernel.org;
> > Anson Huang <anson.huang@nxp.com>; Fabio Estevam
> > <fabio.estevam@nxp.com>
> > Cc: dl-linux-imx <linux-imx@nxp.com>
> > Subject: Re: [PATCH] clk: imx6sl: ensure MMDC CH0 handshake is bypassed
> > 
> > Quoting Anson Huang (2018-11-29 23:23:47)
> > > Same as other i.MX6 SoCs, ensure unused MMDC channel's handshake is
> > > bypassed, this is to make sure no request signal will be generated
> > > when periphe_clk_sel is changed or SRC warm reset is triggered.
> > >
> > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > 
> > Does this need a fixes tag?
> 
> Normally this bit is 1b'1 by reset, but during our development, it used to be
> overwritten in u-boot and lead to some clock operation fail in Linux kernel, that is why we ensure it
> in clock driver early phase. IMO, it should be OK to not add a fix tag, since it is just
> to make sure the setting is correct and NOT depends on the hardware reset value which
> could be changed in u-boot.
> 
> 

Hmm ok.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] clk: imx6sl: ensure MMDC CH0 handshake is bypassed
  2018-11-30  7:23 [PATCH] clk: imx6sl: ensure MMDC CH0 handshake is bypassed Anson Huang
  2018-11-30  7:25 ` Stephen Boyd
@ 2018-12-10 19:34 ` Stephen Boyd
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2018-12-10 19:34 UTC (permalink / raw)
  To: kernel, linux-arm-kernel, linux-clk, linux-kernel, mturquette,
	s.hauer, shawnguo, Anson Huang, Fabio Estevam
  Cc: dl-linux-imx

Quoting Anson Huang (2018-11-29 23:23:47)
> Same as other i.MX6 SoCs, ensure unused MMDC channel's
> handshake is bypassed, this is to make sure no request
> signal will be generated when periphe_clk_sel is changed
> or SRC warm reset is triggered.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---

Applied to clk-next


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-12-10 19:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-30  7:23 [PATCH] clk: imx6sl: ensure MMDC CH0 handshake is bypassed Anson Huang
2018-11-30  7:25 ` Stephen Boyd
2018-11-30  7:37   ` Anson Huang
2018-11-30  8:10     ` Stephen Boyd
2018-12-10 19:34 ` Stephen Boyd

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).