Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9236BC4332F for ; Thu, 3 Nov 2022 16:46:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 311E085199; Thu, 3 Nov 2022 17:46:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id EC1218519A; Thu, 3 Nov 2022 17:46:33 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id F378B85183 for ; Thu, 3 Nov 2022 17:46:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5C5B61FB; Thu, 3 Nov 2022 09:46:36 -0700 (PDT) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5EB6C3F5A1; Thu, 3 Nov 2022 09:46:29 -0700 (PDT) Date: Thu, 3 Nov 2022 16:46:19 +0000 From: Andre Przywara To: Samuel Holland Cc: Jagan Teki , u-boot@lists.denx.de Subject: Re: [PATCH 00/22] sunxi: Prepare platform Kconfig to support multiple architectures Message-ID: <20221103164619.687138e7@donnerap.cambridge.arm.com> In-Reply-To: <20221101050835.2421-1-samuel@sholland.org> References: <20221101050835.2421-1-samuel@sholland.org> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Tue, 1 Nov 2022 00:08:12 -0500 Samuel Holland wrote: Hi Samuel, > sunxi is getting a new RISC-V platform, D1. We want to share as much of > the existing configuration as possible, to provide a familiar > environment, DRAM layout, partition layout, etc. > > Because U-Boot includes all architecture Kconfig files at once, we must > use a symbol outside of both CONFIG_ARM and CONFIG_RISCV to contain > shared Kconfig options. I chose BOARD_SUNXI, corresponding to the file > location and somewhat following the BOARD_SPECIFIC_OPTIONS pattern. many thanks for sending this, indeed our Kconfig deserved some cleanups, plus we need to fix the woes with RISC-V. I just skimmed over this for now, and it seems to look good. I have some gripes with the name BOARD_SUNXI though. Bad enough we have board-agnostic generic code in board/sunxi, but maybe we shouldn't add to the confusion. Would PLAT_SUNXI be a better name? After all it's all about the Allwinner platform (and not even "architecture", for that matter). > I did a buildman run on this series. The only net option changes are the > expected ones: > - Host-side USB gets enabled on several boards by the first patch > (emlid_neutis_n5_devboard orangepi_zero2 pinephone pinetab tanix_tx6 > x96_mate teres_i) > - CONFIG_BOARD_SUNXI gets added everywhere > - CONFIG_SYS_I2C_MVTWSI gets enabled by the corresponding patch > > Andre, please feel free to take any subset of these; they don't all have > to go in at once. And I'm open to suggestions about what instances of > ARCH_SUNXI should (not) be converted. Some of them are open to opinion. Yeah, I will definitely cherry-pick some patches, especially the more innocent ones. I will run my before/after defconfig comparisons to test them. Cheers, Andre > I left alone the options in arch/arm/mach-sunxi/Kconfig that are covered > by other series (MMC CD/USB PHY/power pins, AXP GPIO). > > After this series, the Kconfig changes needed for D1 support are quite > small, something like this commit: > https://github.com/smaeul/u-boot/commit/c12cf6c5d72f5327eff793518229ddbd41dcf729.patch > > Adding SUNXI_MINIMUM_DRAM_MB certainly made things nicer. There are a > few options that probably still need some adjustment to respect it. > > > Samuel Holland (22): > sunxi: Fix default-enablement of USB host drivers > sunxi: Remove unnecessary Kconfig selections > sunxi: Add missing dependencies to Kconfig selections > sunxi: Hide image type selection if SPL is disabled > sunxi: Share the board Kconfig across architectures > sunxi: Move most Kconfig selections to the board Kconfig > sunxi: Globally enable SUPPORT_SPL > sunxi: Downgrade driver selections to implications > sunxi: Enable the I2C driver by default > sunxi: Move default values to the board Kconfig > sunxi: Hide the SUNXI_MINIMUM_DRAM_MB symbol > sunxi: Clean up the SPL_STACK_R_ADDR defaults > sunxi: Move PRE_CON_BUF_ADDR to the board Kconfig > sunxi: Move SPL_BSS_START_ADDR to the board Kconfig > sunxi: Move SPL_TEXT_BASE to the board Kconfig > sunxi: Move SYS_LOAD_ADDR to the board Kconfig > sunxi: Move TEXT_BASE to the board Kconfig > sunxi: Move most board options to the board Kconfig > env: sunxi: Replace ARCH_SUNXI with BOARD_SUNXI > drivers: sunxi: Replace ARCH_SUNXI with BOARD_SUNXI > disk: sunxi: Replace ARCH_SUNXI with BOARD_SUNXI > spl: sunxi: Replace ARCH_SUNXI with BOARD_SUNXI > > Kconfig | 3 - > arch/Kconfig | 1 + > arch/arm/Kconfig | 48 +------- > arch/arm/mach-sunxi/Kconfig | 154 ----------------------- > board/sunxi/Kconfig | 224 ++++++++++++++++++++++++++++++++++ > boot/Kconfig | 4 - > common/Kconfig | 2 - > common/spl/Kconfig | 18 +-- > disk/Kconfig | 6 +- > drivers/clk/sunxi/Kconfig | 2 +- > drivers/fastboot/Kconfig | 13 +- > drivers/gpio/Kconfig | 2 +- > drivers/mmc/Kconfig | 2 +- > drivers/net/phy/Kconfig | 4 +- > drivers/phy/allwinner/Kconfig | 2 +- > drivers/pinctrl/sunxi/Kconfig | 2 +- > drivers/reset/Kconfig | 2 +- > drivers/spi/Kconfig | 2 +- > drivers/usb/Kconfig | 2 +- > drivers/usb/gadget/Kconfig | 8 +- > drivers/usb/host/Kconfig | 2 - > drivers/usb/musb-new/Kconfig | 2 +- > drivers/video/Kconfig | 2 +- > drivers/watchdog/Kconfig | 4 +- > env/Kconfig | 12 +- > scripts/Makefile.spl | 2 +- > 26 files changed, 267 insertions(+), 258 deletions(-) >