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 D8792EDE996 for ; Tue, 10 Sep 2024 02:57:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4C07088EC1; Tue, 10 Sep 2024 04:57:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=andestech.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 A7CD188EC7; Tue, 10 Sep 2024 04:57:52 +0200 (CEST) Received: from Atcsqr.andestech.com (60-248-80-70.hinet-ip.hinet.net [60.248.80.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8DEA888829 for ; Tue, 10 Sep 2024 04:57:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=andestech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ycliang@andestech.com Received: from mail.andestech.com (ATCPCS34.andestech.com [10.0.1.134]) by Atcsqr.andestech.com with ESMTPS id 48A2v5Lr054685 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Tue, 10 Sep 2024 10:57:05 +0800 (+08) (envelope-from ycliang@andestech.com) Received: from swlinux02 (10.0.15.183) by ATCPCS34.andestech.com (10.0.1.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 10 Sep 2024 10:57:05 +0800 Date: Tue, 10 Sep 2024 10:57:02 +0800 From: Leo Liang To: Kongyang Liu CC: , Ben Dooks , Bin Meng , Dan Carpenter , "Heinrich Schuchardt" , Michal Simek , Padmarao Begari , Randolph , Rick Chen , Samuel Holland , Tom Rini , Yu Chien Peter Lin Subject: Re: [PATCH v2 1/2] riscv: spacemit: bananapi_f3: initial support added Message-ID: References: <20240718043329.1500-1-seashell11234455@gmail.com> <20240718043329.1500-2-seashell11234455@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240718043329.1500-2-seashell11234455@gmail.com> User-Agent: Mutt/2.2.10 (e0e92c31) (2023-03-25) X-Originating-IP: [10.0.15.183] X-ClientProxiedBy: ATCPCS33.andestech.com (10.0.1.100) To ATCPCS34.andestech.com (10.0.1.134) X-DNSRBL: X-MAIL: Atcsqr.andestech.com 48A2v5Lr054685 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.8 at phobos.denx.de X-Virus-Status: Clean On Thu, Jul 18, 2024 at 12:33:22PM +0800, Kongyang Liu wrote: > Add basic support for SpacemiT's Banana Pi F3 board > > Signed-off-by: Kongyang Liu > Reviewed-by: Leo Yu-Chi Liang > --- > > Changes in v2: > - Change license to GPL-2.0-or-later > - Add memory node for dts > - Add ft_board_setup function for kernel memory init > - Use default prompt > > arch/riscv/Kconfig | 5 + > arch/riscv/cpu/k1/Kconfig | 18 ++ > arch/riscv/cpu/k1/Makefile | 6 + > arch/riscv/cpu/k1/cpu.c | 9 + > arch/riscv/cpu/k1/dram.c | 54 ++++ > arch/riscv/dts/Makefile | 1 + > arch/riscv/dts/k1-bananapi-f3.dts | 25 ++ > arch/riscv/dts/k1.dtsi | 375 +++++++++++++++++++++++++ > board/spacemit/bananapi_f3/Kconfig | 25 ++ > board/spacemit/bananapi_f3/MAINTAINERS | 6 + > board/spacemit/bananapi_f3/Makefile | 5 + > board/spacemit/bananapi_f3/board.c | 9 + > configs/bananapi_f3_defconfig | 20 ++ > include/configs/bananapi_f3.h | 15 + > 14 files changed, 573 insertions(+) > create mode 100644 arch/riscv/cpu/k1/Kconfig > create mode 100644 arch/riscv/cpu/k1/Makefile > create mode 100644 arch/riscv/cpu/k1/cpu.c > create mode 100644 arch/riscv/cpu/k1/dram.c > create mode 100644 arch/riscv/dts/k1-bananapi-f3.dts > create mode 100644 arch/riscv/dts/k1.dtsi > create mode 100644 board/spacemit/bananapi_f3/Kconfig > create mode 100644 board/spacemit/bananapi_f3/MAINTAINERS > create mode 100644 board/spacemit/bananapi_f3/Makefile > create mode 100644 board/spacemit/bananapi_f3/board.c > create mode 100644 configs/bananapi_f3_defconfig > create mode 100644 include/configs/bananapi_f3.h Hi Kongyang, `$ make bananapi_f3_defconfig && make` produces the following warning. In file included from drivers/serial/ns16550.c:13: include/ns16550.h:205:9: warning: "UART_IIR_ID" redefined 205 | #define UART_IIR_ID 0x06 /* Mask for the interrupt ID */ | ^~~~~~~~~~~ In file included from include/configs/bananapi_f3.h:10, from include/config.h:3, from drivers/serial/ns16550.c:8: include/linux/serial_reg.h:33:9: note: this is the location of the previous definition 33 | #define UART_IIR_ID 0x0e /* Mask for the interrupt ID */ | ^~~~~~~~~~~ There seems to be Macro redefinition. Could you please take a look? Best regards, Leo > diff --git a/configs/bananapi_f3_defconfig b/configs/bananapi_f3_defconfig > new file mode 100644 > index 0000000000..6363620208 > --- /dev/null > +++ b/configs/bananapi_f3_defconfig > @@ -0,0 +1,20 @@ > +CONFIG_RISCV=y > +CONFIG_SYS_MALLOC_LEN=0x1000000 > +CONFIG_NR_DRAM_BANKS=2 > +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y > +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x1000000 > +CONFIG_DEFAULT_DEVICE_TREE="k1-bananapi-f3" > +CONFIG_SYS_LOAD_ADDR=0x200000 > +CONFIG_TARGET_BANANAPI_F3=y > +CONFIG_ARCH_RV64I=y > +CONFIG_RISCV_SMODE=y > +CONFIG_FIT=y > +CONFIG_SYS_BOOTM_LEN=0xa000000 > +CONFIG_SUPPORT_RAW_INITRD=y > +CONFIG_OF_BOARD_SETUP=y > +CONFIG_SYS_CBSIZE=256 > +CONFIG_SYS_PBSIZE=276 > +CONFIG_HUSH_PARSER=y > +CONFIG_ENV_OVERWRITE=y > +CONFIG_SYS_NS16550=y > +CONFIG_SYS_NS16550_MEM32=y > diff --git a/include/configs/bananapi_f3.h b/include/configs/bananapi_f3.h > new file mode 100644 > index 0000000000..723bbaab69 > --- /dev/null > +++ b/include/configs/bananapi_f3.h > @@ -0,0 +1,15 @@ > +/* SPDX-License-Identifier: GPL-2.0-or-later */ > +/* > + * Copyright (c) 2024, Kongyang Liu > + * > + */ > + > +#ifndef __CONFIG_H > +#define __CONFIG_H > + > +#include > + > +#define CFG_SYS_SDRAM_BASE 0x0 > +#define CFG_SYS_NS16550_IER UART_IER_UUE > + > +#endif /* __CONFIG_H */