summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Nikolaus Schaller <hns@goldelico.com>2012-09-10 13:32:47 +0200
committerH. Nikolaus Schaller <hns@goldelico.com>2012-09-10 13:32:47 +0200
commit944883249116ee86a77689313db94228d93ea333 (patch)
tree1e01ee8c01b33596dc4692d157ec6ded805425b3
parent7b9eba9e0c2976682eb53e06c595676d3677b7c3 (diff)
downloadbootable_bootloader_goldelico_gta04-944883249116ee86a77689313db94228d93ea333.zip
bootable_bootloader_goldelico_gta04-944883249116ee86a77689313db94228d93ea333.tar.gz
bootable_bootloader_goldelico_gta04-944883249116ee86a77689313db94228d93ea333.tar.bz2
report max. CPU clock rate reported by chip identification as "mpurate=800" or "mpurate=1000"
-rw-r--r--u-boot/board/goldelico/gta04/gta04.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/u-boot/board/goldelico/gta04/gta04.c b/u-boot/board/goldelico/gta04/gta04.c
index cd9e9d2..28baaa4 100644
--- a/u-boot/board/goldelico/gta04/gta04.c
+++ b/u-boot/board/goldelico/gta04/gta04.c
@@ -168,11 +168,21 @@ int misc_init_r(void)
TWL4030_PM_RECEIVER_DEV_GRP_P1);
#endif
- if (get_cpu_family() == CPU_OMAP36XX)
- setenv("mpurate", "800");
- else
- setenv("mpurate", "600");
-
+ 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:
+ if(readw(0x4800244C) & (1<<9)) /* check the "Speed Binned" bit for AM/DM37xx */
+ setenv("mpurate", "1000");
+ else
+ setenv("mpurate", "800");
+ break;
+ }
twl4030_power_init();
// we have no LEDs on TPS on GTA04