[U-Boot] [PATCH v3] dm: core: device: switch off power domain after device removal

Lokesh Vutla lokeshvutla at ti.com
Fri Sep 27 08:25:57 UTC 2019



On 27/09/19 7:18 AM, Simon Glass wrote:
> Hi Anatolij,
> 
> On Thu, 1 Aug 2019 at 00:44, Anatolij Gustschin <agust at denx.de> wrote:
>>
>> Hi Lokesh,
>>
>> On Thu, 1 Aug 2019 09:43:39 +0530
>> Lokesh Vutla lokeshvutla at ti.com wrote:
>>
>>> On 01/08/19 2:55 AM, Anatolij Gustschin wrote:
>>>> The power domain associated with a device is enabled when probing,
>>>> but currently the domain remains enabled when the device is removed.
>>>> Some boards started to disable power domains for selected devices
>>>> via custom board_quiesce_devices(), but it doesn't work in many
>>>> cases, i. e. because devices still can be accessed later in
>>>> .remove() callback on behalf of dm_remove_devices_flags().
>>>>
>>>> Utilize the DM core to power off the device power domain, but add a
>>>> device flag to be able to selectively let the power domain enabled
>>>> after device removal. This might be required for devices that must
>>>> remain enabled when booting OS, i. e. serial console for debug
>>>> output, etc.
>>>>
>>>> Signed-off-by: Anatolij Gustschin <agust at denx.de>
>>>> ---
>>>> Changes in v3:
>>>>  - remove 'power-domain' device to fix dm power-domain test (make qcheck)
>>>>  - don't switch off the power domain for current console device
> 
> This still breaks 'make qcheck' for me. It doesn't build sandbox_spl:
> 
> crosfw -b sandbox_spl
> cmd: 'make -j32 'ARCH=sandbox' 'CROSS_COMPILE=' --no-print-directory
> 'HOSTSTRIP=true' 'DEV_TREE_SRC=--default' 'QEMU_ARCH=' -s
> 'CROS_FULL=1' 'O=/tmp/b/sandbox_spl' 'BUILD_ROM=1'
> 'DEV_TREE_SEPARATE=1' all'
> output: 'drivers/core/device-remove.o: In function `dev_power_domain_on':
> /scratch/sglass/cosarm/src/third_party/u-boot/files/include/power-domain.h:172:
> multiple definition of `dev_power_domain_on'

dev_power_domain_on is not yet in the mainline. I guess this is caused by v2 of
dev_power_domain_on() series. Looks like that is fixed by [0]. So, I rebased
this patch on top of [0] and posted it[1]. Anatolij, I hope you don't mind :)

[0] https://patchwork.ozlabs.org/project/uboot/list/?series=132841
[1] https://patchwork.ozlabs.org/project/uboot/list/?series=132880

Thanks and regards,
Lokesh

> drivers/core/device.o:/scratch/sglass/cosarm/src/third_party/u-boot/files/include/power-domain.h:172:
> first defined here
> /scratch/sglass/cosarm/src/third_party/u-boot/files/scripts/Makefile.build:355:
> recipe for target 'drivers/core/built-in.o' failed
> make[3]: *** [drivers/core/built-in.o] Error 1
> /scratch/sglass/cosarm/src/third_party/u-boot/files/scripts/Makefile.build:432:
> recipe for target 'drivers/core' failed
> make[2]: *** [drivers/core] Error 2
> make[2]: *** Waiting for unfinished jobs....
> /scratch/sglass/cosarm/src/third_party/u-boot/files/Makefile:1633:
> recipe for target 'drivers' failed
> make[1]: *** [drivers] Error 2
> make[1]: *** Waiting for unfinished jobs....
> Makefile:148: recipe for target 'sub-make' failed
> make: *** [sub-make] Error 2
> 
> Regards,
> SImon
> 


More information about the U-Boot mailing list