diff options
author | Robin Gong <b38343@freescale.com> | 2013-03-14 17:19:44 +0800 |
---|---|---|
committer | Robin Gong <b38343@freescale.com> | 2013-03-14 19:20:18 +0800 |
commit | e58db7bada848c0bb72dfe31b3dadb4ab86a3567 (patch) | |
tree | 7fc7dc16b6cb0498935eddf52b0d4bba8c8d0be0 /arch | |
parent | 340b887e2c5be292406681ced4bb88675cd62b9f (diff) |
ENGR00254267 MX6DL/MX6SL max freq: Fix max cpu freq at 1G on MX6DL ARD
For MX6DL,align max cpufreq judge by SPEED_GRADING fuse bit with MX6DQ.
For MX6SL without the fuse bit, we need add condition check, if found
arm_max_freq set by default , change to1G. Else decided by 'arm_freq'
setting by cmdline.
Signed-off-by: Robin Gong <b38343@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mx6/cpu_op-mx6.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/arm/mach-mx6/cpu_op-mx6.c b/arch/arm/mach-mx6/cpu_op-mx6.c index 541861832543..210fdd536c57 100644 --- a/arch/arm/mach-mx6/cpu_op-mx6.c +++ b/arch/arm/mach-mx6/cpu_op-mx6.c @@ -342,17 +342,25 @@ void mx6_cpu_op_init(void) { unsigned int reg; void __iomem *base; - if (cpu_is_mx6q()) { + if (!cpu_is_mx6sl()) { /*read fuse bit to know the max cpu freq : offset 0x440 - * bit[17:16]:SPEED_GRADING[1:0]*/ + * 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 - arm_max_freq = CPU_AT_1GHz;/*mx6dl/sl max freq is 1Ghz*/ + } 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*/ + } 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; |