[PATCH] Add support for Eukrea CPUIMX35
Sascha Hauer
s.hauer at pengutronix.de
Thu Jun 10 07:42:02 EDT 2010
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 |
More information about the barebox
mailing list