From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] mx6sx: Adjust enable_fec_anatop_clock() for mx6solox
Date: Wed, 20 Aug 2014 13:14:36 +0200 [thread overview]
Message-ID: <53F4831C.8090207@denx.de> (raw)
In-Reply-To: <1408073070-8957-2-git-send-email-festevam@gmail.com>
Hi Fabio,
On 15/08/2014 05:24, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Configure and enable the ethernet clock for mx6solox.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> arch/arm/cpu/armv7/mx6/clock.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
> index abd9d61..820b8d5 100644
> --- a/arch/arm/cpu/armv7/mx6/clock.c
> +++ b/arch/arm/cpu/armv7/mx6/clock.c
> @@ -373,6 +373,27 @@ int enable_fec_anatop_clock(enum enet_freq freq)
> reg &= ~BM_ANADIG_PLL_ENET_BYPASS;
> writel(reg, &anatop->pll_enet);
>
> +#ifdef CONFIG_MX6SX
> + /*
> + * Set enet ahb clock to 200MHz
> + * pll2_pfd2_396m-> ENET_PODF-> ENET_AHB
> + */
> + reg = readl(&imx_ccm->chsccdr);
> + reg &= ~(MXC_CCM_CHSCCDR_ENET_PRE_CLK_SEL_MASK
> + | MXC_CCM_CHSCCDR_ENET_PODF_MASK
> + | MXC_CCM_CHSCCDR_ENET_CLK_SEL_MASK);
> + /* PLL2 PFD2 */
> + reg |= (4 << MXC_CCM_CHSCCDR_ENET_PRE_CLK_SEL_OFFSET);
> + /* Div = 2*/
> + reg |= (1 << MXC_CCM_CHSCCDR_ENET_PODF_OFFSET);
> + reg |= (0 << MXC_CCM_CHSCCDR_ENET_CLK_SEL_OFFSET);
> + writel(reg, &imx_ccm->chsccdr);
> +
> + /* Enable enet system clock */
> + reg = readl(&imx_ccm->CCGR3);
> + reg |= MXC_CCM_CCGR3_ENET_MASK;
> + writel(reg, &imx_ccm->CCGR3);
> +#endif
> return 0;
> }
> #endif
>
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
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
=====================================================================
next prev parent reply other threads:[~2014-08-20 11:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-15 3:24 [U-Boot] [PATCH 2/2] mx6sxsabresd: Add Ethernet support Fabio Estevam
2014-08-15 3:24 ` [U-Boot] [PATCH 1/2] mx6sx: Adjust enable_fec_anatop_clock() for mx6solox Fabio Estevam
2014-08-20 11:14 ` Stefano Babic [this message]
2014-08-20 11:16 ` [U-Boot] [PATCH 2/2] mx6sxsabresd: Add Ethernet support Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53F4831C.8090207@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox