* [PATCH] soc: samsung: asv: don't defer early on not-supported SoCs [not found] <CGME20201207072939eucas1p1029a121730bbc0f3e120c607ec5e3002@eucas1p1.samsung.com> @ 2020-12-07 7:29 ` Marek Szyprowski 2020-12-07 8:10 ` Krzysztof Kozlowski 0 siblings, 1 reply; 4+ messages in thread From: Marek Szyprowski @ 2020-12-07 7:29 UTC (permalink / raw) To: linux-samsung-soc Cc: Marek Szyprowski, Sylwester Nawrocki, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz Check if the SoC is really supported before gathering the needed resources. This fixes endless deffered probe on some SoCs other than Exynos5422 (like Exynos5410). Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- drivers/soc/samsung/exynos-asv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/soc/samsung/exynos-asv.c b/drivers/soc/samsung/exynos-asv.c index 8abf4dfaa5c5..f653e3533f0f 100644 --- a/drivers/soc/samsung/exynos-asv.c +++ b/drivers/soc/samsung/exynos-asv.c @@ -119,11 +119,6 @@ static int exynos_asv_probe(struct platform_device *pdev) u32 product_id = 0; 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); if (!asv) return -ENOMEM; @@ -144,6 +139,11 @@ static int exynos_asv_probe(struct platform_device *pdev) 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", &asv->of_bin); if (ret < 0) -- 2.17.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] soc: samsung: asv: don't defer early on not-supported SoCs 2020-12-07 7:29 ` [PATCH] soc: samsung: asv: don't defer early on not-supported SoCs Marek Szyprowski @ 2020-12-07 8:10 ` Krzysztof Kozlowski 2020-12-07 8:25 ` Krzysztof Kozlowski 0 siblings, 1 reply; 4+ messages in thread From: Krzysztof Kozlowski @ 2020-12-07 8:10 UTC (permalink / raw) To: Marek Szyprowski Cc: linux-samsung-soc, Sylwester Nawrocki, Bartlomiej Zolnierkiewicz On Mon, Dec 07, 2020 at 08:29:28AM +0100, Marek Szyprowski wrote: > Check if the SoC is really supported before gathering the needed > resources. This fixes endless deffered probe on some SoCs other than > Exynos5422 (like Exynos5410). > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> If it really causes endless deffer, then also Cc stable. Fixes: 5ea428595cc5 ("soc: samsung: Add Exynos Adaptive Supply Voltage driver") There is one more problem here - on Exynos5410 or anything else with such chipid node, this will cause -ENODEV probe failures. It should not. Simply, it should not match for them. This could be achieved with another compatible, but it won't really describe the real case here, because it is not Chip ID which is different. The CPU and bus voltages are different, the SoC is different. Maybe this should not match to chip ID at all? Best regards, Krzysztof ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] soc: samsung: asv: don't defer early on not-supported SoCs 2020-12-07 8:10 ` Krzysztof Kozlowski @ 2020-12-07 8:25 ` Krzysztof Kozlowski 2020-12-07 9:16 ` Marek Szyprowski 0 siblings, 1 reply; 4+ messages in thread From: Krzysztof Kozlowski @ 2020-12-07 8:25 UTC (permalink / raw) To: Marek Szyprowski Cc: linux-samsung-soc, Sylwester Nawrocki, Bartlomiej Zolnierkiewicz On Mon, Dec 07, 2020 at 09:10:05AM +0100, Krzysztof Kozlowski wrote: > On Mon, Dec 07, 2020 at 08:29:28AM +0100, Marek Szyprowski wrote: > > Check if the SoC is really supported before gathering the needed > > resources. This fixes endless deffered probe on some SoCs other than > > Exynos5422 (like Exynos5410). > > > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> > > If it really causes endless deffer, then also Cc stable. > Fixes: 5ea428595cc5 ("soc: samsung: Add Exynos Adaptive Supply Voltage driver") > > There is one more problem here - on Exynos5410 or anything else with > such chipid node, this will cause -ENODEV probe failures. It should not. > Simply, it should not match for them. > > This could be achieved with another compatible, but it won't really > describe the real case here, because it is not Chip ID which is > different. The CPU and bus voltages are different, the SoC is different. > Maybe this should not match to chip ID at all? There is another solution which I was checking few days ago (for different reason) - merge Chip ID driver with ASV. We get rid of the arch_initcall() and always bind to Chip ID node. If SoC revision matches, we run the ASV-specific code. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] soc: samsung: asv: don't defer early on not-supported SoCs 2020-12-07 8:25 ` Krzysztof Kozlowski @ 2020-12-07 9:16 ` Marek Szyprowski 0 siblings, 0 replies; 4+ messages in thread From: Marek Szyprowski @ 2020-12-07 9:16 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: linux-samsung-soc, Sylwester Nawrocki, Bartlomiej Zolnierkiewicz Hi Krzysztof, On 07.12.2020 09:25, Krzysztof Kozlowski wrote: > On Mon, Dec 07, 2020 at 09:10:05AM +0100, Krzysztof Kozlowski wrote: >> On Mon, Dec 07, 2020 at 08:29:28AM +0100, Marek Szyprowski wrote: >>> Check if the SoC is really supported before gathering the needed >>> resources. This fixes endless deffered probe on some SoCs other than >>> Exynos5422 (like Exynos5410). >>> >>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> >> If it really causes endless deffer, then also Cc stable. >> Fixes: 5ea428595cc5 ("soc: samsung: Add Exynos Adaptive Supply Voltage driver") >> >> There is one more problem here - on Exynos5410 or anything else with >> such chipid node, this will cause -ENODEV probe failures. It should not. >> Simply, it should not match for them. >> >> This could be achieved with another compatible, but it won't really >> describe the real case here, because it is not Chip ID which is >> different. The CPU and bus voltages are different, the SoC is different. >> Maybe this should not match to chip ID at all? > There is another solution which I was checking few days ago (for > different reason) - merge Chip ID driver with ASV. We get rid of the > arch_initcall() and always bind to Chip ID node. If SoC revision > matches, we run the ASV-specific code. Okay for me. Feel free to post it if have it already done. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-07 9:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20201207072939eucas1p1029a121730bbc0f3e120c607ec5e3002@eucas1p1.samsung.com>
2020-12-07 7:29 ` [PATCH] soc: samsung: asv: don't defer early on not-supported SoCs Marek Szyprowski
2020-12-07 8:10 ` Krzysztof Kozlowski
2020-12-07 8:25 ` Krzysztof Kozlowski
2020-12-07 9:16 ` Marek Szyprowski
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.