mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Eric Bénard" <eric@eukrea.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] Add support for Eukrea CPUIMX35
Date: Thu, 10 Jun 2010 13:42:02 +0200	[thread overview]
Message-ID: <20100610114202.GK20799@pengutronix.de> (raw)
In-Reply-To: <1276155782-6173-1-git-send-email-eric@eukrea.com>

Hi Eric,

On Thu, Jun 10, 2010 at 09:43:02AM +0200, Eric Bénard wrote:
> +
> +#define MPCTL_PARAM_399     (IMX_PLL_PD(0) | IMX_PLL_MFD(15) | IMX_PLL_MFI(8) | IMX_PLL_MFN(5))
> +#define MPCTL_PARAM_532     ((1 << 31) | IMX_PLL_PD(0) | IMX_PLL_MFD(11) | IMX_PLL_MFI(11) | IMX_PLL_MFN(1))
> +
> +static int do_cpufreq(struct command *cmdtp, int argc, char *argv[])
> +{
> +	unsigned long freq;
> +
> +	if (argc != 2)
> +		return COMMAND_ERROR_USAGE;
> +
> +	freq = simple_strtoul(argv[1], NULL, 0);
> +
> +	switch (freq) {
> +	case 399:
> +		writel(MPCTL_PARAM_399, IMX_CCM_BASE + CCM_MPCTL);
> +		break;
> +	case 532:
> +		writel(MPCTL_PARAM_532, IMX_CCM_BASE + CCM_MPCTL);
> +		break;
> +	default:
> +		return COMMAND_ERROR_USAGE;
> +	}
> +
> +	printf("Switched CPU frequency to %dMHz\n", freq);
> +
> +	return 0;
> +}

I originally added this to the phyCORE i.MX35 board because we had
problems running it at 532 MHz. If you do not have it you probably don't
need it. Though I can keep it if you wish.

Sascha

-- 
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

  reply	other threads:[~2010-06-10 11:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10  7:43 Eric Bénard
2010-06-10 11:42 ` Sascha Hauer [this message]
2010-06-10 13:26   ` Eric Bénard

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=20100610114202.GK20799@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=eric@eukrea.com \
    /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