Index: arch/arm/mach-tegra/cpu-tegra.c |
diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c |
index 035e1bc3146295894305a7dcf755ade742e7fcd3..371b41ed832f0957aef82055da48e69550454560 100644 |
--- a/arch/arm/mach-tegra/cpu-tegra.c |
+++ b/arch/arm/mach-tegra/cpu-tegra.c |
@@ -36,8 +36,13 @@ |
#include <mach/hardware.h> |
#include <mach/clk.h> |
+#include "fuse.h" |
+ |
+#define SKU_ID_T20 0x08 |
+#define SKU_ID_T25 0x18 |
+ |
/* Frequency table index must be sequential starting at 0 */ |
-static struct cpufreq_frequency_table freq_table[] = { |
+static struct cpufreq_frequency_table freq_table_t20[] = { |
{ 0, 216000 }, |
{ 1, 312000 }, |
{ 2, 456000 }, |
@@ -49,6 +54,21 @@ static struct cpufreq_frequency_table freq_table[] = { |
{ 8, CPUFREQ_TABLE_END }, |
}; |
+static struct cpufreq_frequency_table freq_table_t25[] = { |
+ { 0, 216000 }, |
+ { 1, 312000 }, |
+ { 2, 456000 }, |
+ { 3, 608000 }, |
+ { 4, 760000 }, |
+ { 5, 816000 }, |
+ { 6, 912000 }, |
+ { 7, 1000000 }, |
+ { 8, 1200000 }, |
+ { 9, CPUFREQ_TABLE_END }, |
+}; |
+ |
+static struct cpufreq_frequency_table *freq_table; |
+ |
#define NUM_CPUS 2 |
static struct clk *cpu_clk; |
@@ -192,6 +212,9 @@ static int tegra_cpu_init(struct cpufreq_policy *policy) |
if (policy->cpu >= NUM_CPUS) |
return -EINVAL; |
+ freq_table = (tegra_sku_id() == SKU_ID_T25) ? freq_table_t25 : |
+ freq_table_t20; |
Olof Johansson
2011/01/12 01:05:28
I would prefer to see this as a regular if/else.
jimmzhang
2011/01/12 01:22:56
Sure, I can change it to that way.
|
+ |
cpu_clk = clk_get_sys(NULL, "cpu"); |
if (IS_ERR(cpu_clk)) |
return PTR_ERR(cpu_clk); |