public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] mx6: clock: Allow enable_ipu_clock() to be built for SPL code
@ 2019-07-12 12:32 Fabio Estevam
  2019-07-12 12:32 ` [U-Boot] [PATCH 2/4] mx6: clock: Use setbits_le32() Fabio Estevam
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Fabio Estevam @ 2019-07-12 12:32 UTC (permalink / raw)
  To: u-boot

Allow enable_ipu_clock() to be built for SPL code. This is done
in preparation for configuring the NoC registers on i.MX6QP in SPL.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 arch/arm/mach-imx/mx6/clock.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-imx/mx6/clock.c b/arch/arm/mach-imx/mx6/clock.c
index 366a4e3c6b..5af1ae7cf3 100644
--- a/arch/arm/mach-imx/mx6/clock.c
+++ b/arch/arm/mach-imx/mx6/clock.c
@@ -1275,6 +1275,22 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
 	return 0;
 }
 
+#ifndef CONFIG_MX6SX
+void enable_ipu_clock(void)
+{
+	struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
+	int reg;
+	reg = readl(&mxc_ccm->CCGR3);
+	reg |= MXC_CCM_CCGR3_IPU1_IPU_MASK;
+	writel(reg, &mxc_ccm->CCGR3);
+
+	if (is_mx6dqp()) {
+		setbits_le32(&mxc_ccm->CCGR6, MXC_CCM_CCGR6_PRG_CLK0_MASK);
+		setbits_le32(&mxc_ccm->CCGR3, MXC_CCM_CCGR3_IPU2_IPU_MASK);
+	}
+}
+#endif
+
 #ifndef CONFIG_SPL_BUILD
 /*
  * Dump some core clockes.
@@ -1311,22 +1327,6 @@ int do_mx6_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-#ifndef CONFIG_MX6SX
-void enable_ipu_clock(void)
-{
-	struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
-	int reg;
-	reg = readl(&mxc_ccm->CCGR3);
-	reg |= MXC_CCM_CCGR3_IPU1_IPU_MASK;
-	writel(reg, &mxc_ccm->CCGR3);
-
-	if (is_mx6dqp()) {
-		setbits_le32(&mxc_ccm->CCGR6, MXC_CCM_CCGR6_PRG_CLK0_MASK);
-		setbits_le32(&mxc_ccm->CCGR3, MXC_CCM_CCGR3_IPU2_IPU_MASK);
-	}
-}
-#endif
-
 #if defined(CONFIG_MX6Q) || defined(CONFIG_MX6D) || defined(CONFIG_MX6DL) || \
 	defined(CONFIG_MX6S)
 static void disable_ldb_di_clock_sources(void)
-- 
2.17.1

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

end of thread, other threads:[~2019-11-04 12:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-12 12:32 [U-Boot] [PATCH 1/4] mx6: clock: Allow enable_ipu_clock() to be built for SPL code Fabio Estevam
2019-07-12 12:32 ` [U-Boot] [PATCH 2/4] mx6: clock: Use setbits_le32() Fabio Estevam
2019-07-16  2:07   ` Peng Fan
2019-07-12 12:32 ` [U-Boot] [PATCH 3/4] mx6: clock: Introduce disable_ipu_clock() Fabio Estevam
2019-07-16  2:07   ` Peng Fan
2019-07-12 12:32 ` [U-Boot] [PATCH 4/4] mx6: Allow configuring the NoC registers on i.MX6QP Fabio Estevam
2019-07-15  1:55   ` Peng Fan
2019-07-15 11:37     ` Fabio Estevam
2019-07-16  2:07   ` Peng Fan
2019-10-24 13:47   ` Fabio Estevam
2019-11-03 12:17     ` Stefano Babic
2019-11-03 16:06       ` Stefano Babic
2019-11-04 12:45         ` Fabio Estevam
2019-07-16  2:07 ` [U-Boot] [PATCH 1/4] mx6: clock: Allow enable_ipu_clock() to be built for SPL code Peng Fan
2019-09-17 17:04 ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox