* [PATCH] power: regulator: tps62360_regulator: Convert ofdata_to_platdata to the missing probe
@ 2020-01-10 9:22 Keerthy
2020-01-10 9:33 ` Lokesh Vutla
2020-01-30 2:17 ` Simon Glass
0 siblings, 2 replies; 3+ messages in thread
From: Keerthy @ 2020-01-10 9:22 UTC (permalink / raw)
To: u-boot
commit 29f7d05a347a ("dm: core: Move ofdata_to_platdata() call earlier")
introduces changes in the order of device_probe execution.
ofdata_to_platdata now comes before the probe function which resulted in
a deadlock and caused boot hang on AM6 devices.
Deadlock sequence: tps62360_regulator_ofdata_to_platdata --> i2c_get_chip
--> device_probe(tps62360) --> tps62360_regulator_ofdata_to_platdata
Hence convert ofdata_to_platdata to the missing probe function to fix the
hang.
Fixes: 22e8f18980d6 ("power: regulator: tps6236x: add support for tps6236x regulators")
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
drivers/power/regulator/tps62360_regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/power/regulator/tps62360_regulator.c b/drivers/power/regulator/tps62360_regulator.c
index 3b123f503c..2c076c0db5 100644
--- a/drivers/power/regulator/tps62360_regulator.c
+++ b/drivers/power/regulator/tps62360_regulator.c
@@ -77,7 +77,7 @@ static int tps62360_regulator_get_value(struct udevice *dev)
return (u32)regval * TPS62360_VSEL_STEPSIZE + pdata->config->vmin;
}
-static int tps62360_regulator_ofdata_to_platdata(struct udevice *dev)
+static int tps62360_regulator_probe(struct udevice *dev)
{
struct tps62360_regulator_pdata *pdata = dev_get_platdata(dev);
u8 vsel0;
@@ -119,5 +119,5 @@ U_BOOT_DRIVER(tps62360_regulator) = {
.ops = &tps62360_regulator_ops,
.of_match = tps62360_regulator_ids,
.platdata_auto_alloc_size = sizeof(struct tps62360_regulator_pdata),
- .ofdata_to_platdata = tps62360_regulator_ofdata_to_platdata,
+ .probe = tps62360_regulator_probe,
};
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] power: regulator: tps62360_regulator: Convert ofdata_to_platdata to the missing probe
2020-01-10 9:22 [PATCH] power: regulator: tps62360_regulator: Convert ofdata_to_platdata to the missing probe Keerthy
@ 2020-01-10 9:33 ` Lokesh Vutla
2020-01-30 2:17 ` Simon Glass
1 sibling, 0 replies; 3+ messages in thread
From: Lokesh Vutla @ 2020-01-10 9:33 UTC (permalink / raw)
To: u-boot
On 10/01/20 2:52 PM, Keerthy wrote:
> commit 29f7d05a347a ("dm: core: Move ofdata_to_platdata() call earlier")
> introduces changes in the order of device_probe execution.
> ofdata_to_platdata now comes before the probe function which resulted in
> a deadlock and caused boot hang on AM6 devices.
>
> Deadlock sequence: tps62360_regulator_ofdata_to_platdata --> i2c_get_chip
> --> device_probe(tps62360) --> tps62360_regulator_ofdata_to_platdata
>
> Hence convert ofdata_to_platdata to the missing probe function to fix the
> hang.
>
> Fixes: 22e8f18980d6 ("power: regulator: tps6236x: add support for tps6236x regulators")
> Signed-off-by: Keerthy <j-keerthy@ti.com>
Thanks. This fixes boot on AM654 evm:
Tested-by: Lokesh Vutla <lokeshvutla@ti.com>
Thanks and regards,
Lokesh
> ---
> drivers/power/regulator/tps62360_regulator.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/power/regulator/tps62360_regulator.c b/drivers/power/regulator/tps62360_regulator.c
> index 3b123f503c..2c076c0db5 100644
> --- a/drivers/power/regulator/tps62360_regulator.c
> +++ b/drivers/power/regulator/tps62360_regulator.c
> @@ -77,7 +77,7 @@ static int tps62360_regulator_get_value(struct udevice *dev)
> return (u32)regval * TPS62360_VSEL_STEPSIZE + pdata->config->vmin;
> }
>
> -static int tps62360_regulator_ofdata_to_platdata(struct udevice *dev)
> +static int tps62360_regulator_probe(struct udevice *dev)
> {
> struct tps62360_regulator_pdata *pdata = dev_get_platdata(dev);
> u8 vsel0;
> @@ -119,5 +119,5 @@ U_BOOT_DRIVER(tps62360_regulator) = {
> .ops = &tps62360_regulator_ops,
> .of_match = tps62360_regulator_ids,
> .platdata_auto_alloc_size = sizeof(struct tps62360_regulator_pdata),
> - .ofdata_to_platdata = tps62360_regulator_ofdata_to_platdata,
> + .probe = tps62360_regulator_probe,
> };
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] power: regulator: tps62360_regulator: Convert ofdata_to_platdata to the missing probe
2020-01-10 9:22 [PATCH] power: regulator: tps62360_regulator: Convert ofdata_to_platdata to the missing probe Keerthy
2020-01-10 9:33 ` Lokesh Vutla
@ 2020-01-30 2:17 ` Simon Glass
1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2020-01-30 2:17 UTC (permalink / raw)
To: u-boot
On Fri, 10 Jan 2020 at 02:22, Keerthy <j-keerthy@ti.com> wrote:
>
> commit 29f7d05a347a ("dm: core: Move ofdata_to_platdata() call earlier")
> introduces changes in the order of device_probe execution.
> ofdata_to_platdata now comes before the probe function which resulted in
> a deadlock and caused boot hang on AM6 devices.
>
> Deadlock sequence: tps62360_regulator_ofdata_to_platdata --> i2c_get_chip
> --> device_probe(tps62360) --> tps62360_regulator_ofdata_to_platdata
>
> Hence convert ofdata_to_platdata to the missing probe function to fix the
> hang.
>
> Fixes: 22e8f18980d6 ("power: regulator: tps6236x: add support for tps6236x regulators")
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> drivers/power/regulator/tps62360_regulator.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-30 2:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-10 9:22 [PATCH] power: regulator: tps62360_regulator: Convert ofdata_to_platdata to the missing probe Keerthy
2020-01-10 9:33 ` Lokesh Vutla
2020-01-30 2:17 ` Simon Glass
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.