summaryrefslogtreecommitdiff
path: root/lib/utils
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils')
-rw-r--r--lib/utils/Kconfig2
-rw-r--r--lib/utils/reset/Kconfig33
-rw-r--r--lib/utils/reset/objects.mk28
3 files changed, 49 insertions, 14 deletions
diff --git a/lib/utils/Kconfig b/lib/utils/Kconfig
index 4524a3fd..f061b7a3 100644
--- a/lib/utils/Kconfig
+++ b/lib/utils/Kconfig
@@ -2,6 +2,8 @@
menu "Utils and Drivers Support"
+source "$(OPENSBI_SRC_DIR)/lib/utils/reset/Kconfig"
+
source "$(OPENSBI_SRC_DIR)/lib/utils/serial/Kconfig"
endmenu
diff --git a/lib/utils/reset/Kconfig b/lib/utils/reset/Kconfig
new file mode 100644
index 00000000..845a1aea
--- /dev/null
+++ b/lib/utils/reset/Kconfig
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
+menu "System Reset Support"
+
+config FDT_RESET
+ bool "FDT based reset drivers"
+ default n
+
+if FDT_RESET
+
+config FDT_RESET_GPIO
+ bool "GPIO FDT reset driver"
+ default n
+
+config FDT_RESET_HTIF
+ bool "Host transfer interface (HTIF) FDT reset driver"
+ default n
+
+config FDT_RESET_SIFIVE_TEST
+ bool "SiFive Test FDT reset driver"
+ default n
+
+config FDT_RESET_SUNXI_WDT
+ bool "Sunxi WDT FDT reset driver"
+ default n
+
+config FDT_RESET_THEAD
+ bool "T-HEAD FDT reset driver"
+ default n
+
+endif
+
+endmenu
diff --git a/lib/utils/reset/objects.mk b/lib/utils/reset/objects.mk
index 8cddcdfb..8a50dd04 100644
--- a/lib/utils/reset/objects.mk
+++ b/lib/utils/reset/objects.mk
@@ -7,22 +7,22 @@
# Anup Patel <[email protected]>
#
-libsbiutils-objs-y += reset/fdt_reset.o
-libsbiutils-objs-y += reset/fdt_reset_drivers.o
+libsbiutils-objs-$(CONFIG_FDT_RESET) += reset/fdt_reset.o
+libsbiutils-objs-$(CONFIG_FDT_RESET) += reset/fdt_reset_drivers.o
-carray-fdt_reset_drivers-y += fdt_poweroff_gpio
-carray-fdt_reset_drivers-y += fdt_reset_gpio
-libsbiutils-objs-y += reset/fdt_reset_gpio.o
+carray-fdt_reset_drivers-$(CONFIG_FDT_RESET_GPIO) += fdt_poweroff_gpio
+carray-fdt_reset_drivers-$(CONFIG_FDT_RESET_GPIO) += fdt_reset_gpio
+libsbiutils-objs-$(CONFIG_FDT_RESET_GPIO) += reset/fdt_reset_gpio.o
-carray-fdt_reset_drivers-y += fdt_reset_htif
-libsbiutils-objs-y += reset/fdt_reset_htif.o
+carray-fdt_reset_drivers-$(CONFIG_FDT_RESET_HTIF) += fdt_reset_htif
+libsbiutils-objs-$(CONFIG_FDT_RESET_HTIF) += reset/fdt_reset_htif.o
-carray-fdt_reset_drivers-y += fdt_reset_sifive_test
-libsbiutils-objs-y += reset/fdt_reset_sifive_test.o
+carray-fdt_reset_drivers-$(CONFIG_FDT_RESET_SIFIVE_TEST) += fdt_reset_sifive_test
+libsbiutils-objs-$(CONFIG_FDT_RESET_SIFIVE_TEST) += reset/fdt_reset_sifive_test.o
-carray-fdt_reset_drivers-y += fdt_reset_sunxi_wdt
-libsbiutils-objs-y += reset/fdt_reset_sunxi_wdt.o
+carray-fdt_reset_drivers-$(CONFIG_FDT_RESET_SUNXI_WDT) += fdt_reset_sunxi_wdt
+libsbiutils-objs-$(CONFIG_FDT_RESET_SUNXI_WDT) += reset/fdt_reset_sunxi_wdt.o
-carray-fdt_reset_drivers-y += fdt_reset_thead
-libsbiutils-objs-y += reset/fdt_reset_thead.o
-libsbiutils-objs-y += reset/fdt_reset_thead_asm.o
+carray-fdt_reset_drivers-$(CONFIG_FDT_RESET_THEAD) += fdt_reset_thead
+libsbiutils-objs-$(CONFIG_FDT_RESET_THEAD) += reset/fdt_reset_thead.o
+libsbiutils-objs-$(CONFIG_FDT_RESET_THEAD) += reset/fdt_reset_thead_asm.o