MLK-21549-1 cpufreq: imx6q: Add support for imx6ulz
authorVipul Kumar <vipul_kumar@mentor.com>
Sun, 28 Apr 2019 05:14:11 +0000 (10:44 +0530)
committerLeonard Crestez <leonard.crestez@nxp.com>
Thu, 2 May 2019 09:11:35 +0000 (12:11 +0300)
This patch add support for imx6ulz board to read the cpu frequency from the
OPP table.

Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
drivers/cpufreq/imx6q-cpufreq.c

index 1f7e58c..04dbd77 100644 (file)
@@ -391,6 +391,7 @@ static int imx6ul_opp_check_speed_grading(struct device *dev)
                void __iomem *base;
 
                np = of_find_compatible_node(NULL, NULL, "fsl,imx6ul-ocotp");
+
                if (!np)
                        return -ENOENT;
 
@@ -422,7 +423,8 @@ static int imx6ul_opp_check_speed_grading(struct device *dev)
                                dev_warn(dev, "failed to disable 696MHz OPP\n");
        }
 
-       if (of_machine_is_compatible("fsl,imx6ull")) {
+       if (of_machine_is_compatible("fsl,imx6ull") ||
+           of_machine_is_compatible("fsl,imx6ulz")) {
                if (val != OCOTP_CFG3_6ULL_SPEED_792MHZ)
                        if (dev_pm_opp_disable(dev, 792000000))
                                dev_warn(dev, "failed to disable 792MHz OPP\n");
@@ -552,7 +554,8 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
        }
 
        if (of_machine_is_compatible("fsl,imx6ul") ||
-           of_machine_is_compatible("fsl,imx6ull")) {
+           of_machine_is_compatible("fsl,imx6ull") ||
+           of_machine_is_compatible("fsl,imx6ulz")) {
                ret = imx6ul_opp_check_speed_grading(cpu_dev);
                if (ret == -EPROBE_DEFER)
                        return ret;