* [PATCH] soc: imx: imx8m-blk-ctrl: Defer probe if 'bus' genpd is not yet ready
@ 2022-09-13 9:06 ` Benjamin Gaignard
0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Gaignard @ 2022-09-13 9:06 UTC (permalink / raw)
To: shawnguo, s.hauer, kernel, festevam, linux-imx
Cc: linux-arm-kernel, linux-kernel, kernel, Benjamin Gaignard
Depending of the boot sequence 'bus' genpd could be probed after imx8m-blk-ctrl
which led driver probe to fail. Change the returned error to allow
to defer the probe in this case.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
drivers/soc/imx/imx8m-blk-ctrl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
index dff7529268e4..99f5226a465b 100644
--- a/drivers/soc/imx/imx8m-blk-ctrl.c
+++ b/drivers/soc/imx/imx8m-blk-ctrl.c
@@ -215,8 +215,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
if (IS_ERR(bc->bus_power_dev))
- return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
- "failed to attach power domain \"bus\"\n");
+ return -EPROBE_DEFER;
for (i = 0; i < bc_data->num_domains; i++) {
const struct imx8m_blk_ctrl_domain_data *data = &bc_data->domains[i];
--
2.32.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] soc: imx: imx8m-blk-ctrl: Defer probe if 'bus' genpd is not yet ready
@ 2022-09-13 9:06 ` Benjamin Gaignard
0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Gaignard @ 2022-09-13 9:06 UTC (permalink / raw)
To: shawnguo, s.hauer, kernel, festevam, linux-imx
Cc: linux-arm-kernel, linux-kernel, kernel, Benjamin Gaignard
Depending of the boot sequence 'bus' genpd could be probed after imx8m-blk-ctrl
which led driver probe to fail. Change the returned error to allow
to defer the probe in this case.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
drivers/soc/imx/imx8m-blk-ctrl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
index dff7529268e4..99f5226a465b 100644
--- a/drivers/soc/imx/imx8m-blk-ctrl.c
+++ b/drivers/soc/imx/imx8m-blk-ctrl.c
@@ -215,8 +215,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
if (IS_ERR(bc->bus_power_dev))
- return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
- "failed to attach power domain \"bus\"\n");
+ return -EPROBE_DEFER;
for (i = 0; i < bc_data->num_domains; i++) {
const struct imx8m_blk_ctrl_domain_data *data = &bc_data->domains[i];
--
2.32.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] soc: imx: imx8m-blk-ctrl: Defer probe if 'bus' genpd is not yet ready
2022-09-13 9:06 ` Benjamin Gaignard
@ 2022-09-13 9:19 ` Ahmad Fatoum
-1 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2022-09-13 9:19 UTC (permalink / raw)
To: Benjamin Gaignard, shawnguo, s.hauer, kernel, festevam, linux-imx
Cc: kernel, linux-kernel, linux-arm-kernel
Hello Benjamin,
On 13.09.22 11:06, Benjamin Gaignard wrote:
> Depending of the boot sequence 'bus' genpd could be probed after imx8m-blk-ctrl
> which led driver probe to fail. Change the returned error to allow
> to defer the probe in this case.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> ---
> drivers/soc/imx/imx8m-blk-ctrl.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
> index dff7529268e4..99f5226a465b 100644
> --- a/drivers/soc/imx/imx8m-blk-ctrl.c
> +++ b/drivers/soc/imx/imx8m-blk-ctrl.c
> @@ -215,8 +215,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
>
> bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
> if (IS_ERR(bc->bus_power_dev))
> - return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
> - "failed to attach power domain \"bus\"\n");
> + return -EPROBE_DEFER;
If probe is deferred indefinitely, you lose the very helpful probe error message.
Please translate error code instead and keep the dev_err_probe call.
Cheers,
Ahmad
>
> for (i = 0; i < bc_data->num_domains; i++) {
> const struct imx8m_blk_ctrl_domain_data *data = &bc_data->domains[i];
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] soc: imx: imx8m-blk-ctrl: Defer probe if 'bus' genpd is not yet ready
@ 2022-09-13 9:19 ` Ahmad Fatoum
0 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2022-09-13 9:19 UTC (permalink / raw)
To: Benjamin Gaignard, shawnguo, s.hauer, kernel, festevam, linux-imx
Cc: kernel, linux-kernel, linux-arm-kernel
Hello Benjamin,
On 13.09.22 11:06, Benjamin Gaignard wrote:
> Depending of the boot sequence 'bus' genpd could be probed after imx8m-blk-ctrl
> which led driver probe to fail. Change the returned error to allow
> to defer the probe in this case.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> ---
> drivers/soc/imx/imx8m-blk-ctrl.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
> index dff7529268e4..99f5226a465b 100644
> --- a/drivers/soc/imx/imx8m-blk-ctrl.c
> +++ b/drivers/soc/imx/imx8m-blk-ctrl.c
> @@ -215,8 +215,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
>
> bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
> if (IS_ERR(bc->bus_power_dev))
> - return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
> - "failed to attach power domain \"bus\"\n");
> + return -EPROBE_DEFER;
If probe is deferred indefinitely, you lose the very helpful probe error message.
Please translate error code instead and keep the dev_err_probe call.
Cheers,
Ahmad
>
> for (i = 0; i < bc_data->num_domains; i++) {
> const struct imx8m_blk_ctrl_domain_data *data = &bc_data->domains[i];
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-13 9:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-13 9:06 [PATCH] soc: imx: imx8m-blk-ctrl: Defer probe if 'bus' genpd is not yet ready Benjamin Gaignard
2022-09-13 9:06 ` Benjamin Gaignard
2022-09-13 9:19 ` Ahmad Fatoum
2022-09-13 9:19 ` Ahmad Fatoum
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.