From 2e8190643f1abdfcf6c8b5981b6d6863dea78a08 Mon Sep 17 00:00:00 2001 From: "sam.xiang" Date: Tue, 21 Feb 2023 20:43:18 +0800 Subject: [PATCH] [opensbi] porting: adapt to CV180X / CV181X Change-Id: Id7b3c64d203eb2c9af6c66f195bf0d8a05f0164c --- opensbi/.clang-format | 16 ++++++++++++++++ opensbi/.gitignore | 11 +++++++++++ opensbi/lib/utils/serial/fdt_serial_uart8250.c | 1 + opensbi/platform/generic/config.mk | 3 ++- 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 opensbi/.clang-format create mode 100644 opensbi/.gitignore mode change 100644 => 100755 opensbi/lib/utils/serial/fdt_serial_uart8250.c diff --git a/opensbi/.clang-format b/opensbi/.clang-format new file mode 100644 index 000000000..c80c0aa98 --- /dev/null +++ b/opensbi/.clang-format @@ -0,0 +1,16 @@ +AlignConsecutiveAssignments: true +AlignEscapedNewlines: Left +AlignTrailingComments: true +AllowShortFunctionsOnASingleLine: None +BraceWrapping: + AfterFunction: true +BreakBeforeBraces: Custom +BreakStringLiterals: false +ContinuationIndentWidth: 8 +Cpp11BracedListStyle: false +IndentWidth: 8 +ReflowComments: false +SortIncludes: false +SpacesInContainerLiterals: false +TabWidth: 8 +UseTab: Always diff --git a/opensbi/.gitignore b/opensbi/.gitignore new file mode 100644 index 000000000..534ad6477 --- /dev/null +++ b/opensbi/.gitignore @@ -0,0 +1,11 @@ +# Object files +*.o +*.a +*.dep + +#Build & install directories +build/ +install/ + +# Development friendly files +tags diff --git a/opensbi/lib/utils/serial/fdt_serial_uart8250.c b/opensbi/lib/utils/serial/fdt_serial_uart8250.c old mode 100644 new mode 100755 index 918193ae9..c72eeeb89 --- a/opensbi/lib/utils/serial/fdt_serial_uart8250.c +++ b/opensbi/lib/utils/serial/fdt_serial_uart8250.c @@ -26,6 +26,7 @@ static int serial_uart8250_init(void *fdt, int nodeoff, } static const struct fdt_match serial_uart8250_match[] = { + { .compatible = "snps,dw-apb-uart" }, { .compatible = "ns16550" }, { .compatible = "ns16550a" }, { }, diff --git a/opensbi/platform/generic/config.mk b/opensbi/platform/generic/config.mk index 8151974f2..6e09f3332 100644 --- a/opensbi/platform/generic/config.mk +++ b/opensbi/platform/generic/config.mk @@ -28,7 +28,8 @@ else # This needs to be 2MB aligned for 64-bit system FW_JUMP_ADDR=$(shell printf "0x%X" $$(($(FW_TEXT_START) + 0x200000))) endif -FW_JUMP_FDT_ADDR=$(shell printf "0x%X" $$(($(FW_TEXT_START) + 0x2200000))) +#set FDT_ADDR 0xB0000000 +FW_JUMP_FDT_ADDR=$(shell printf "0x%X" $$(($(FW_TEXT_START) + 0x30000000))) FW_PAYLOAD=y ifeq ($(PLATFORM_RISCV_XLEN), 32) # This needs to be 4MB aligned for 32-bit system