aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci
diff options
context:
space:
mode:
authorSekhar Nori <nsekhar@ti.com>2010-12-20 11:01:34 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2010-12-22 14:45:29 -0500
commit28bd2c341120db346f30b3ba11b4eac06b2cc981 (patch)
tree0d8ffe7c3fa118cb6afe063fe9601eefa213ddc7 /arch/arm/mach-davinci
parent39e145500458bd68d1d33adfa256886900b1597b (diff)
davinci: am18x/da850/omap-l138 evm: add support for higher speed grades
Apart from the regular AM18x/DA850/OMAP-L138 SoC operating at 300MHz, these SoCs have variants that can operate at a maximum of 456MHz. Variants at 408Mhz and 375 Mhz are available as well. Not all silicon is qualified to run at higher speeds and unfortunately the maximum speed the chip can support can only be determined from the label on the package (not software readable). The EVM hardware for all these variants is the same (except for the actual SoC populated). U-Boot on the EVM sets up ATAG_REVISION to inform the OS regarding the speed grade supported by the silicon. We use this information to pass on the speed grade information to the SoC code. Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 2139ce8606cf..b01fb2ab944a 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -822,7 +822,7 @@ static struct regulator_init_data tps65070_regulator_data[] = {
822 { 822 {
823 .constraints = { 823 .constraints = {
824 .min_uV = 950000, 824 .min_uV = 950000,
825 .max_uV = 1320000, 825 .max_uV = 1350000,
826 .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE | 826 .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
827 REGULATOR_CHANGE_STATUS), 827 REGULATOR_CHANGE_STATUS),
828 .boot_on = 1, 828 .boot_on = 1,
@@ -1018,6 +1018,27 @@ static struct edma_rsv_info *da850_edma_rsv[2] = {
1018 &da850_edma_cc1_rsv, 1018 &da850_edma_cc1_rsv,
1019}; 1019};
1020 1020
1021#ifdef CONFIG_CPU_FREQ
1022static __init int da850_evm_init_cpufreq(void)
1023{
1024 switch (system_rev & 0xF) {
1025 case 3:
1026 da850_max_speed = 456000;
1027 break;
1028 case 2:
1029 da850_max_speed = 408000;
1030 break;
1031 case 1:
1032 da850_max_speed = 372000;
1033 break;
1034 }
1035
1036 return da850_register_cpufreq("pll0_sysclk3");
1037}
1038#else
1039static __init int da850_evm_init_cpufreq(void) { return 0; }
1040#endif
1041
1021static __init void da850_evm_init(void) 1042static __init void da850_evm_init(void)
1022{ 1043{
1023 int ret; 1044 int ret;
@@ -1118,7 +1139,7 @@ static __init void da850_evm_init(void)
1118 if (ret) 1139 if (ret)
1119 pr_warning("da850_evm_init: rtc setup failed: %d\n", ret); 1140 pr_warning("da850_evm_init: rtc setup failed: %d\n", ret);
1120 1141
1121 ret = da850_register_cpufreq("pll0_sysclk3"); 1142 ret = da850_evm_init_cpufreq();
1122 if (ret) 1143 if (ret)
1123 pr_warning("da850_evm_init: cpufreq registration failed: %d\n", 1144 pr_warning("da850_evm_init: cpufreq registration failed: %d\n",
1124 ret); 1145 ret);