From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Teresa Gámez" <t.gamez@phytec.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM pcm043: Check silicon revision to set up cpu freq correct
Date: Tue, 23 Aug 2011 14:45:39 +0200 [thread overview]
Message-ID: <20110823124539.GL31404@pengutronix.de> (raw)
In-Reply-To: <1314102627-12837-1-git-send-email-t.gamez@phytec.de>
On Tue, Aug 23, 2011 at 02:30:27PM +0200, Teresa Gámez wrote:
> Some older pcm043 only work correct when cpu frequency is set up
> to 399MHz. All modules with revision >= 1315.4 are equipped
> with a i.MX35 TO2.1 and do run with 532MHz.
Applied to master.
Sascha
>
> Check the silicon revision and set up the frequency accordingly.
>
> Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
> ---
> arch/arm/boards/pcm043/lowlevel.c | 13 ++++++++++++-
> 1 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/boards/pcm043/lowlevel.c b/arch/arm/boards/pcm043/lowlevel.c
> index bbe586b..e488681 100644
> --- a/arch/arm/boards/pcm043/lowlevel.c
> +++ b/arch/arm/boards/pcm043/lowlevel.c
> @@ -37,6 +37,11 @@
> #define MPCTL_PARAM_532 ((1 << 31) | IMX_PLL_PD(0) | IMX_PLL_MFD(11) | IMX_PLL_MFI(11) | IMX_PLL_MFN(1))
> #define PPCTL_PARAM_300 (IMX_PLL_PD(0) | IMX_PLL_MFD(3) | IMX_PLL_MFI(6) | IMX_PLL_MFN(1))
>
> +#define IMX35_CHIP_REVISION_2_1 0x11
> +
> +#define CCM_PDR0_399 0x00011000
> +#define CCM_PDR0_532 0x00001000
> +
> #ifdef CONFIG_NAND_IMX_BOOT
> static void __bare_init __naked insdram(void)
> {
> @@ -111,7 +116,13 @@ void __bare_init __naked board_init_lowlevel(void)
> writel(MPCTL_PARAM_532, ccm_base + CCM_MPCTL);
>
> writel(PPCTL_PARAM_300, ccm_base + CCM_PPCTL);
> - writel(0x00001000, ccm_base + CCM_PDR0);
> +
> + /* Check silicon revision and use 532MHz if >=2.1 */
> + r = readl(IMX_IIM_BASE + 0x24);
> + if (r >= IMX35_CHIP_REVISION_2_1)
> + writel(CCM_PDR0_532, ccm_base + CCM_PDR0);
> + else
> + writel(CCM_PDR0_399, ccm_base + CCM_PDR0);
>
> r = readl(ccm_base + CCM_CGR0);
> r |= 0x00300000;
> --
> 1.7.0.4
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2011-08-23 12:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-23 12:30 Teresa Gámez
2011-08-23 12:45 ` Sascha Hauer [this message]
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=20110823124539.GL31404@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=t.gamez@phytec.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