mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
lib: utils/ipi: Use kconfig for enabling/disabling drivers
We update ipi drivers makefile to use kconfig for enabling/disabling drivers. To avoid compile errors, we also enable appropriate ipi drivers for each platform. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Tested-by: Andrew Jones <ajones@ventanamicro.com> Acked-by: Atish Patra <atishp@rivosinc.com> Tested-by: Atish Patra <atishp@rivosinc.com>
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
|
||||
#include <sbi/sbi_types.h>
|
||||
|
||||
#ifdef CONFIG_FDT_IPI
|
||||
|
||||
struct fdt_ipi {
|
||||
const struct fdt_match *match_table;
|
||||
int (*cold_init)(void *fdt, int nodeoff, const struct fdt_match *match);
|
||||
@@ -23,4 +25,11 @@ void fdt_ipi_exit(void);
|
||||
|
||||
int fdt_ipi_init(bool cold_boot);
|
||||
|
||||
#else
|
||||
|
||||
static inline void fdt_ipi_exit(void) { }
|
||||
static inline int fdt_ipi_init(bool cold_boot) { return 0; }
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -2,6 +2,8 @@
|
||||
|
||||
menu "Utils and Drivers Support"
|
||||
|
||||
source "$(OPENSBI_SRC_DIR)/lib/utils/ipi/Kconfig"
|
||||
|
||||
source "$(OPENSBI_SRC_DIR)/lib/utils/reset/Kconfig"
|
||||
|
||||
source "$(OPENSBI_SRC_DIR)/lib/utils/serial/Kconfig"
|
||||
|
22
lib/utils/ipi/Kconfig
Normal file
22
lib/utils/ipi/Kconfig
Normal file
@@ -0,0 +1,22 @@
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
menu "IPI Device Support"
|
||||
|
||||
config FDT_IPI
|
||||
bool "FDT based ipi drivers"
|
||||
default n
|
||||
|
||||
if FDT_IPI
|
||||
|
||||
config FDT_IPI_MSWI
|
||||
bool "ACLINT MSWI FDT driver"
|
||||
select IPI_MSWI
|
||||
default n
|
||||
|
||||
endif
|
||||
|
||||
config IPI_MSWI
|
||||
bool "ACLINT MSWI support"
|
||||
default n
|
||||
|
||||
endmenu
|
@@ -7,10 +7,10 @@
|
||||
# Anup Patel <anup.patel@wdc.com>
|
||||
#
|
||||
|
||||
libsbiutils-objs-y += ipi/aclint_mswi.o
|
||||
libsbiutils-objs-$(CONFIG_IPI_MSWI) += ipi/aclint_mswi.o
|
||||
|
||||
libsbiutils-objs-y += ipi/fdt_ipi.o
|
||||
libsbiutils-objs-y += ipi/fdt_ipi_drivers.o
|
||||
libsbiutils-objs-$(CONFIG_FDT_IPI) += ipi/fdt_ipi.o
|
||||
libsbiutils-objs-$(CONFIG_FDT_IPI) += ipi/fdt_ipi_drivers.o
|
||||
|
||||
carray-fdt_ipi_drivers-y += fdt_ipi_mswi
|
||||
libsbiutils-objs-y += ipi/fdt_ipi_mswi.o
|
||||
carray-fdt_ipi_drivers-$(CONFIG_FDT_IPI_MSWI) += fdt_ipi_mswi
|
||||
libsbiutils-objs-$(CONFIG_FDT_IPI_MSWI) += ipi/fdt_ipi_mswi.o
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
config PLATFORM_ARIANE_FPGA
|
||||
bool
|
||||
select IPI_MSWI
|
||||
select SERIAL_UART8250
|
||||
select TIMER_MTIMER
|
||||
default y
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
config PLATFORM_OPENPITON_FPGA
|
||||
bool
|
||||
select IPI_MSWI
|
||||
select SERIAL_UART8250
|
||||
select TIMER_MTIMER
|
||||
default y
|
||||
|
@@ -1,3 +1,5 @@
|
||||
CONFIG_FDT_IPI=y
|
||||
CONFIG_FDT_IPI_MSWI=y
|
||||
CONFIG_FDT_RESET=y
|
||||
CONFIG_FDT_RESET_GPIO=y
|
||||
CONFIG_FDT_RESET_HTIF=y
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
config PLATFORM_KENDRYTE_K210
|
||||
bool
|
||||
select IPI_MSWI
|
||||
select SERIAL_SIFIVE
|
||||
select TIMER_MTIMER
|
||||
default y
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
config PLATFORM_NUCLEI_UX600
|
||||
bool
|
||||
select IPI_MSWI
|
||||
select SERIAL_SIFIVE
|
||||
select TIMER_MTIMER
|
||||
default y
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#
|
||||
config PLATFORM_TEMPLATE
|
||||
bool
|
||||
select IPI_MSWI
|
||||
select SERIAL_UART8250
|
||||
select TIMER_MTIMER
|
||||
default y
|
||||
|
Reference in New Issue
Block a user