From a4faf1f563160b1b9cfbdbf388d33464691d0440 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 8 Aug 2021 12:20:29 -0600 Subject: power: Refactor Makefile rules Move the power/ rules into drivers/power to avoid clutter in the Makefile and drivers/Makefile files. We must select SPL_POWER if SPL_POWER_DOMAIN is used, since the two are currently independent and boards do not necessarily enable SPL_POWER. Add a TPL_POWER as well, as that is used by one board. Signed-off-by: Simon Glass Reviewed-by: Jaehoon Chung --- drivers/Makefile | 5 +---- drivers/power/Makefile | 8 ++++++++ drivers/power/acpi_pmc/Makefile | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/Makefile b/drivers/Makefile index 01d6bf55231..1283b88ea10 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -22,6 +22,7 @@ obj-$(CONFIG_$(SPL_TPL_)PCH) += pch/ obj-$(CONFIG_$(SPL_TPL_)PCI) += pci/ obj-$(CONFIG_$(SPL_TPL_)PHY) += phy/ obj-$(CONFIG_$(SPL_TPL_)PINCTRL) += pinctrl/ +obj-$(CONFIG_$(SPL_TPL_)POWER) += power/ obj-$(CONFIG_$(SPL_TPL_)RAM) += ram/ obj-$(CONFIG_$(SPL_TPL_)RTC) += rtc/ obj-$(CONFIG_$(SPL_TPL_)SERIAL) += serial/ @@ -32,7 +33,6 @@ obj-$(CONFIG_$(SPL_)DM_MAILBOX) += mailbox/ obj-$(CONFIG_$(SPL_)REMOTEPROC) += remoteproc/ obj-$(CONFIG_$(SPL_)SYSINFO) += sysinfo/ obj-$(CONFIG_$(SPL_TPL_)TPM) += tpm/ -obj-$(CONFIG_$(SPL_TPL_)ACPI_PMC) += power/acpi_pmc/ obj-$(CONFIG_XEN) += xen/ obj-$(CONFIG_$(SPL_)FPGA) += fpga/ @@ -47,9 +47,6 @@ obj-$(CONFIG_ARMADA_XP) += ddr/marvell/axp/ obj-$(CONFIG_$(SPL_)ALTERA_SDRAM) += ddr/altera/ obj-$(CONFIG_ARCH_IMX8M) += ddr/imx/imx8m/ obj-$(CONFIG_IMX8ULP_DRAM) += ddr/imx/imx8ulp/ -obj-$(CONFIG_SPL_POWER) += power/ power/pmic/ -obj-$(CONFIG_SPL_POWER) += power/regulator/ -obj-$(CONFIG_SPL_POWER_DOMAIN) += power/domain/ obj-$(CONFIG_SPL_DM_RESET) += reset/ obj-$(CONFIG_SPL_ETH) += net/ obj-$(CONFIG_SPL_ETH) += net/phy/ diff --git a/drivers/power/Makefile b/drivers/power/Makefile index 801b727c90f..f805027784d 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -3,6 +3,14 @@ # Copyright (c) 2009 Wind River Systems, Inc. # Tom Rix +obj-$(CONFIG_$(SPL_TPL_)ACPI_PMC) += acpi_pmc/ +obj-y += battery/ +obj-$(CONFIG_$(SPL_TPL_)POWER_DOMAIN) += domain/ +obj-y += fuel_gauge/ +obj-y += mfd/ +obj-y += pmic/ +obj-y += regulator/ + obj-$(CONFIG_AXP152_POWER) += axp152.o obj-$(CONFIG_AXP209_POWER) += axp209.o obj-$(CONFIG_AXP221_POWER) += axp221.o diff --git a/drivers/power/acpi_pmc/Makefile b/drivers/power/acpi_pmc/Makefile index 115788f109a..0db52a65824 100644 --- a/drivers/power/acpi_pmc/Makefile +++ b/drivers/power/acpi_pmc/Makefile @@ -2,5 +2,5 @@ # # Copyright 2019 Google LLC -obj-$(CONFIG_$(SPL_TPL_)ACPI_PMC) += acpi-pmc-uclass.o +obj-y += acpi-pmc-uclass.o obj-$(CONFIG_$(SPL_TPL_)ACPI_PMC_SANDBOX) += sandbox.o pmc_emul.o -- cgit v1.2.3