Commit 0458b882 authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Krzysztof Kozlowski

soc: samsung: exynos-asv: don't defer early on not-supported SoCs

Check if the SoC is really supported before gathering the needed
resources. This fixes endless deferred probe on some SoCs other than
Exynos5422 (like Exynos5410).

Fixes: 5ea42859 ("soc: samsung: Add Exynos Adaptive Supply Voltage driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: default avatarPankaj Dubey <pankaj.dubey@samsung.com>
Link: https://lore.kernel.org/r/20201207190517.262051-2-krzk@kernel.orgSigned-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
parent 5c8fe583
...@@ -119,11 +119,6 @@ static int exynos_asv_probe(struct platform_device *pdev) ...@@ -119,11 +119,6 @@ static int exynos_asv_probe(struct platform_device *pdev)
u32 product_id = 0; u32 product_id = 0;
int ret, i; int ret, i;
cpu_dev = get_cpu_device(0);
ret = dev_pm_opp_get_opp_count(cpu_dev);
if (ret < 0)
return -EPROBE_DEFER;
asv = devm_kzalloc(&pdev->dev, sizeof(*asv), GFP_KERNEL); asv = devm_kzalloc(&pdev->dev, sizeof(*asv), GFP_KERNEL);
if (!asv) if (!asv)
return -ENOMEM; return -ENOMEM;
...@@ -144,6 +139,11 @@ static int exynos_asv_probe(struct platform_device *pdev) ...@@ -144,6 +139,11 @@ static int exynos_asv_probe(struct platform_device *pdev)
return -ENODEV; return -ENODEV;
} }
cpu_dev = get_cpu_device(0);
ret = dev_pm_opp_get_opp_count(cpu_dev);
if (ret < 0)
return -EPROBE_DEFER;
ret = of_property_read_u32(pdev->dev.of_node, "samsung,asv-bin", ret = of_property_read_u32(pdev->dev.of_node, "samsung,asv-bin",
&asv->of_bin); &asv->of_bin);
if (ret < 0) if (ret < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment