forked from Mirrors/opensbi
lib: utils/timer: Use kconfig for enabling/disabling drivers
We update timer drivers makefile to use kconfig for enabling/disabling drivers. To avoid compile errors, we also enable appropriate timer 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:
22
lib/utils/timer/Kconfig
Normal file
22
lib/utils/timer/Kconfig
Normal file
@@ -0,0 +1,22 @@
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
menu "Timer Device Support"
|
||||
|
||||
config FDT_TIMER
|
||||
bool "FDT based timer drivers"
|
||||
default n
|
||||
|
||||
if FDT_TIMER
|
||||
|
||||
config FDT_TIMER_MTIMER
|
||||
bool "ACLINT MTIMER FDT driver"
|
||||
select TIMER_MTIMER
|
||||
default n
|
||||
|
||||
endif
|
||||
|
||||
config TIMER_MTIMER
|
||||
bool "ACLINT MTIMER support"
|
||||
default n
|
||||
|
||||
endmenu
|
@@ -7,10 +7,10 @@
|
||||
# Anup Patel <anup.patel@wdc.com>
|
||||
#
|
||||
|
||||
libsbiutils-objs-y += timer/aclint_mtimer.o
|
||||
libsbiutils-objs-$(CONFIG_TIMER_MTIMER) += timer/aclint_mtimer.o
|
||||
|
||||
libsbiutils-objs-y += timer/fdt_timer.o
|
||||
libsbiutils-objs-y += timer/fdt_timer_drivers.o
|
||||
libsbiutils-objs-$(CONFIG_FDT_TIMER) += timer/fdt_timer.o
|
||||
libsbiutils-objs-$(CONFIG_FDT_TIMER) += timer/fdt_timer_drivers.o
|
||||
|
||||
carray-fdt_timer_drivers-y += fdt_timer_mtimer
|
||||
libsbiutils-objs-y += timer/fdt_timer_mtimer.o
|
||||
carray-fdt_timer_drivers-$(CONFIG_FDT_TIMER_MTIMER) += fdt_timer_mtimer
|
||||
libsbiutils-objs-$(CONFIG_FDT_TIMER_MTIMER) += timer/fdt_timer_mtimer.o
|
||||
|
Reference in New Issue
Block a user