power: regulator: Avoid probing of regulators at pre-ram stage
RFC PATCH 1/1 power: regulator: Avoid probing of regulators at pre-ram stage
commit 51c4679d2f84 ("power: regulator: Trigger probe of regulators which are always-on or boot-on") allow always on and boot on regulators to be early probed.
Due to this probing boot time increases.
Since in hardware regulators are always on, so probing of such
regulators can be avoided.
--- drivers/power/regulator/regulator-uclass.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/power/regulator/regulator-uclass.c +0 -8
@@ -451,14 +451,6 @@ static int regulator_post_bind(struct udevice *dev)return -EINVAL ; } -/* -* In case the regulator has regulator-always-on or -* regulator-boot-on DT property, trigger probe() to -* configure its default state during startup. -*/ -if (uc_pdata->always_on || uc_pdata->boot_on) -dev_or_flags (dev,DM_FLAG_PROBE_AFTER_BIND ); -return 0 ; }
Signature · 1 line
2.34.1
Hi Udit,
Quoted 4 lines · Udit Kumar
commit
51c4679d2f84("power: regulator: Trigger probe of regulators which are always-on or boot-on") allow always on and boot on regulators to be early probed.
Due to this probing boot time increases.
Since in hardware regulators are always on, so probing of such
According to the DT binding:
- regulator-always-on only means it should never be disabled, not that it's automatically enabled.
- regulator-boot-on means "It's expected that this regulator was left on by the bootloader." We're the bootloader so it's our duty to turn the regulator on.
So I'm not sure the justification is valid here.
I vaguely remember this patch was discussed a lot between Marek, Simon and possibly Caleb so let's see if they have something to say.
Cheers,
Quentin
Hi Udit and Quentin,
Quoted 13 lines · Quentin Schulz
Hi Udit,
Quoted 4 lines · Udit Kumar
commit
51c4679d2f84("power: regulator: Trigger probe of regulators which are always-on or boot-on") allow always on and boot on regulators to be early probed.
Due to this probing boot time increases.
Since in hardware regulators are always on, so probing of suchAccording to the DT binding:
- regulator-always-on only means it should never be disabled, not that it's automatically enabled.
Quoted 8 lines
- regulator-boot-on means "It's expected that this regulator was left on by the bootloader." We're the bootloader so it's our duty to turn the regulator on.
So I'm not sure the justification is valid here.
I vaguely remember this patch was discussed a lot between Marek, Simon and possibly Caleb so let's see if they have something to say.
Correct, this cannot be reverted or it will break platforms that used to call regulators_enable_boot_on(), see commit 6f52feee2867 ("power:
regulator: Drop regulators_enable_boot_on/off()").
If you want to skip probe, please ensure that appropriate bootph- props is used so that the regulator is excluded from your platform pre-ram phase.
Regards,
Jonas
Quoted 3 lines
Cheers,
Quentin
Thanks Jonas
Quoted 19 lines · Jonas Karlman
Hi Udit and Quentin,
Quoted 16 lines · Quentin Schulz
Hi Udit,
Quoted 4 lines · Udit Kumar
commit
51c4679d2f84("power: regulator: Trigger probe of regulators which are always-on or boot-on") allow always on and boot on regulators to be early probed.
Due to this probing boot time increases.
Since in hardware regulators are always on, so probing of suchAccording to the DT binding:
- regulator-always-on only means it should never be disabled, not that it's automatically enabled.
- regulator-boot-on means "It's expected that this regulator was left on by the bootloader." We're the bootloader so it's our duty to turn the regulator on.
Quoted 7 lines
Quoted 4 lines
So I'm not sure the justification is valid here.
I vaguely remember this patch was discussed a lot between Marek, Simon and possibly Caleb so let's see if they have something to say.
Correct, this cannot be reverted or it will break platforms that used to call
regulators_enable_boot_on(), see commit6f52feee2867("power:
regulator: Drop regulators_enable_boot_on/off()").
ok. thanks
Quoted 3 lines
If you want to skip probe, please ensure that appropriate bootph- props is used so that the regulator is excluded from your platform pre-ram phase.
Not entirely , I want to probe those but little later in time, around spl_board_init
by when boot is little progressed and clocking etc are in better shape.
Quoted 6 lines
Regards,
JonasQuoted 2 lines
Cheers,
Quentin