Skip to contentSkip to conversation

clk: imx6sl: ensure MMDC CH0 handshake is bypassed

PATCH Applied Anson Huang 2 participants 5 messages Nov 30, 2018 – Dec 10, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: imx6sl: ensure MMDC CH0 handshake is bypassed

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.

---
 drivers/clk/imx/clk-imx6sl.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/clk/imx/clk-imx6sl.c +6 -0
index 6fcfbbd..e13d881 100644
@@ -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;
Signature · 1 line
2.7.4
maintainer
#1 lore raw

Quoting Anson Huang (2018-11-29 23:23:47)

Quoted 6 lines

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.

Does this need a fixes tag?

#2 lore raw

Hi, Stephen

Best Regards!
Anson Huang

Quoted 11 lines

-----Original Message-----
From: Stephen Boyd [mailto:[email protected]]
Sent: 2018年11月30日 15:25
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Anson Huang <[email protected]>; Fabio Estevam <[email protected]>
Cc: dl-linux-imx <[email protected]>
Subject: Re: [PATCH] clk: imx6sl: ensure MMDC CH0 handshake is bypassed

Quoted 8 lines

Quoting Anson Huang (2018-11-29 23:23:47)

Quoted 5 lines

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.

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.

maintainer
#3 lore raw

Quoting Anson Huang (2018-11-29 23:37:14)

Quoted 23 lines

Hi, Stephen

Best Regards!
Anson Huang

Quoted 18 lines

-----Original Message-----
From: Stephen Boyd [mailto:[email protected]]
Sent: 2018年11月30日 15:25
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Anson Huang <[email protected]>; Fabio Estevam <[email protected]>
Cc: dl-linux-imx <[email protected]>
Subject: Re: [PATCH] clk: imx6sl: ensure MMDC CH0 handshake is bypassed

Quoting Anson Huang (2018-11-29 23:23:47)

Quoted 5 lines

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.

Quoted 9 lines
Quoted 1 line

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.

maintainer Applied
#4 lore raw
In reply to Anson Huang

Quoting Anson Huang (2018-11-29 23:23:47)

Quoted 7 lines

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.

---

Applied to clk-next