public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] imx: mx6sx: Disable ENET clock before switching clock parent
@ 2016-10-08  8:58 Peng Fan
  2016-10-28  5:26 ` Peng Fan
  2016-11-14  8:21 ` Stefano Babic
  0 siblings, 2 replies; 3+ messages in thread
From: Peng Fan @ 2016-10-08  8:58 UTC (permalink / raw)
  To: u-boot

From: "Ye.Li" <ye.li@nxp.com>

Need to gate ENET clock when switching to a new clock parent, because
the mux is not glitchless.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye.Li <ye.li@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 arch/arm/cpu/armv7/mx6/clock.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
index ae3143c..96fbd81 100644
--- a/arch/arm/cpu/armv7/mx6/clock.c
+++ b/arch/arm/cpu/armv7/mx6/clock.c
@@ -881,6 +881,11 @@ int enable_fec_anatop_clock(int fec_id, enum enet_freq freq)
 	writel(reg, &anatop->pll_enet);
 
 #ifdef CONFIG_MX6SX
+	/* Disable enet system clcok before switching clock parent */
+	reg = readl(&imx_ccm->CCGR3);
+	reg &= ~MXC_CCM_CCGR3_ENET_MASK;
+	writel(reg, &imx_ccm->CCGR3);
+
 	/*
 	 * Set enet ahb clock to 200MHz
 	 * pll2_pfd2_396m-> ENET_PODF-> ENET_AHB
-- 
2.6.2

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

* [U-Boot] [PATCH] imx: mx6sx: Disable ENET clock before switching clock parent
  2016-10-08  8:58 [U-Boot] [PATCH] imx: mx6sx: Disable ENET clock before switching clock parent Peng Fan
@ 2016-10-28  5:26 ` Peng Fan
  2016-11-14  8:21 ` Stefano Babic
  1 sibling, 0 replies; 3+ messages in thread
From: Peng Fan @ 2016-10-28  5:26 UTC (permalink / raw)
  To: u-boot

Hi Stefano,

Ping..

Thanks,
Peng.
On Sat, Oct 08, 2016 at 04:58:29PM +0800, Peng Fan wrote:
>From: "Ye.Li" <ye.li@nxp.com>
>
>Need to gate ENET clock when switching to a new clock parent, because
>the mux is not glitchless.
>
>Signed-off-by: Peng Fan <peng.fan@nxp.com>
>Signed-off-by: Ye.Li <ye.li@nxp.com>
>Cc: Stefano Babic <sbabic@denx.de>
>---
> arch/arm/cpu/armv7/mx6/clock.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
>diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
>index ae3143c..96fbd81 100644
>--- a/arch/arm/cpu/armv7/mx6/clock.c
>+++ b/arch/arm/cpu/armv7/mx6/clock.c
>@@ -881,6 +881,11 @@ int enable_fec_anatop_clock(int fec_id, enum enet_freq freq)
> 	writel(reg, &anatop->pll_enet);
> 
> #ifdef CONFIG_MX6SX
>+	/* Disable enet system clcok before switching clock parent */
>+	reg = readl(&imx_ccm->CCGR3);
>+	reg &= ~MXC_CCM_CCGR3_ENET_MASK;
>+	writel(reg, &imx_ccm->CCGR3);
>+
> 	/*
> 	 * Set enet ahb clock to 200MHz
> 	 * pll2_pfd2_396m-> ENET_PODF-> ENET_AHB
>-- 
>2.6.2
>

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

* [U-Boot] [PATCH] imx: mx6sx: Disable ENET clock before switching clock parent
  2016-10-08  8:58 [U-Boot] [PATCH] imx: mx6sx: Disable ENET clock before switching clock parent Peng Fan
  2016-10-28  5:26 ` Peng Fan
@ 2016-11-14  8:21 ` Stefano Babic
  1 sibling, 0 replies; 3+ messages in thread
From: Stefano Babic @ 2016-11-14  8:21 UTC (permalink / raw)
  To: u-boot

Hi Peng,

On 08/10/2016 10:58, Peng Fan wrote:
> From: "Ye.Li" <ye.li@nxp.com>
> 
> Need to gate ENET clock when switching to a new clock parent, because
> the mux is not glitchless.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Signed-off-by: Ye.Li <ye.li@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
>  arch/arm/cpu/armv7/mx6/clock.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
> index ae3143c..96fbd81 100644
> --- a/arch/arm/cpu/armv7/mx6/clock.c
> +++ b/arch/arm/cpu/armv7/mx6/clock.c
> @@ -881,6 +881,11 @@ int enable_fec_anatop_clock(int fec_id, enum enet_freq freq)
>  	writel(reg, &anatop->pll_enet);
>  
>  #ifdef CONFIG_MX6SX
> +	/* Disable enet system clcok before switching clock parent */
> +	reg = readl(&imx_ccm->CCGR3);
> +	reg &= ~MXC_CCM_CCGR3_ENET_MASK;
> +	writel(reg, &imx_ccm->CCGR3);
> +
>  	/*
>  	 * Set enet ahb clock to 200MHz
>  	 * pll2_pfd2_396m-> ENET_PODF-> ENET_AHB
> 

Applied to u-boot-imx, -next branch, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

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

end of thread, other threads:[~2016-11-14  8:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-08  8:58 [U-Boot] [PATCH] imx: mx6sx: Disable ENET clock before switching clock parent Peng Fan
2016-10-28  5:26 ` Peng Fan
2016-11-14  8:21 ` Stefano Babic

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