All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anup Patel <apatel@ventanamicro.com>
To: opensbi@lists.infradead.org
Subject: [PATCH 12/14] platform: generic: Use kconfig for enabling/disabling overrides
Date: Mon, 18 Jul 2022 18:12:08 +0530	[thread overview]
Message-ID: <20220718124210.2177576-13-apatel@ventanamicro.com> (raw)
In-Reply-To: <20220718124210.2177576-1-apatel@ventanamicro.com>

We update generic platform to use kconfig for enabling/disabling
platform overrides. We also enable all platform overrides in generic
platform defconfig.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
---
 platform/generic/Kconfig              | 18 ++++++++++++++++++
 platform/generic/allwinner/objects.mk |  4 ++--
 platform/generic/configs/defconfig    |  3 +++
 platform/generic/sifive/objects.mk    |  8 ++++----
 4 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/platform/generic/Kconfig b/platform/generic/Kconfig
index 21ebd6a..8b00772 100644
--- a/platform/generic/Kconfig
+++ b/platform/generic/Kconfig
@@ -6,3 +6,21 @@ config PLATFORM_GENERIC
 	select FDT_DOMAIN
 	select FDT_PMU
 	default y
+
+if PLATFORM_GENERIC
+
+config PLATFORM_ALLWINNER_D1
+	bool "Allwinner D1 support"
+	depends on FDT_IRQCHIP_PLIC
+	default n
+
+config PLATFORM_SIFIVE_FU540
+	bool "SiFive FU540 support"
+	default n
+
+config PLATFORM_SIFIVE_FU740
+	bool "SiFive FU740 support"
+	depends on FDT_RESET && FDT_I2C
+	default n
+
+endif
diff --git a/platform/generic/allwinner/objects.mk b/platform/generic/allwinner/objects.mk
index 9e36ab6..447cdf1 100644
--- a/platform/generic/allwinner/objects.mk
+++ b/platform/generic/allwinner/objects.mk
@@ -2,5 +2,5 @@
 # SPDX-License-Identifier: BSD-2-Clause
 #
 
-carray-platform_override_modules-y += sun20i_d1
-platform-objs-y += allwinner/sun20i-d1.o
+carray-platform_override_modules-$(CONFIG_PLATFORM_ALLWINNER_D1) += sun20i_d1
+platform-objs-$(CONFIG_PLATFORM_ALLWINNER_D1) += allwinner/sun20i-d1.o
diff --git a/platform/generic/configs/defconfig b/platform/generic/configs/defconfig
index d56cef2..2a75394 100644
--- a/platform/generic/configs/defconfig
+++ b/platform/generic/configs/defconfig
@@ -1,3 +1,6 @@
+CONFIG_PLATFORM_ALLWINNER_D1=y
+CONFIG_PLATFORM_SIFIVE_FU540=y
+CONFIG_PLATFORM_SIFIVE_FU740=y
 CONFIG_FDT_GPIO=y
 CONFIG_FDT_GPIO_SIFIVE=y
 CONFIG_FDT_I2C=y
diff --git a/platform/generic/sifive/objects.mk b/platform/generic/sifive/objects.mk
index c17e2df..d75e444 100644
--- a/platform/generic/sifive/objects.mk
+++ b/platform/generic/sifive/objects.mk
@@ -2,8 +2,8 @@
 # SPDX-License-Identifier: BSD-2-Clause
 #
 
-carray-platform_override_modules-y += sifive_fu540
-platform-objs-y += sifive/fu540.o
+carray-platform_override_modules-$(CONFIG_PLATFORM_SIFIVE_FU540) += sifive_fu540
+platform-objs-$(CONFIG_PLATFORM_SIFIVE_FU540) += sifive/fu540.o
 
-carray-platform_override_modules-y += sifive_fu740
-platform-objs-y += sifive/fu740.o
+carray-platform_override_modules-$(CONFIG_PLATFORM_SIFIVE_FU740) += sifive_fu740
+platform-objs-$(CONFIG_PLATFORM_SIFIVE_FU740) += sifive/fu740.o
-- 
2.34.1



  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 ` [PATCH 05/14] lib: utils/sys: " Anup Patel
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 ` Anup Patel [this message]
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-13-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.