summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuinn Jensen <quinn.jensen@freescale.com>2007-10-24 21:27:00 -0600
committerQuinn Jensen <quinn.jensen@freescale.com>2007-10-24 21:27:00 -0600
commitdab791258cfcb001b01f96053d53faa1a5a52ced (patch)
treeaff624cfdd1177c77d15905d79ac1c08b3a6d86d
parent4de82860cc284cec3afdbfb103a54f96133b0a2a (diff)
Bugzilla 802 - Fix MX3 DVFS/DPTC table initialization
Patch for Bugzilla 802 - Fix MX3 DVFS/DPTC table initialization on linux 2.6.22 kernel for MX3 platforms. dvfs_dptc_init_default() gives MX32 the wrong default tables. This patch corrects the logic for MX32, while maintaining proper support for MX31 TO2. A side effect of this patch is to fix another instance of the obscure "register swizzle" bug, wherein a general register gets corrupted and causes various kernel oops crashes. http://www.bitshrine.org/gpp/linux-2.6.22-mx-Bugzilla-802-Fix-MX3-DVFS-DPTC-table-initi.patch
-rw-r--r--drivers/mxc/pm/dvfs_dptc.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/mxc/pm/dvfs_dptc.c b/drivers/mxc/pm/dvfs_dptc.c
index 50b22c9defaf..1339de6af7cc 100644
--- a/drivers/mxc/pm/dvfs_dptc.c
+++ b/drivers/mxc/pm/dvfs_dptc.c
@@ -423,20 +423,14 @@ static int __init dvfs_dptc_init_default_table(void)
}
table_str = default_table_str;
- if (cpu_is_mx31() || cpu_is_mx32()) {
- if (cpu_is_mx31_rev(CHIP_REV_2_0) < 0) {
- clk = clk_get(NULL, "ckih");
- if (clk_get_rate(clk) == 27000000) {
- printk(KERN_INFO
- "DVFS & DPTC: using 27MHz CKIH table\n");
-#ifdef CONFIG_ARCH_MX3
- table_str = default_table_str_27ckih;
-#endif
- }
- } else {
-#ifdef CONFIG_ARCH_MX3
- table_str = default_table_str_rev2;
-#endif
+ if (cpu_is_mx31_rev(CHIP_REV_2_0) >= 1) {
+ table_str = default_table_str_rev2;
+ } else {
+ clk = clk_get(NULL, "ckih");
+ if (clk_get_rate(clk) == 27000000) {
+ printk(KERN_INFO
+ "DVFS & DPTC: using 27MHz CKIH table\n");
+ table_str = default_table_str_27ckih;
}
clk_put(clk);
}