From 158f94a714e99054e38ad4a37f70d7b00fc5aac1 Mon Sep 17 00:00:00 2001 From: Vipul Kumar Date: Sun, 28 Apr 2019 10:44:11 +0530 Subject: [PATCH] MLK-21549-1 cpufreq: imx6q: Add support for imx6ulz This patch add support for imx6ulz board to read the cpu frequency from the OPP table. Signed-off-by: Vipul Kumar Signed-off-by: Shrikant Bobade --- drivers/cpufreq/imx6q-cpufreq.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 1f7e58cf8fbc..04dbd770d9dd 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -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; -- 2.17.1