From 0c7ccfa705f55c74475029169d43519416dd913d Mon Sep 17 00:00:00 2001 From: Tapani Date: Thu, 6 Jun 2013 19:53:42 +0800 Subject: Set iMX6DQ/DL max speed back to 1GHz Commits 13c1310c and 7361e1f0 attempt to read undocumented memory bits (as of TRM released 2013-05-30) to determine CPU speed rating. This calculation appears to disable 1GHz mode for (some?) iMX6 Solo and DualLite CPUs sold by Freescale as 1GHz parts. This patch reverts the changes and hard-hacks the maximum speed to 1GHz for all iMX6 parts until more information is available. (cherry picked from commit 177c82740df1a817ccbe978ca687246e77a0718b) --- arch/arm/mach-mx6/cpu_op-mx6.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/arch/arm/mach-mx6/cpu_op-mx6.c b/arch/arm/mach-mx6/cpu_op-mx6.c index 210fdd536c57..eff57b7fac7d 100644 --- a/arch/arm/mach-mx6/cpu_op-mx6.c +++ b/arch/arm/mach-mx6/cpu_op-mx6.c @@ -342,25 +342,9 @@ void mx6_cpu_op_init(void) { unsigned int reg; void __iomem *base; - if (!cpu_is_mx6sl()) { - /*read fuse bit to know the max cpu freq : offset 0x440 - * bit[17:16]:SPEED_GRADING[1:0],for mx6dq/dl*/ - base = IO_ADDRESS(OCOTP_BASE_ADDR); - reg = __raw_readl(base + 0x440); - reg &= (0x3 << OCOTP_SPEED_BIT_OFFSET); - reg >>= OCOTP_SPEED_BIT_OFFSET; - /*choose the little value to run lower max cpufreq*/ - arm_max_freq = (reg > arm_max_freq) ? arm_max_freq : reg; - } else { - /* - * There is no SPEED_GRADING fuse bit on mx6sl,then do: - * If arm_max_freq set by default on CPU_AT_1_2GHz which mean - * there is no 'arm_freq' setting in cmdline from bootloader, - * force arm_max_freq to 1G. Else use 'arm_freq' setting. - */ - if (arm_max_freq == CPU_AT_1_2GHz) - arm_max_freq = CPU_AT_1GHz;/*mx6sl max freq is 1Ghz*/ - } + + arm_max_freq = CPU_AT_1GHz; + printk(KERN_INFO "arm_max_freq=%s\n", (arm_max_freq == CPU_AT_1_2GHz) ? "1.2GHz" : ((arm_max_freq == CPU_AT_1GHz) ? "1GHz" : "800MHz")); get_cpu_op = mx6_get_cpu_op; -- cgit v1.2.1