Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2350)

Unified Diff: arch/arm/mach-tegra/cpu-tegra.c

Issue 6116004: Add 1.2GHz cpu clock support for T25 (Closed) Base URL: http://git.chromium.org/git/kernel-next.git@chromeos-2.6.36
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | arch/arm/mach-tegra/tegra2_clocks.c » ('j') | arch/arm/mach-tegra/tegra2_clocks.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | arch/arm/mach-tegra/tegra2_clocks.c » ('j') | arch/arm/mach-tegra/tegra2_clocks.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698