mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-11-22 19:01:33 +00:00
platform: ariane: Move ariane platform from fpga to generic
The Ariane framework has a generic PMU that is not used by OpenSBI. Due to OpenSBI’s build system we cannot directly reuse the generic platform functions, so move the Ariane platform to generic. Also due to the generic platform is where new features are added. Signed-off-by: Manuel Hernández Méndez <maherme.dev@gmail.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20251023090347.30746-1-maherme.dev@gmail.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
committed by
Anup Patel
parent
834d0d9f26
commit
e8dfa55f3d
@@ -1,10 +0,0 @@
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
config PLATFORM_ARIANE_FPGA
|
||||
bool
|
||||
select FDT
|
||||
select IPI_MSWI
|
||||
select IRQCHIP_PLIC
|
||||
select SERIAL_UART8250
|
||||
select TIMER_MTIMER
|
||||
default y
|
||||
@@ -1,42 +0,0 @@
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Copyright (C) 2019 FORTH-ICS/CARV
|
||||
# Panagiotis Peristerakis <perister@ics.forth.gr>
|
||||
#
|
||||
|
||||
# Compiler flags
|
||||
platform-cppflags-y =
|
||||
platform-cflags-y =
|
||||
platform-asflags-y =
|
||||
platform-ldflags-y =
|
||||
|
||||
# Object to build
|
||||
platform-objs-y += platform.o
|
||||
|
||||
PLATFORM_RISCV_XLEN = 64
|
||||
|
||||
# Blobs to build
|
||||
FW_JUMP=n
|
||||
|
||||
ifeq ($(PLATFORM_RISCV_XLEN), 32)
|
||||
# This needs to be 4MB aligned for 32-bit support
|
||||
FW_JUMP_ADDR=0x80400000
|
||||
else
|
||||
# This needs to be 2MB aligned for 64-bit support
|
||||
FW_JUMP_ADDR=0x80200000
|
||||
endif
|
||||
FW_JUMP_FDT_ADDR=0x82200000
|
||||
|
||||
# Firmware with payload configuration.
|
||||
FW_PAYLOAD=y
|
||||
|
||||
ifeq ($(PLATFORM_RISCV_XLEN), 32)
|
||||
# This needs to be 4MB aligned for 32-bit support
|
||||
FW_PAYLOAD_OFFSET=0x400000
|
||||
else
|
||||
# This needs to be 2MB aligned for 64-bit support
|
||||
FW_PAYLOAD_OFFSET=0x200000
|
||||
endif
|
||||
FW_PAYLOAD_FDT_ADDR=0x82200000
|
||||
FW_PAYLOAD_ALIGN=0x1000
|
||||
@@ -47,6 +47,10 @@ config PLATFORM_OPENHWGROUP_OPENPITON
|
||||
bool "OpenHWGroup Openpiton support"
|
||||
default n
|
||||
|
||||
config PLATFORM_OPENHWGROUP_ARIANE
|
||||
bool "OpenHWGroup Ariane support"
|
||||
default n
|
||||
|
||||
config PLATFORM_RENESAS_RZFIVE
|
||||
bool "Renesas RZ/Five support"
|
||||
select ANDES_PMA
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
CONFIG_PLATFORM_ALLWINNER_D1=y
|
||||
CONFIG_PLATFORM_ANDES_AE350=y
|
||||
CONFIG_PLATFORM_ANDES_QILAI=y
|
||||
CONFIG_PLATFORM_OPENHWGROUP_ARIANE=y
|
||||
CONFIG_PLATFORM_OPENHWGROUP_OPENPITON=y
|
||||
CONFIG_PLATFORM_RENESAS_RZFIVE=y
|
||||
CONFIG_PLATFORM_SIFIVE_FU540=y
|
||||
|
||||
@@ -4,12 +4,7 @@
|
||||
* Panagiotis Peristerakis <perister@ics.forth.gr>
|
||||
*/
|
||||
|
||||
#include <sbi/riscv_asm.h>
|
||||
#include <sbi/riscv_encoding.h>
|
||||
#include <sbi/riscv_io.h>
|
||||
#include <sbi/sbi_const.h>
|
||||
#include <sbi/sbi_hart.h>
|
||||
#include <sbi/sbi_platform.h>
|
||||
#include <platform_override.h>
|
||||
#include <sbi_utils/fdt/fdt_helper.h>
|
||||
#include <sbi_utils/fdt/fdt_fixup.h>
|
||||
#include <sbi_utils/ipi/aclint_mswi.h>
|
||||
@@ -121,23 +116,22 @@ static int ariane_timer_init(void)
|
||||
return aclint_mtimer_cold_init(&mtimer, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Platform descriptor.
|
||||
*/
|
||||
const struct sbi_platform_operations platform_ops = {
|
||||
.early_init = ariane_early_init,
|
||||
.final_init = ariane_final_init,
|
||||
.irqchip_init = ariane_irqchip_init,
|
||||
.timer_init = ariane_timer_init,
|
||||
static int openhwgroup_ariane_platform_init(const void *fdt, int nodeoff, const struct fdt_match *match)
|
||||
{
|
||||
generic_platform_ops.early_init = ariane_early_init;
|
||||
generic_platform_ops.timer_init = ariane_timer_init;
|
||||
generic_platform_ops.irqchip_init = ariane_irqchip_init;
|
||||
generic_platform_ops.final_init = ariane_final_init;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct fdt_match openhwgroup_ariane_match[] = {
|
||||
{ .compatible = "eth,ariane-bare-dev" },
|
||||
{ },
|
||||
};
|
||||
|
||||
const struct sbi_platform platform = {
|
||||
.opensbi_version = OPENSBI_VERSION,
|
||||
.platform_version = SBI_PLATFORM_VERSION(0x0, 0x01),
|
||||
.name = "ARIANE RISC-V",
|
||||
.features = SBI_PLATFORM_DEFAULT_FEATURES,
|
||||
.hart_count = ARIANE_HART_COUNT,
|
||||
.hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE,
|
||||
.heap_size = SBI_PLATFORM_DEFAULT_HEAP_SIZE(ARIANE_HART_COUNT),
|
||||
.platform_ops_addr = (unsigned long)&platform_ops
|
||||
const struct fdt_driver openhwgroup_ariane = {
|
||||
.match_table = openhwgroup_ariane_match,
|
||||
.init = openhwgroup_ariane_platform_init,
|
||||
};
|
||||
@@ -6,3 +6,6 @@
|
||||
|
||||
carray-platform_override_modules-$(CONFIG_PLATFORM_OPENHWGROUP_OPENPITON) += openhwgroup_openpiton
|
||||
platform-objs-$(CONFIG_PLATFORM_OPENHWGROUP_OPENPITON) += openhwgroup/openpiton.o
|
||||
|
||||
carray-platform_override_modules-$(CONFIG_PLATFORM_OPENHWGROUP_ARIANE) += openhwgroup_ariane
|
||||
platform-objs-$(CONFIG_PLATFORM_OPENHWGROUP_ARIANE) += openhwgroup/ariane.o
|
||||
|
||||
Reference in New Issue
Block a user