From: Anup Patel <apatel@ventanamicro.com>
To: opensbi@lists.infradead.org
Subject: [PATCH 05/14] lib: utils/sys: Use kconfig for enabling/disabling drivers
Date: Mon, 18 Jul 2022 18:12:01 +0530 [thread overview]
Message-ID: <20220718124210.2177576-6-apatel@ventanamicro.com> (raw)
In-Reply-To: <20220718124210.2177576-1-apatel@ventanamicro.com>
We update system drivers makefile to use kconfig for enabling/disabling
drivers. To avoid compile errors, we also enable appropriate system
drivers for each platform.
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
---
lib/utils/Kconfig | 2 ++
lib/utils/reset/Kconfig | 2 ++
lib/utils/serial/Kconfig | 1 +
lib/utils/sys/Kconfig | 13 +++++++++++++
lib/utils/sys/objects.mk | 4 ++--
5 files changed, 20 insertions(+), 2 deletions(-)
create mode 100644 lib/utils/sys/Kconfig
diff --git a/lib/utils/Kconfig b/lib/utils/Kconfig
index 5330e87..6442b75 100644
--- a/lib/utils/Kconfig
+++ b/lib/utils/Kconfig
@@ -6,4 +6,6 @@ source "$OPENSBI_SRC_DIR/lib/utils/reset/Kconfig"
source "$OPENSBI_SRC_DIR/lib/utils/serial/Kconfig"
+source "$OPENSBI_SRC_DIR/lib/utils/sys/Kconfig"
+
endmenu
diff --git a/lib/utils/reset/Kconfig b/lib/utils/reset/Kconfig
index d4a32a0..4f04d8c 100644
--- a/lib/utils/reset/Kconfig
+++ b/lib/utils/reset/Kconfig
@@ -14,10 +14,12 @@ config FDT_RESET_GPIO
config FDT_RESET_HTIF
bool "Host transfer interface (HTIF) FDT reset driver"
+ select SYS_HTIF
default n
config FDT_RESET_SIFIVE_TEST
bool "SiFive Test FDT reset driver"
+ select SYS_SIFIVE_TEST
default n
config FDT_RESET_SUNXI_WDT
diff --git a/lib/utils/serial/Kconfig b/lib/utils/serial/Kconfig
index 9e6b6fc..a425b13 100644
--- a/lib/utils/serial/Kconfig
+++ b/lib/utils/serial/Kconfig
@@ -15,6 +15,7 @@ config FDT_SERIAL_GAISLER
config FDT_SERIAL_HTIF
bool "Host transfer interface (HTIF) UART FDT driver"
+ select SYS_HTIF
default n
config FDT_SERIAL_SHAKTI
diff --git a/lib/utils/sys/Kconfig b/lib/utils/sys/Kconfig
new file mode 100644
index 0000000..0fa6b6d
--- /dev/null
+++ b/lib/utils/sys/Kconfig
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-2.0
+
+menu "System Device Support"
+
+config SYS_HTIF
+ bool "Host transfere interface (HTIF) support"
+ default n
+
+config SYS_SIFIVE_TEST
+ bool "SiFive test support"
+ default n
+
+endmenu
diff --git a/lib/utils/sys/objects.mk b/lib/utils/sys/objects.mk
index 06be322..9f67aee 100644
--- a/lib/utils/sys/objects.mk
+++ b/lib/utils/sys/objects.mk
@@ -7,5 +7,5 @@
# Anup Patel <anup.patel@wdc.com>
#
-libsbiutils-objs-y += sys/htif.o
-libsbiutils-objs-y += sys/sifive_test.o
+libsbiutils-objs-$(CONFIG_SYS_HTIF) += sys/htif.o
+libsbiutils-objs-$(CONFIG_SYS_SIFIVE_TEST) += sys/sifive_test.o
--
2.34.1
next prev parent reply other threads:[~2022-07-18 12:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-18 12:41 [PATCH 00/14] OpenSBI Kconfig Support Anup Patel
2022-07-18 12:41 ` [PATCH 01/14] Makefile: Add initial kconfig support for each platform Anup Patel
2022-07-18 13:51 ` Jessica Clarke
2022-07-18 14:44 ` Anup Patel
2022-07-18 12:41 ` [PATCH 02/14] Makefile: Compile lib/utils sources separately " Anup Patel
2022-07-18 12:41 ` [PATCH 03/14] lib: utils/serial: Use kconfig for enabling/disabling drivers Anup Patel
2022-07-18 12:42 ` [PATCH 04/14] lib: utils/reset: " Anup Patel
2022-07-18 12:42 ` Anup Patel [this message]
2022-07-18 12:42 ` [PATCH 06/14] lib: utils/timer: " Anup Patel
2022-07-18 12:42 ` [PATCH 07/14] lib: utils/ipi: " Anup Patel
2022-07-18 12:42 ` [PATCH 08/14] lib: utils/irqchip: " Anup Patel
2022-07-18 12:42 ` [PATCH 09/14] lib: utils/i2c: " Anup Patel
2022-07-18 12:42 ` [PATCH 10/14] lib: utils/gpio: " Anup Patel
2022-07-18 12:42 ` [PATCH 11/14] lib: utils/fdt: Use kconfig for enabling/disabling Anup Patel
2022-07-18 12:42 ` [PATCH 12/14] platform: generic: Use kconfig for enabling/disabling overrides Anup Patel
2022-07-18 12:42 ` [PATCH 13/14] platform: Remove redundant config.mk from all platforms Anup Patel
2022-07-18 12:42 ` [PATCH 14/14] docs: Update documentation for kconfig support Anup Patel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220718124210.2177576-6-apatel@ventanamicro.com \
--to=apatel@ventanamicro.com \
--cc=opensbi@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.