On Fri, 12 Jul 2024 17:53:48 +0100
Andre Przywara <andre.przyw...@arm.com> wrote:

> The axp<xxx>.c drivers are only used for the SPL, for U-Boot proper we
> have a separate, DM compliant driver.
> Mask the build instructions with CONFIG_SPL_BUILD, to avoid them being
> build for U-Boot proper as well.

For the records: this breaks builds of boards with the AXP221, since they
need axp_get_sid() for the cpuinfo() function in U-Boot proper, and
axp_set_eldo() for some hideous code in sunxi_display.c. I have a decent
fix for the former, but the latter requires some refactoring. So I will
keep the axp221.o line out of this SPL-only guard for now.

Cheers,
Andre

> Signed-off-by: Andre Przywara <andre.przyw...@arm.com>
> ---
>  drivers/power/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/power/Makefile b/drivers/power/Makefile
> index c7ee4595fc8..0f39459dec4 100644
> --- a/drivers/power/Makefile
> +++ b/drivers/power/Makefile
> @@ -8,6 +8,7 @@ obj-$(CONFIG_$(SPL_TPL_)POWER_DOMAIN) += domain/
>  obj-y += pmic/
>  obj-y += regulator/
>  
> +ifdef CONFIG_SPL_BUILD
>  obj-$(CONFIG_AXP152_POWER)   += axp152.o
>  obj-$(CONFIG_AXP209_POWER)   += axp209.o
>  obj-$(CONFIG_AXP221_POWER)   += axp221.o
> @@ -15,6 +16,7 @@ obj-$(CONFIG_AXP305_POWER)  += axp305.o
>  obj-$(CONFIG_AXP313_POWER)   += axp313.o
>  obj-$(CONFIG_AXP809_POWER)   += axp809.o
>  obj-$(CONFIG_AXP818_POWER)   += axp818.o
> +endif
>  obj-$(CONFIG_EXYNOS_TMU)     += exynos-tmu.o
>  obj-$(CONFIG_SY8106A_POWER)  += sy8106a.o
>  obj-$(CONFIG_TPS6586X_POWER) += tps6586x.o

Reply via email to