All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Holland <samuel@sholland.org>
To: Andre Przywara <andre.przywara@arm.com>,
	Jagan Teki <jagan@amarulasolutions.com>
Cc: u-boot@lists.denx.de, Samuel Holland <samuel@sholland.org>
Subject: [PATCH 05/22] sunxi: Share the board Kconfig across architectures
Date: Tue,  1 Nov 2022 00:08:17 -0500	[thread overview]
Message-ID: <20221101050835.2421-6-samuel@sholland.org> (raw)
In-Reply-To: <20221101050835.2421-1-samuel@sholland.org>

With the introduction of the Allwinner D1, the sunxi board family now
spans multiple architectures (ARM and RISC-V). Since ARCH_SUNXI depends
on ARM, it cannot be used to gate architecture-independent options.
Specifically, this means the board Kconfig file cannot be sourced from
inside the "if ARCH_SUNXI" block.

Introduce a new BOARD_SUNXI symbol that can be selected by both
ARCH_SUNXI now and the new RISC-V SoC symbols when they are added, and
use it to gate the architecture-independent board options.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

 arch/Kconfig                |  1 +
 arch/arm/Kconfig            |  1 +
 arch/arm/mach-sunxi/Kconfig |  2 --
 board/sunxi/Kconfig         | 11 +++++++++++
 4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index e3a456a98d..a77192096a 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -458,6 +458,7 @@ source "arch/Kconfig.nxp"
 endif
 
 source "board/keymile/Kconfig"
+source "board/sunxi/Kconfig"
 
 if MIPS || MICROBLAZE
 
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4e5daa9e7f..f2852783d4 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1134,6 +1134,7 @@ config ARCH_SOCFPGA
 config ARCH_SUNXI
 	bool "Support sunxi (Allwinner) SoCs"
 	select BINMAN
+	select BOARD_SUNXI
 	select CMD_GPIO if GPIO
 	select CMD_MMC if MMC
 	select CMD_USB if DISTRO_DEFAULTS && USB_HOST
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index dbe6005daa..a03e700a0b 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -1046,8 +1046,6 @@ config BLUETOOTH_DT_DEVICE_FIXUP
 	  The used address is "bdaddr" if set, and "ethaddr" with the LSB
 	  flipped elsewise.
 
-source "board/sunxi/Kconfig"
-
 endif
 
 config CHIP_DIP_SCAN
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 42f61df5c5..9010631b16 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -1,3 +1,10 @@
+config BOARD_SUNXI
+	bool
+
+if BOARD_SUNXI
+
+menu "sunxi board options"
+
 choice
 	prompt "SPL Image Type"
 	depends on SPL
@@ -23,3 +30,7 @@ config SPL_IMAGE_TYPE
 	string
 	default "sunxi_egon" if SPL_IMAGE_TYPE_SUNXI_EGON
 	default "sunxi_toc0" if SPL_IMAGE_TYPE_SUNXI_TOC0
+
+endmenu
+
+endif
-- 
2.37.3


  parent reply	other threads:[~2022-11-01  5:09 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-01  5:08 [PATCH 00/22] sunxi: Prepare platform Kconfig to support multiple architectures Samuel Holland
2022-11-01  5:08 ` [PATCH 01/22] sunxi: Fix default-enablement of USB host drivers Samuel Holland
2022-11-11  1:09   ` Andre Przywara
2022-11-01  5:08 ` [PATCH 02/22] sunxi: Remove unnecessary Kconfig selections Samuel Holland
2022-11-11  1:09   ` Andre Przywara
2022-11-01  5:08 ` [PATCH 03/22] sunxi: Add missing dependencies to " Samuel Holland
2022-11-11  1:11   ` Andre Przywara
2022-11-01  5:08 ` [PATCH 04/22] sunxi: Hide image type selection if SPL is disabled Samuel Holland
2022-11-11  1:12   ` Andre Przywara
2022-11-01  5:08 ` Samuel Holland [this message]
2022-11-01  5:08 ` [PATCH 06/22] sunxi: Move most Kconfig selections to the board Kconfig Samuel Holland
2022-11-01  5:08 ` [PATCH 07/22] sunxi: Globally enable SUPPORT_SPL Samuel Holland
2022-11-01  5:08 ` [PATCH 08/22] sunxi: Downgrade driver selections to implications Samuel Holland
2022-11-01  5:08 ` [PATCH 09/22] sunxi: Enable the I2C driver by default Samuel Holland
2022-11-01  5:08 ` [PATCH 10/22] sunxi: Move default values to the board Kconfig Samuel Holland
2022-11-01  5:08 ` [PATCH 11/22] sunxi: Hide the SUNXI_MINIMUM_DRAM_MB symbol Samuel Holland
2022-11-01  5:08 ` [PATCH 12/22] sunxi: Clean up the SPL_STACK_R_ADDR defaults Samuel Holland
2022-11-01  5:08 ` [PATCH 13/22] sunxi: Move PRE_CON_BUF_ADDR to the board Kconfig Samuel Holland
2022-11-01  5:08 ` [PATCH 14/22] sunxi: Move SPL_BSS_START_ADDR " Samuel Holland
2022-11-01  5:08 ` [PATCH 15/22] sunxi: Move SPL_TEXT_BASE " Samuel Holland
2022-11-01  5:08 ` [PATCH 16/22] sunxi: Move SYS_LOAD_ADDR " Samuel Holland
2022-11-01  5:08 ` [PATCH 17/22] sunxi: Move TEXT_BASE " Samuel Holland
2022-11-01  5:08 ` [PATCH 18/22] sunxi: Move most board options " Samuel Holland
2022-11-01  5:08 ` [PATCH 19/22] env: sunxi: Replace ARCH_SUNXI with BOARD_SUNXI Samuel Holland
2022-11-01  5:08 ` [PATCH 20/22] drivers: " Samuel Holland
2022-11-01  5:08 ` [PATCH 21/22] disk: " Samuel Holland
2022-11-01  5:08 ` [PATCH 22/22] spl: " Samuel Holland
2022-11-03 16:46 ` [PATCH 00/22] sunxi: Prepare platform Kconfig to support multiple architectures Andre Przywara
2022-11-06 22:32   ` Samuel Holland

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=20221101050835.2421-6-samuel@sholland.org \
    --to=samuel@sholland.org \
    --cc=andre.przywara@arm.com \
    --cc=jagan@amarulasolutions.com \
    --cc=u-boot@lists.denx.de \
    /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.