From 7cb22f97ee41f344cf6542c077abf124c38ec5c6 Mon Sep 17 00:00:00 2001 From: wdenk Date: Sat, 27 Dec 2003 19:24:54 +0000 Subject: * Make CPU clock on ICA-IP board controllable by a "cpuclk" environment variable which can set to "100", "133", or "150". The CPU clock will be configured accordingly upon next reboot. Other values are ignored. In case of an invalid or undefined "cpuclk" value, the compile-time default CPU clock speed will be used. * Enable Quad-UART on BMS2003 board (initialize the PCMCIA memory window that is used to access the UART registers by the Linux driver) * Patch by Reinhard Meyer, 20 Dec 2003: Fix clock calculation for the MPC5200 for higher clock frequencies (above 2**32 / 10 = 429.5 MHz). --- cpu/mips/incaip_clock.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'cpu/mips') diff --git a/cpu/mips/incaip_clock.c b/cpu/mips/incaip_clock.c index 27f0609..4ae06b7 100644 --- a/cpu/mips/incaip_clock.c +++ b/cpu/mips/incaip_clock.c @@ -102,3 +102,18 @@ uint incaip_get_fpiclk(void) break; } } + +int incaip_set_cpuclk(void) +{ + uchar tmp[64]; + ulong cpuclk; + + if (getenv_r("cpuclk", tmp, sizeof(tmp)) > 0) + { + cpuclk = simple_strtoul(tmp, NULL, 10) * 1000000; + ebu_init(cpuclk); + cgu_init(cpuclk); + } + + return 0; +} -- cgit v1.1