All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ARM: imx6: Mask mmdc_ch1 handshake for periph2_sel and mmdc_ch1_axi_podf
@ 2015-01-06 15:47 Philipp Zabel
  2015-01-06 15:47 ` [PATCH 2/3] ARM: imx6: Make the LDB_DI0 and LDB_DI1 clocks read-only Philipp Zabel
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Philipp Zabel @ 2015-01-06 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

MMDC CH1 is not used on i.MX6Q, so the handshake needed to change the parent
of periph2_sel or the divider of mmdc_ch1_axi_podf will never succeed.
Disable the handshake mechanism to allow changing the frequency of mmdc_ch1_axi,
allowing to use it as a possible source for the LDB DI clock.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 arch/arm/mach-imx/clk-imx6q.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index 5951660..f2e7cfc 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -120,6 +120,19 @@ static unsigned int share_count_ssi1;
 static unsigned int share_count_ssi2;
 static unsigned int share_count_ssi3;
 
+#define CCM_CCDR		0x04
+
+#define CCDR_MMDC_CH1_MASK	BIT(16)
+
+static void __init imx6q_mmdc_ch1_mask_handshake(void __iomem *ccm_base)
+{
+	unsigned int reg;
+
+	reg = readl_relaxed(ccm_base + CCM_CCDR);
+	reg |= CCDR_MMDC_CH1_MASK;
+	writel_relaxed(reg, ccm_base + CCM_CCDR);
+}
+
 static void __init imx6q_clocks_init(struct device_node *ccm_node)
 {
 	struct device_node *np;
@@ -261,6 +274,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
 	WARN_ON(!base);
 
 	imx6q_pm_set_ccm_base(base);
+	imx6q_mmdc_ch1_mask_handshake(base);
 
 	/*                                              name                reg       shift width parent_names     num_parents */
 	clk[IMX6QDL_CLK_STEP]             = imx_clk_mux("step",	            base + 0xc,  8,  1, step_sels,	   ARRAY_SIZE(step_sels));
-- 
2.1.4

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

end of thread, other threads:[~2015-02-26  8:51 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-06 15:47 [PATCH 1/3] ARM: imx6: Mask mmdc_ch1 handshake for periph2_sel and mmdc_ch1_axi_podf Philipp Zabel
2015-01-06 15:47 ` [PATCH 2/3] ARM: imx6: Make the LDB_DI0 and LDB_DI1 clocks read-only Philipp Zabel
2015-01-06 15:47 ` [PATCH 3/3] ARM: imx6: Fix procedure to switch the parent of LDB_DI_CLK Philipp Zabel
2015-01-08 13:00   ` Shawn Guo
2015-01-15 16:54     ` Fabio Estevam
2015-01-16  9:28       ` Dirk Behme
2015-01-20  6:13         ` Shawn Guo
2015-01-20  6:00       ` Shawn Guo
2015-02-10 11:24   ` Dirk Behme
2015-02-10 15:31     ` Joshua Clayton
2015-02-10 17:21       ` Dirk Behme
2015-02-26  6:32     ` Dirk Behme
2015-02-26  8:51       ` Philipp Zabel
2015-01-07 16:26 ` [PATCH 1/3] ARM: imx6: Mask mmdc_ch1 handshake for periph2_sel and mmdc_ch1_axi_podf Fabio Estevam
2015-01-07 21:24   ` Christian Gmeiner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.