From mboxrd@z Thu Jan 1 00:00:00 1970 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 35368C433EF for ; Sat, 29 Jan 2022 02:19:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 30D928210D; Sat, 29 Jan 2022 03:19:08 +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 8A2448350D; Sat, 29 Jan 2022 03:19:06 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 6D4258210D for ; Sat, 29 Jan 2022 03:19:02 +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 2D029D6E; Fri, 28 Jan 2022 18:19:01 -0800 (PST) Received: from slackpad.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7CF283F7D7; Fri, 28 Jan 2022 18:18:58 -0800 (PST) Date: Sat, 29 Jan 2022 02:18:40 +0000 From: Andre Przywara To: Jesse Taube Cc: u-boot@lists.denx.de, jagan@amarulasolutions.com, hdegoede@redhat.com, sjg@chromium.org, icenowy@aosc.io, marek.behun@nic.cz, festevam@denx.de, narmstrong@baylibre.com, tharvey@gateworks.com, christianshewitt@gmail.com, pbrobinson@gmail.com, jernej.skrabec@gmail.com, hs@denx.de, samuel@sholland.org, arnaud.ferraris@gmail.com, giulio.benetti@benettiengineering.com, thirtythreeforty@gmail.com Subject: Re: [PATCH v2 09/12] configs: sunxi: Add common SUNIV header Message-ID: <20220129021815.34c7ab17@slackpad.fritz.box> In-Reply-To: <20220126135329.2997430-10-Mr.Bossman075@gmail.com> References: <20220126135329.2997430-1-Mr.Bossman075@gmail.com> <20220126135329.2997430-10-Mr.Bossman075@gmail.com> Organization: Arm Ltd. X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.31; x86_64-slackware-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.5 at phobos.denx.de X-Virus-Status: Clean On Wed, 26 Jan 2022 08:53:26 -0500 Jesse Taube wrote: > From: Icenowy Zheng > > Adds support for SUNIV and the F1C100s. > > Signed-off-by: Icenowy Zheng > Signed-off-by: Jesse Taube With that comment fixed, as you mentioned in the reply to this mail, and with making sure the V3s comment stays the same (you lost dt overlay): Reviewed-by: Andre Przywara Cheers, Andre > --- > V1->V2: > * Combine ifdefs > * Fix indentation > * Fix negative logic > * Fix rebase artifacts > * Remove CONFIG_SYS_LOAD_ADDR > * Remove CONFIG_ENV_SECT_SIZE > --- > include/configs/suniv.h | 14 ++++++++ > include/configs/sunxi-common.h | 59 +++++++++++++++++++++++++--------- > 2 files changed, 57 insertions(+), 16 deletions(-) > create mode 100644 include/configs/suniv.h > > diff --git a/include/configs/suniv.h b/include/configs/suniv.h > new file mode 100644 > index 0000000000..6118cd5e1a > --- /dev/null > +++ b/include/configs/suniv.h > @@ -0,0 +1,14 @@ > +/* SPDX-License-Identifier: GPL-2.0+ */ > +/* > + * Configuration settings for new Allwinner F-series (suniv) CPU > + */ > + > +#ifndef __CONFIG_H > +#define __CONFIG_H > + > +/* > + * Include common sunxi configuration where most the settings are > + */ > +#include > + > +#endif /* __CONFIG_H */ > diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h > index 7260eb72a4..38c3321c4f 100644 > --- a/include/configs/sunxi-common.h > +++ b/include/configs/sunxi-common.h > @@ -22,7 +22,12 @@ > /* Serial & console */ > #define CONFIG_SYS_NS16550_SERIAL > /* ns16550 reg in the low bits of cpu reg */ > +#ifdef CONFIG_MACH_SUNIV > +/* suniv doesn't have apb2 and uart is connected to apb1 */ > +#define CONFIG_SYS_NS16550_CLK 100000000 > +#else > #define CONFIG_SYS_NS16550_CLK 24000000 > +#endif > #ifndef CONFIG_DM_SERIAL > # define CONFIG_SYS_NS16550_REG_SIZE -4 > # define CONFIG_SYS_NS16550_COM1 SUNXI_UART0_BASE > @@ -49,6 +54,15 @@ > * since it needs to fit in with the other values. By also #defining it > * we get warnings if the Kconfig value mismatches. */ > #define CONFIG_SPL_BSS_START_ADDR 0x2ff80000 > +#elif defined(CONFIG_MACH_SUNIV) > +#define SDRAM_OFFSET(x) 0x8##x > +#define CONFIG_SYS_SDRAM_BASE 0x80000000 > +/* Note SPL_STACK_R_ADDR is set through Kconfig, we include it here > + * since it needs to fit in with the other values. By also #defining it > + * we get warnings if the Kconfig value mismatches. > + */ > +#define CONFIG_SPL_STACK_R_ADDR 0x81e00000 > +#define CONFIG_SPL_BSS_START_ADDR 0x81f80000 > #else > #define SDRAM_OFFSET(x) 0x4##x > #define CONFIG_SYS_SDRAM_BASE 0x40000000 > @@ -186,21 +200,7 @@ > #define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(FE00000)) > #define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(FF00000)) > > -#else > -/* > - * 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc. > - * 32M uncompressed kernel, 16M compressed kernel, 1M fdt, > - * 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. > - */ > -#ifndef CONFIG_MACH_SUN8I_V3S > -#define BOOTM_SIZE __stringify(0xa000000) > -#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(2000000)) > -#define FDT_ADDR_R __stringify(SDRAM_OFFSET(3000000)) > -#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(3100000)) > -#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(3200000)) > -#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(3300000)) > -#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(3400000)) > -#else > +#elif defined(CONFIG_MACH_SUN8I_V3S) > /* > * 64M RAM minus 2MB heap + 16MB for u-boot, stack, fb, etc. > * 16M uncompressed kernel, 8M compressed kernel, 1M fdt, > @@ -213,7 +213,34 @@ > #define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(1A00000)) > #define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(1B00000)) > #define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(1C00000)) > -#endif > + > +#elif defined(CONFIG_MACH_SUNIV) > +/* > + * 32M RAM minus 1MB heap + 8MB for u-boot, stack, fb, etc. > + * 8M uncompressed kernel, 4M compressed kernel, 512K fdt, > + * 512K script, 512K pxe and the ramdisk at the end. > + */ > +#define BOOTM_SIZE __stringify(0x1700000) > +#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(0500000)) > +#define FDT_ADDR_R __stringify(SDRAM_OFFSET(0C00000)) > +#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(0C50000)) > +#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(0D00000)) > +#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(0D50000)) > +#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(0D60000)) > + > +#else > +/* > + * 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc. > + * 32M uncompressed kernel, 16M compressed kernel, 1M fdt, > + * 1M script, 1M pxe and the ramdisk at the end. > + */ > +#define BOOTM_SIZE __stringify(0xa000000) > +#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(2000000)) > +#define FDT_ADDR_R __stringify(SDRAM_OFFSET(3000000)) > +#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(3100000)) > +#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(3200000)) > +#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(3300000)) > +#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(3400000)) > #endif > > #define MEM_LAYOUT_ENV_SETTINGS \