platform: generic: Add Sophgo sg2042 support
v2 cover platform: generic: Add Sophgo sg2042 support
As the dts of sg2042 in the mainline kernel is considered as stable, it is time to port sg2042 soc.
This patch depends other two series:
1. platform: generic: add T-HEAD th1520 soc support
2. lib: sbi: Add sub-regions check for sanitizing domain
Changed from v1:
1. make number of entries in tlb fifo auto deteted.
Inochi Amaoto (4):
lib: utils/timer: mtimer: add separate T-Head C9xx CLINT mtimer
compatible
lib: utils/ipi: mswi: add separate T-Head C9xx CLINT mswi compatible
platform: Allow platform uses hart count as the size of tlb info
platform: generic: Add Sophgo sg2042 platform support
lib/utils/ipi/fdt_ipi_mswi.c | 1 + lib/utils/timer/fdt_timer_mtimer.c | 2 + platform/generic/Kconfig | 6 +++ platform/generic/configs/defconfig | 1 + platform/generic/platform.c | 7 ++++ platform/generic/sophgo/objects.mk | 9 +++++ platform/generic/sophgo/sg2042.c | 64 ++++++++++++++++++++++++++++++ 7 files changed, 90 insertions(+) create mode 100644 platform/generic/sophgo/objects.mk create mode 100644 platform/generic/sophgo/sg2042.c
--
2.42.0
PATCH v2 1/4 lib: utils/timer: mtimer: add separate T-Head C9xx CLINT mtimer compatible
T-HEAD allows soc vendor to map the mtimer and mswi of C9xx clint on different address, which may cause a misuse if use the same compatible string, add a new timer compatible string to avoid this.
--- lib/utils/timer/fdt_timer_mtimer.c | 2 ++ 1 file changed, 2 insertions(+)
lib/utils/timer/fdt_timer_mtimer.c +2 -0
@@ -146,6 +146,8 @@ static const struct fdt_match timer_mtimer_match[] = { { .compatible = "riscv,clint0", .data = &sifive_clint_quirks }, { .compatible = "sifive,clint0", .data = &sifive_clint_quirks }, { .compatible = "thead,c900-clint", .data = &thead_clint_quirks }, + { .compatible = "thead,c900-aclint-mtimer", + .data = &thead_clint_quirks }, { .compatible = "riscv,aclint-mtimer" }, { }, };
Signature · 1 line
2.42.0
PATCH v2 1/4 lib: utils/timer: mtimer: add separate T-Head C9xx CLINT mtimer compatible
Quoted 15 lines · Inochi Amaoto
T-HEAD allows soc vendor to map the mtimer and mswi of C9xx clint on different address, which may cause a misuse if use the same compatible string, add a new timer compatible string to avoid this.
Signed-off-by Inochi Amaoto <[email protected]>--- lib/utils/timer/fdt_timer_mtimer.c | 2 ++ 1 file changed, 2 insertions(+)lib/utils/timer/fdt_timer_mtimer.c +0
-0
lib/utils/timer/fdt_timer_mtimer.c static const struct fdt_match timer_mtimer_match[] = { · line 150
Quoted 5 lines
lib/utils/timer/fdt_timer_mtimer.c +2
-0@@ -146,6 +146,8 @@ static const struct fdt_match timer_mtimer_match[] = { { .compatible = "riscv,clint0", .data = &sifive_clint_quirks }, { .compatible = "sifive,clint0", .data = &sifive_clint_quirks }, { .compatible = "thead,c900-clint", .data = &thead_clint_quirks }, + { .compatible = "thead,c900-aclint-mtimer", + .data = &thead_clint_quirks },
This is wrong. When using separate mtimer/mswi nodes, there is no MMIO offset. So you need a new quirks structure for this compatible string.
Regards,
Samuel
Quoted 3 lines
lib/utils/timer/fdt_timer_mtimer.c +0
-0{ .compatible = "riscv,aclint-mtimer" }, { }, };
PATCH v2 1/4 lib: utils/timer: mtimer: add separate T-Head C9xx CLINT mtimer compatible
Quoted 25 lines · Inochi Amaoto
Quoted 15 lines
T-HEAD allows soc vendor to map the mtimer and mswi of C9xx clint on different address, which may cause a misuse if use the same compatible string, add a new timer compatible string to avoid this.
Signed-off-by Inochi Amaoto <[email protected]>--- lib/utils/timer/fdt_timer_mtimer.c | 2 ++ 1 file changed, 2 insertions(+)lib/utils/timer/fdt_timer_mtimer.c +0
-0lib/utils/timer/fdt_timer_mtimer.c static const struct fdt_match timer_mtimer_match[] = { · line 150
Quoted 5 lines
lib/utils/timer/fdt_timer_mtimer.c +2
-0@@ -146,6 +146,8 @@ static const struct fdt_match timer_mtimer_match[] = { { .compatible = "riscv,clint0", .data = &sifive_clint_quirks }, { .compatible = "sifive,clint0", .data = &sifive_clint_quirks }, { .compatible = "thead,c900-clint", .data = &thead_clint_quirks }, + { .compatible = "thead,c900-aclint-mtimer", + .data = &thead_clint_quirks },This is wrong. When using separate mtimer/mswi nodes, there is no MMIO offset. So you need a new quirks structure for this compatible string.
Quoted 3 lines
Regards,
Samuel
Ok, I will add a new one.
Quoted 5 lines
Quoted 3 lines
lib/utils/timer/fdt_timer_mtimer.c +0
-0{ .compatible = "riscv,aclint-mtimer" }, { }, };
PATCH v2 1/4 lib: utils/timer: mtimer: add separate T-Head C9xx CLINT mtimer compatible
Quoted 25 lines
Quoted 25 lines · Inochi Amaoto
Quoted 15 lines
T-HEAD allows soc vendor to map the mtimer and mswi of C9xx clint on different address, which may cause a misuse if use the same compatible string, add a new timer compatible string to avoid this.
Signed-off-by Inochi Amaoto <[email protected]>--- lib/utils/timer/fdt_timer_mtimer.c | 2 ++ 1 file changed, 2 insertions(+)lib/utils/timer/fdt_timer_mtimer.c +0
-0lib/utils/timer/fdt_timer_mtimer.c static const struct fdt_match timer_mtimer_match[] = { · line 150
Quoted 5 lines
lib/utils/timer/fdt_timer_mtimer.c +2
-0@@ -146,6 +146,8 @@ static const struct fdt_match timer_mtimer_match[] = { { .compatible = "riscv,clint0", .data = &sifive_clint_quirks }, { .compatible = "sifive,clint0", .data = &sifive_clint_quirks }, { .compatible = "thead,c900-clint", .data = &thead_clint_quirks }, + { .compatible = "thead,c900-aclint-mtimer", + .data = &thead_clint_quirks },This is wrong. When using separate mtimer/mswi nodes, there is no MMIO offset. So you need a new quirks structure for this compatible string.
Quoted 6 lines
Quoted 3 lines
Regards,
SamuelOk, I will add a new one.
Fix this may need to change the kernel dt-binding and dt. FYI, Chen Wang.
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
lib/utils/timer/fdt_timer_mtimer.c +0
-0{ .compatible = "riscv,aclint-mtimer" }, { }, };
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 2/4 lib: utils/ipi: mswi: add separate T-Head C9xx CLINT mswi compatible
Like the mtimer of T-HEAD C9xx clint, the mswi also needs new compatible string to avoid misuse.
--- lib/utils/ipi/fdt_ipi_mswi.c | 1 + 1 file changed, 1 insertion(+)
lib/utils/ipi/fdt_ipi_mswi.c +1 -0
@@ -56,6 +56,7 @@ static const struct fdt_match ipi_mswi_match[] = { { .compatible = "riscv,clint0", .data = &clint_offset }, { .compatible = "sifive,clint0", .data = &clint_offset }, { .compatible = "thead,c900-clint", .data = &clint_offset }, + { .compatible = "thead,c900-aclint-mswi", .data = &clint_offset }, { .compatible = "riscv,aclint-mswi" }, { }, };
Signature · 1 line
2.42.0
PATCH v2 2/4 lib: utils/ipi: mswi: add separate T-Head C9xx CLINT mswi compatible
Quoted 14 lines · Inochi Amaoto
Like the mtimer of T-HEAD C9xx clint, the mswi also needs new compatible string to avoid misuse.
Signed-off-by Inochi Amaoto <[email protected]>--- lib/utils/ipi/fdt_ipi_mswi.c | 1 + 1 file changed, 1 insertion(+)lib/utils/ipi/fdt_ipi_mswi.c +0
-0
lib/utils/ipi/fdt_ipi_mswi.c static const struct fdt_match ipi_mswi_match[] = { · line 59
Quoted 4 lines
lib/utils/ipi/fdt_ipi_mswi.c +1
-0@@ -56,6 +56,7 @@ static const struct fdt_match ipi_mswi_match[] = { { .compatible = "riscv,clint0", .data = &clint_offset }, { .compatible = "sifive,clint0", .data = &clint_offset }, { .compatible = "thead,c900-clint", .data = &clint_offset }, + { .compatible = "thead,c900-aclint-mswi", .data = &clint_offset },
This should omit .data, like for riscv,aclint-mswi below, so it gets the MMIO region base and size directly from the DT node.
Regards,
Samuel
Quoted 3 lines
lib/utils/ipi/fdt_ipi_mswi.c +0
-0{ .compatible = "riscv,aclint-mswi" }, { }, };
PATCH v2 2/4 lib: utils/ipi: mswi: add separate T-Head C9xx CLINT mswi compatible
Quoted 23 lines · Inochi Amaoto
Quoted 14 lines
Like the mtimer of T-HEAD C9xx clint, the mswi also needs new compatible string to avoid misuse.
Signed-off-by Inochi Amaoto <[email protected]>--- lib/utils/ipi/fdt_ipi_mswi.c | 1 + 1 file changed, 1 insertion(+)lib/utils/ipi/fdt_ipi_mswi.c +0
-0lib/utils/ipi/fdt_ipi_mswi.c static const struct fdt_match ipi_mswi_match[] = { · line 59
Quoted 4 lines
lib/utils/ipi/fdt_ipi_mswi.c +1
-0@@ -56,6 +56,7 @@ static const struct fdt_match ipi_mswi_match[] = { { .compatible = "riscv,clint0", .data = &clint_offset }, { .compatible = "sifive,clint0", .data = &clint_offset }, { .compatible = "thead,c900-clint", .data = &clint_offset }, + { .compatible = "thead,c900-aclint-mswi", .data = &clint_offset },This should omit .data, like for riscv,aclint-mswi below, so it gets the MMIO region base and size directly from the DT node.
Quoted 3 lines
Regards,
Samuel
Yes, I will omit it. It seems I have misunderstand the aclint.
Quoted 4 lines
Quoted 3 lines
lib/utils/ipi/fdt_ipi_mswi.c +0
-0{ .compatible = "riscv,aclint-mswi" }, { }, };
PATCH v2 3/4 platform: Allow platform uses hart count as the size of tlb info
In reply to Inochi AmaotoFor platform with high number of harts, it is better to auto detect a suitable number of entries in tlb fifo. Since allocating tlb entry for all online harts can reduce the wait time significantly, using the number of the online harts can make most platforms happy. This auto detection can avoid most duplicate code for setting tlb fifo size if the hart count of platform is big.
--- platform/generic/platform.c | 7 +++++++ 1 file changed, 7 insertions(+)
platform/generic/platform.c +7 -0
@@ -258,8 +258,15 @@ static u64 generic_tlbr_flush_limit(void)static u32 generic_tlb_num_entries (void ) { +const struct sbi_platform *plat =sbi_platform_thishart_ptr (); +u32 hart_count =sbi_platform_hart_count (plat); +if (generic_plat && generic_plat->tlb_num_entries)return generic_plat->tlb_num_entries (generic_plat_match); + +/* for platform with too many harts, use hart count instead */ +if (hart_count >SBI_PLATFORM_TLB_FIFO_NUM_ENTRIES ) +return hart_count;return SBI_PLATFORM_TLB_FIFO_NUM_ENTRIES ; }
Signature · 1 line
2.42.0
PATCH v2 3/4 platform: Allow platform uses hart count as the size of tlb info
? 2023-10-08???? 20:17 +0800?Inochi Amaoto???
Quoted 20 lines
For platform with high number of harts, it is better to auto detect a suitable number of entries in tlb fifo. Since allocating tlb entry for all online harts can reduce the wait time significantly, using the number of the online harts can make most platforms happy. This auto detection can avoid most duplicate code for setting tlb fifo size if the hart count of platform is big.
Signed-off-by Inochi Amaoto <[email protected]>---
?platform/generic/platform.c | 7 +++++++
?1 file changed, 7 insertions(+)platform/generic/platform.c +0
-0@@ -258,8 +258,15 @@ static u64 generic_tlbr_flush_limit(void)?
?static u32generic_tlb_num_entries(void)
?{
platform/generic/platform.c static u64 generic_tlbr_flush_limit(void) · line 262
Quoted 2 lines
platform/generic/platform.c +2
-0+const struct sbi_platform *plat =sbi_platform_thishart_ptr (); +u32 hart_count =sbi_platform_hart_count (plat);
The two lines above can be replaced with:
u32 hart_count = sbi_scratch_last_hartindex() + 1;
If returning hart_count directly is appropriate, is it possible to remove SBI_PLATFORM_TLB_FIFO_NUM_ENTRIES and generic_plat->tlb_num_entries?
This patch does not seem to belong to sg2042 and should be sent separately.
Regards,
Xiang W
Quoted 10 lines
+
? if (generic_plat&&generic_plat->tlb_num_entries)
? returngeneric_plat->tlb_num_entries(generic_plat_match);platform/generic/platform.c +4
-0+ +/* for platform with too many harts, use hart count instead */ +if (hart_count >SBI_PLATFORM_TLB_FIFO_NUM_ENTRIES ) +return hart_count;? return
SBI_PLATFORM_TLB_FIFO_NUM_ENTRIES;
?}
?
PATCH v2 3/4 platform: Allow platform uses hart count as the size of tlb info
Quoted 19 lines
? 2023-10-08???? 20:17 +0800?Inochi Amaoto???
Quoted 18 lines
For platform with high number of harts, it is better to auto detect a suitable number of entries in tlb fifo. Since allocating tlb entry for all online harts can reduce the wait time significantly, using the number of the online harts can make most platforms happy. This auto detection can avoid most duplicate code for setting tlb fifo size if the hart count of platform is big.
Signed-off-by Inochi Amaoto <[email protected]>--- platform/generic/platform.c | 7 +++++++ 1 file changed, 7 insertions(+)platform/generic/platform.c +0
-0@@ -258,8 +258,15 @@ static u64 generic_tlbr_flush_limit(void)
Quoted 7 lines
platform/generic/platform.c static u64 generic_tlbr_flush_limit(void) · line 262
Quoted 4 lines
platform/generic/platform.c +2
-0static u32 generic_tlb_num_entries (void ) { +const struct sbi_platform *plat =sbi_platform_thishart_ptr (); +u32 hart_count =sbi_platform_hart_count (plat);The two lines above can be replaced with:
u32 hart_count = sbi_scratch_last_hartindex() + 1;
Thx.
Quoted 3 lines
If returning
hart_countdirectly is appropriate, is it possible to removeSBI_PLATFORM_TLB_FIFO_NUM_ENTRIESandgeneric_plat->tlb_num_entries?
I think replacing SBI_PLATFORM_TLB_FIFO_NUM_ENTRIES with hart_count is reasonable.
For the override functions, it gives a chance for platform to setting up a new entry number. I suggest to perserve it, so the platform can define its own if needed.
Quoted 2 lines
This patch does not seem to belong to sg2042 and should be sent separately.
Yes, The only reason I added it is that sg2042 require the new default value.
I will send it separately.
Quoted 13 lines
Regards,
Xiang WQuoted 10 lines
platform/generic/platform.c +5
-0+if (generic_plat && generic_plat->tlb_num_entries)return generic_plat->tlb_num_entries (generic_plat_match); + +/* for platform with too many harts, use hart count instead */ +if (hart_count >SBI_PLATFORM_TLB_FIFO_NUM_ENTRIES ) +return hart_count;return SBI_PLATFORM_TLB_FIFO_NUM_ENTRIES ; }
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 4/4 platform: generic: Add Sophgo sg2042 platform support
Add Sophgo sg2042 soc support
--- platform/generic/Kconfig | 6 +++ platform/generic/configs/defconfig | 1 + platform/generic/sophgo/objects.mk | 9 +++++ platform/generic/sophgo/sg2042.c | 64 ++++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 platform/generic/sophgo/objects.mk create mode 100644 platform/generic/sophgo/sg2042.c
platform/generic/Kconfig +6 -0
@@ -49,6 +49,12 @@ config PLATFORM_SIFIVE_FU740 depends on FDT_RESET && FDT_I2C default n +config PLATFORM_SOPHGO_SG2042 + bool "Sophgo sg2042 support" + select THEAD_C9XX_ERRATA + select THEAD_C9XX_PMU + default n + config PLATFORM_STARFIVE_JH7110 bool "StarFive JH7110 support" default n
platform/generic/configs/defconfig +1 -0
@@ -3,6 +3,7 @@ CONFIG_PLATFORM_ANDES_AE350=y CONFIG_PLATFORM_RENESAS_RZFIVE=y CONFIG_PLATFORM_SIFIVE_FU540=y CONFIG_PLATFORM_SIFIVE_FU740=y +CONFIG_PLATFORM_SOPHGO_SG2042=y CONFIG_PLATFORM_STARFIVE_JH7110=y CONFIG_PLATFORM_THEAD=y CONFIG_FDT_GPIO=y
platform/generic/sophgo/objects.mk new file +9 -0
@@ -0,0 +1,9 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (C) 2023 Inochi Amaoto <[email protected]> +# Copyright (C) 2023 Alibaba Group Holding Limited. +# + +carray-platform_override_modules-$(CONFIG_PLATFORM_SOPHGO_SG2042) += sophgo_sg2042 +platform-objs-$(CONFIG_PLATFORM_SOPHGO_SG2042) += sophgo/sg2042.o
platform/generic/sophgo/sg2042.c new file +64 -0
64 lines not on this page · raw message
Signature · 1 line
2.42.0
PATCH v2 4/4 platform: generic: Add Sophgo sg2042 platform support
Quoted 85 lines · On Sun, Oct 8, 2023 at 8:17?PM Inochi Amaoto <[email protected]> wrote:
Add Sophgo sg2042 soc support
Signed-off-by Inochi Amaoto <[email protected]>--- platform/generic/Kconfig | 6 +++ platform/generic/configs/defconfig | 1 + platform/generic/sophgo/objects.mk | 9 +++++ platform/generic/sophgo/sg2042.c | 64 ++++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 platform/generic/sophgo/objects.mk create mode 100644 platform/generic/sophgo/sg2042.cplatform/generic/Kconfig +6
-0@@ -49,6 +49,12 @@ config PLATFORM_SIFIVE_FU740 depends on FDT_RESET && FDT_I2C default n +config PLATFORM_SOPHGO_SG2042 + bool "Sophgo sg2042 support" + select THEAD_C9XX_ERRATA + select THEAD_C9XX_PMU + default n + config PLATFORM_STARFIVE_JH7110 bool "StarFive JH7110 support" default nplatform/generic/configs/defconfig +1
-0@@ -3,6 +3,7 @@ CONFIG_PLATFORM_ANDES_AE350=y CONFIG_PLATFORM_RENESAS_RZFIVE=y CONFIG_PLATFORM_SIFIVE_FU540=y CONFIG_PLATFORM_SIFIVE_FU740=y +CONFIG_PLATFORM_SOPHGO_SG2042=y CONFIG_PLATFORM_STARFIVE_JH7110=y CONFIG_PLATFORM_THEAD=y CONFIG_FDT_GPIO=yplatform/generic/sophgo/objects.mk new file +9
-0@@ -0,0 +1,9 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (C) 2023 Inochi Amaoto <[email protected]> +# Copyright (C) 2023 Alibaba Group Holding Limited. +# + +carray-platform_override_modules-$(CONFIG_PLATFORM_SOPHGO_SG2042) += sophgo_sg2042 +platform-objs-$(CONFIG_PLATFORM_SOPHGO_SG2042) += sophgo/sg2042.oplatform/generic/sophgo/sg2042.c new file +22
-0@@ -0,0 +1,64 @@ +/* +* SPDX-License-Identifier: BSD-2-Clause +* +* Authors: +* Inochi Amaoto <[email protected]> +* +*/ + +#include <platform_override.h> +#include <thead/c9xx_errata.h> +#include <thead/c9xx_pmu.h> +#include <sbi/sbi_const.h> +#include <sbi/sbi_domain.h> +#include <sbi/sbi_platform.h> +#include <sbi/sbi_scratch.h> +#include <sbi/sbi_string.h> +#include <sbi_utils/fdt/fdt_helper.h> +#include <sbi_utils/timer/aclint_mtimer.h> + +#define SOPHGO_SG2042_TIMER_BASE 0x70ac000000UL +#define SOPHGO_SG2042_TIMER_SIZE 0x10000UL +
platform/generic/sophgo/sg2042.c line 32
Quoted 10 lines
platform/generic/sophgo/sg2042.c new file +10
-0+ +static int sophgo_sg2042_early_init (bool cold_boot, +const struct fdt_match *match) +{ +const struct sbi_platform *plat =sbi_platform_thishart_ptr (); + +thead_register_tlb_flush_trap_handler (); + +/* +* Sophgo sg2042 soc use seperate 16 timers while initiating,
Typo: separate
After fixed:
Quoted 35 lines
platform/generic/sophgo/sg2042.c new file +32
-1+* merge them as a single domain to avoid wasting. +*/ +if (cold_boot) +return sbi_domain_root_add_memrange (SOPHGO_SG2042_TIMER_BASE , +SOPHGO_SG2042_TIMER_SIZE * +sbi_platform_hart_count (plat), +MTIMER_REGION_ALIGN , + (SBI_DOMAIN_MEMREGION_MMIO | +SBI_DOMAIN_MEMREGION_M_READABLE | +SBI_DOMAIN_MEMREGION_M_WRITABLE )); + + +return 0 ; +} + +static int sophgo_sg2042_extensions_init (const struct fdt_match *match, +struct sbi_hart_features *hfeatures) +{ +thead_c9xx_register_pmu_device (); +return 0 ; +} + +static const struct fdt_match sophgo_sg2042_match[] = { + { .compatible ="sophgo,sg2042" }, + { }, +}; + +const struct platform_override sophgo_sg2042 = { + .match_table = sophgo_sg2042_match, + .early_init = sophgo_sg2042_early_init, + .extensions_init = sophgo_sg2042_extensions_init, +}; --2.42.0
Signature · 2 lines
Best Regards Guo Ren
v2 cover platform: generic: Add Sophgo sg2042 support
In reply to Inochi AmaotoQuoted 13 lines · On Sun, Oct 8, 2023 at 5:46?PM Inochi Amaoto <[email protected]> wrote:
As the dts of sg2042 in the mainline kernel is considered as stable, it is time to port sg2042 soc.
This patch depends other two series:
1. platform: generic: add T-HEAD th1520 soc support
2. lib: sbi: Add sub-regions check for sanitizing domainLink https://lore.kernel.org/linux-riscv/cover.1696433229.git.unicorn_wang at outlook.com/Changed from v1:
1. make number of entries in tlb fifo auto deteted.
Quoted 6 lines
Inochi Amaoto (4):
lib: utils/timer: mtimer: add separate T-Head C9xx CLINT mtimer
compatible
lib: utils/ipi: mswi: add separate T-Head C9xx CLINT mswi compatible
platform: Allow platform uses hart count as the size of tlb info
platform: generic: Add Sophgo sg2042 platform support
There are unaddressed comments in this series. I assume there will be a v3.
Regards,
Anup
Quoted 20 lines
lib/utils/ipi/fdt_ipi_mswi.c | 1 + lib/utils/timer/fdt_timer_mtimer.c | 2 + platform/generic/Kconfig | 6 +++ platform/generic/configs/defconfig | 1 + platform/generic/platform.c | 7 ++++ platform/generic/sophgo/objects.mk | 9 +++++ platform/generic/sophgo/sg2042.c | 64 ++++++++++++++++++++++++++++++ 7 files changed, 90 insertions(+) create mode 100644 platform/generic/sophgo/objects.mk create mode 100644 platform/generic/sophgo/sg2042.c--
2.42.0--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi
v2 cover platform: generic: Add Sophgo sg2042 support
Quoted 21 lines · On Sun, Oct 8, 2023 at 5:46?PM Inochi Amaoto <[email protected]> wrote:
Quoted 13 lines
As the dts of sg2042 in the mainline kernel is considered as stable, it is time to port sg2042 soc.
This patch depends other two series:
1. platform: generic: add T-HEAD th1520 soc support
2. lib: sbi: Add sub-regions check for sanitizing domainLink https://lore.kernel.org/linux-riscv/cover.1696433229.git.unicorn_wang at outlook.com/Changed from v1:
1. make number of entries in tlb fifo auto deteted.Quoted 6 lines
Inochi Amaoto (4):
lib: utils/timer: mtimer: add separate T-Head C9xx CLINT mtimer
compatible
lib: utils/ipi: mswi: add separate T-Head C9xx CLINT mswi compatible
platform: Allow platform uses hart count as the size of tlb info
platform: generic: Add Sophgo sg2042 platform support
Quoted 3 lines
There are unaddressed comments in this series. I assume there will be a v3.
There is already a v3 version. but the patch is splitted since v3, as the aclint driver may evolve a lot.
the latest version of each patch is:
1. the patch 1-2
https://lists.infradead.org/pipermail/opensbi/2023-October/005736.html
2. the patch 3
https://lists.infradead.org/pipermail/opensbi/2023-October/005719.html
3. the patch 4
https://lists.infradead.org/pipermail/opensbi/2023-October/005760.html
Quoted 24 lines
Regards,
AnupQuoted 20 lines
lib/utils/ipi/fdt_ipi_mswi.c | 1 + lib/utils/timer/fdt_timer_mtimer.c | 2 + platform/generic/Kconfig | 6 +++ platform/generic/configs/defconfig | 1 + platform/generic/platform.c | 7 ++++ platform/generic/sophgo/objects.mk | 9 +++++ platform/generic/sophgo/sg2042.c | 64 ++++++++++++++++++++++++++++++ 7 files changed, 90 insertions(+) create mode 100644 platform/generic/sophgo/objects.mk create mode 100644 platform/generic/sophgo/sg2042.c--
2.42.0--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi
v2 cover platform: generic: Add Sophgo sg2042 support
Quoted 29 lines · On Wed, Nov 15, 2023 at 4:51?AM Inochi Amaoto <[email protected]> wrote:
Quoted 22 lines · On Sun, Oct 8, 2023 at 5:46?PM Inochi Amaoto <[email protected]> wrote:
Quoted 13 lines
As the dts of sg2042 in the mainline kernel is considered as stable, it is time to port sg2042 soc.
This patch depends other two series:
1. platform: generic: add T-HEAD th1520 soc support
2. lib: sbi: Add sub-regions check for sanitizing domainLink https://lore.kernel.org/linux-riscv/cover.1696433229.git.unicorn_wang at outlook.com/Changed from v1:
1. make number of entries in tlb fifo auto deteted.Quoted 6 lines
Inochi Amaoto (4):
lib: utils/timer: mtimer: add separate T-Head C9xx CLINT mtimer
compatible
lib: utils/ipi: mswi: add separate T-Head C9xx CLINT mswi compatible
platform: Allow platform uses hart count as the size of tlb info
platform: generic: Add Sophgo sg2042 platform supportQuoted 3 lines
There are unaddressed comments in this series. I assume there will be a v3.
There is already a v3 version. but the patch is splitted since v3, as the aclint driver may evolve a lot.
Quoted 7 lines
the latest version of each patch is:
1. the patch 1-2
https://lists.infradead.org/pipermail/opensbi/2023-October/005736.html
2. the patch 3
https://lists.infradead.org/pipermail/opensbi/2023-October/005719.html
3. the patch 4
https://lists.infradead.org/pipermail/opensbi/2023-October/005760.html
I had applied v3 patches but accidentally replied to v2 series. Sorry for the noise.
Regards,
Anup
Quoted 25 lines
Quoted 25 lines
Regards,
AnupQuoted 20 lines
lib/utils/ipi/fdt_ipi_mswi.c | 1 + lib/utils/timer/fdt_timer_mtimer.c | 2 + platform/generic/Kconfig | 6 +++ platform/generic/configs/defconfig | 1 + platform/generic/platform.c | 7 ++++ platform/generic/sophgo/objects.mk | 9 +++++ platform/generic/sophgo/sg2042.c | 64 ++++++++++++++++++++++++++++++ 7 files changed, 90 insertions(+) create mode 100644 platform/generic/sophgo/objects.mk create mode 100644 platform/generic/sophgo/sg2042.c--
2.42.0--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi