[U-Boot] [PATCH v2 15/38] x86: sysreset: Allow reset driver to be included in SPL/TPL

Simon Glass sjg at chromium.org
Wed Sep 25 14:11:24 UTC 2019


At present this driver is always included in SPL and TPL, if U-Boot proper
enables it. Update the Makefile to provide full control using the existing
Kconfig options.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2: None

 drivers/sysreset/Kconfig  | 12 ++++++++++++
 drivers/sysreset/Makefile |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig
index f565ae03109..dcce2be6412 100644
--- a/drivers/sysreset/Kconfig
+++ b/drivers/sysreset/Kconfig
@@ -107,6 +107,18 @@ config SYSRESET_X86
 	help
 	  Reboot support for generic x86 processor reset.
 
+config SYSRESET_SPL_X86
+	bool "Enable support for x86 processor reboot driver in SPL"
+	depends on X86
+	help
+	  Reboot support for generic x86 processor reset.
+
+config SYSRESET_TPL_X86
+	bool "Enable support for x86 processor reboot driver in TPL"
+	depends on X86
+	help
+	  Reboot support for generic x86 processor reset.
+
 config SYSRESET_MCP83XX
 	bool "Enable support MPC83xx SoC family reboot driver"
 	help
diff --git a/drivers/sysreset/Makefile b/drivers/sysreset/Makefile
index cf01492295f..fff4a184a02 100644
--- a/drivers/sysreset/Makefile
+++ b/drivers/sysreset/Makefile
@@ -16,5 +16,5 @@ obj-$(CONFIG_SYSRESET_SOCFPGA_S10) += sysreset_socfpga_s10.o
 obj-$(CONFIG_SYSRESET_TI_SCI) += sysreset-ti-sci.o
 obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o
 obj-$(CONFIG_SYSRESET_WATCHDOG) += sysreset_watchdog.o
-obj-$(CONFIG_SYSRESET_X86) += sysreset_x86.o
+obj-$(CONFIG_$(SPL_TPL_)SYSRESET_X86) += sysreset_x86.o
 obj-$(CONFIG_TARGET_XTFPGA) += sysreset_xtfpga.o
-- 
2.23.0.444.g18eeb5a265-goog



More information about the U-Boot mailing list