Add kernel configuration option to enable/disable HR Timer
High resolution timer can now be excluded from the build. There is currently no HR Timer implementation for other platform than HiSi. Note: HR Timer will be enabled by default Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com> Change-Id: I5daf8e0ceec2a17025b579513e3bd74db1040916
This commit is contained in:
parent
07c89a8473
commit
51263d8796
|
@ -33,6 +33,10 @@ MODULE_NAME := $(notdir $(shell pwd))
|
||||||
|
|
||||||
LOCAL_SRCS := $(wildcard src/*.c)
|
LOCAL_SRCS := $(wildcard src/*.c)
|
||||||
|
|
||||||
|
ifneq ($(LOSCFG_HRTIMER_ENABLE), y)
|
||||||
|
LOCAL_SRCS := $(filter-out src/linux_hrtimer.c, $(LOCAL_SRCS))
|
||||||
|
endif
|
||||||
|
|
||||||
LOCAL_INCLUDE := \
|
LOCAL_INCLUDE := \
|
||||||
-I $(LITEOSTOPDIR)/kernel/base/include \
|
-I $(LITEOSTOPDIR)/kernel/base/include \
|
||||||
-I $(LITEOSTOPDIR)/bsd/compat/linuxkpi/include
|
-I $(LITEOSTOPDIR)/bsd/compat/linuxkpi/include
|
||||||
|
|
|
@ -56,3 +56,10 @@ config PLATFORM_BSP_GIC_V3
|
||||||
General Interrupt Controller version 3.
|
General Interrupt Controller version 3.
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
config HRTIMER_ENABLE
|
||||||
|
bool "HR TIMER enable"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Enable High-resolution timer support
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,13 @@ MODULE_NAME := bsp
|
||||||
|
|
||||||
LOCAL_SRCS = $(wildcard $(HWI_SRC)/*.c) \
|
LOCAL_SRCS = $(wildcard $(HWI_SRC)/*.c) \
|
||||||
$(wildcard $(TIMER_SRC)/*.c) \
|
$(wildcard $(TIMER_SRC)/*.c) \
|
||||||
$(wildcard $(HRTIMER_SRC)/*.c) \
|
|
||||||
$(wildcard $(UART_SRC)/*.c) \
|
$(wildcard $(UART_SRC)/*.c) \
|
||||||
$(wildcard ./main.c)
|
$(wildcard ./main.c)
|
||||||
|
|
||||||
|
ifeq ($(LOSCFG_HRTIMER_ENABLE), y)
|
||||||
|
LOCAL_SRCS += $(wildcard $(HRTIMER_SRC)/*.c)
|
||||||
|
endif
|
||||||
|
|
||||||
LOCAL_INCLUDE += -I $(LITEOSTOPDIR)/compat/posix/src \
|
LOCAL_INCLUDE += -I $(LITEOSTOPDIR)/compat/posix/src \
|
||||||
-I $(LITEOSTOPDIR)/bsd/dev/random
|
-I $(LITEOSTOPDIR)/bsd/dev/random
|
||||||
|
|
||||||
|
|
|
@ -64,9 +64,11 @@ else ifeq ($(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7), y)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(LOSCFG_HRTIMER_ENABLE), y)
|
||||||
|
HRTIMER_SRC := hw/$(HRTIMER_TYPE)
|
||||||
|
endif
|
||||||
HWI_SRC := hw/$(HWI_TYPE)
|
HWI_SRC := hw/$(HWI_TYPE)
|
||||||
TIMER_SRC := hw/$(TIMER_TYPE)
|
TIMER_SRC := hw/$(TIMER_TYPE)
|
||||||
HRTIMER_SRC := hw/$(HRTIMER_TYPE)
|
|
||||||
NET_SRC := net/$(NET_TYPE)
|
NET_SRC := net/$(NET_TYPE)
|
||||||
UART_SRC := uart/$(UART_TYPE)
|
UART_SRC := uart/$(UART_TYPE)
|
||||||
USB_SRC := usb/$(USB_TYPE)
|
USB_SRC := usb/$(USB_TYPE)
|
||||||
|
|
Loading…
Reference in New Issue