diff options
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 5fb11af5643d..1cf7a53b73d1 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -357,17 +357,23 @@ static void __init imx6q_opp_check_speed_grading(struct device *cpu_dev) */ val = readl_relaxed(base + OCOTP_CFG3); val >>= OCOTP_CFG3_SPEED_SHIFT; + val &= 3; if (cpu_is_imx6q()) { - if ((val & 0x3) < OCOTP_CFG3_SPEED_1P2GHZ) + if (!val) { + /* fuses not set for IMX_CHIP_REVISION_1_0 */ + if (imx_get_soc_revision() == IMX_CHIP_REVISION_1_0) + val = OCOTP_CFG3_SPEED_1GHZ; + } + if (val < OCOTP_CFG3_SPEED_1P2GHZ) if (opp_disable(cpu_dev, 1200000000)) pr_warn("failed to disable 1.2 GHz OPP\n"); } - if ((val & 0x3) < OCOTP_CFG3_SPEED_1GHZ) + if (val < OCOTP_CFG3_SPEED_1GHZ) if (opp_disable(cpu_dev, 996000000)) pr_warn("failed to disable 1 GHz OPP\n"); if (cpu_is_imx6q()) { - if ((val & 0x3) < OCOTP_CFG3_SPEED_850MHZ || - (val & 0x3) == OCOTP_CFG3_SPEED_1GHZ) + if (val < OCOTP_CFG3_SPEED_850MHZ || + val == OCOTP_CFG3_SPEED_1GHZ) if (opp_disable(cpu_dev, 852000000)) pr_warn("failed to disable 850 MHz OPP\n"); } |