From: Andre Przywara Date: Tue, 14 May 2024 00:12:34 +0000 (+0100) Subject: power: pmic: sunxi: only build AXP drivers for SPL X-Git-Url: http://git.dujemihanovic.xyz/img/static/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=75d28bd0901744e0a7ea2edf82ae2cee06b07833;p=u-boot.git power: pmic: sunxi: only build AXP drivers for SPL The axp.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. The AXP221 driver defines axp_get_sid(), which is used in the U-Boot proper cpuinfo() code, and some old LCD code directly calls axp_set_eldo(), so we keep that driver outside the new guards. This will be fixed properly later. Signed-off-by: Andre Przywara --- diff --git a/drivers/power/Makefile b/drivers/power/Makefile index c7ee4595fc..99a8aa8f38 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -8,13 +8,15 @@ obj-$(CONFIG_$(SPL_TPL_)POWER_DOMAIN) += domain/ obj-y += pmic/ obj-y += regulator/ +obj-$(CONFIG_AXP221_POWER) += axp221.o +ifdef CONFIG_SPL_BUILD obj-$(CONFIG_AXP152_POWER) += axp152.o obj-$(CONFIG_AXP209_POWER) += axp209.o -obj-$(CONFIG_AXP221_POWER) += axp221.o 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