aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Sakoman <steve@sakoman.com>2010-11-04 12:04:52 -0700
committerJohn Rigby <john.rigby@linaro.org>2011-08-15 15:10:46 -0600
commita2a7aec66af978310d1c92ad6ec005f2f63dfe44 (patch)
tree5499d2ea3dde0070adc7b7e91d8a0986e5a2ef35
parent1b90b21756ed2b6914cc20084937e2f54d3b0ece (diff)
downloadu-boot-linaro-stable-a2a7aec66af978310d1c92ad6ec005f2f63dfe44.tar.gz
ARMV7: Overo: Automatically set clock rate to maximum if mpurate env variable is "auto"
The maximum clock rate for the OMAP3 processors on Overo depends on the processor type and revision. This patch sets the clock rate to the spec sheet maximum if the mpurate environment variable is set to "auto". Otherwise it passes the mpurate variable unchanged on the kernel command line. Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
-rw-r--r--board/overo/overo.c16
-rw-r--r--include/configs/omap3_overo.h2
2 files changed, 17 insertions, 1 deletions
diff --git a/board/overo/overo.c b/board/overo/overo.c
index 4eafdb1df..40512a997 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -281,6 +281,22 @@ int misc_init_r(void)
dieid_num_r();
+ if (strcmp(getenv("mpurate"), "auto") == 0)
+ switch (get_cpu_family()) {
+ case CPU_OMAP34XX:
+ if ((get_cpu_rev() >= CPU_3XX_ES31) &&
+ (get_sku_id() == SKUID_CLK_720MHZ))
+ setenv("mpurate", "720");
+ else
+ setenv("mpurate", "600");
+ break;
+ case CPU_OMAP36XX:
+ setenv("mpurate", "720");
+ break;
+ default:
+ setenv("mpurate", "500");
+ }
+
return 0;
}
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index d6e0a0614..3d2d3fdba 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -156,7 +156,7 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
"loadaddr=0x82000000\0" \
"console=ttyS2,115200n8\0" \
- "mpurate=500\0" \
+ "mpurate=auto\0" \
"vram=12M\0" \
"dvimode=1024x768MR-16@60\0" \
"defaultdisplay=dvi\0" \