[PATCH v2 1/2] riscv: spacemit: bananapi_f3: initial support added
Leo Liang
ycliang at andestech.com
Tue Sep 10 04:57:02 CEST 2024
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 <seashell11234455 at gmail.com>
> Reviewed-by: Leo Yu-Chi Liang <ycliang at andestech.com>
> ---
>
> 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 <seashell11234455 at gmail.com>
> + *
> + */
> +
> +#ifndef __CONFIG_H
> +#define __CONFIG_H
> +
> +#include <linux/serial_reg.h>
> +
> +#define CFG_SYS_SDRAM_BASE 0x0
> +#define CFG_SYS_NS16550_IER UART_IER_UUE
> +
> +#endif /* __CONFIG_H */
More information about the U-Boot
mailing list