drivers/timer: auto select the related option in Kconfig
to avoid the user make the wrong combination in defconfig Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
d7aec84dbe
commit
8e8f41faeb
@ -67,6 +67,7 @@ config TIMER_ARCH
|
|||||||
bool "Timer Arch Implementation"
|
bool "Timer Arch Implementation"
|
||||||
select ARCH_HAVE_TICKLESS
|
select ARCH_HAVE_TICKLESS
|
||||||
select ARCH_HAVE_TIMEKEEPING
|
select ARCH_HAVE_TIMEKEEPING
|
||||||
|
select SCHED_TICKLESS_LIMIT_MAX_SLEEP if SCHED_TICKLESS
|
||||||
---help---
|
---help---
|
||||||
Implement timer arch API on top of timer driver interface.
|
Implement timer arch API on top of timer driver interface.
|
||||||
|
|
||||||
@ -86,6 +87,8 @@ config ALARM_ARCH
|
|||||||
bool "Alarm Arch Implementation"
|
bool "Alarm Arch Implementation"
|
||||||
select ARCH_HAVE_TICKLESS
|
select ARCH_HAVE_TICKLESS
|
||||||
select ARCH_HAVE_TIMEKEEPING
|
select ARCH_HAVE_TIMEKEEPING
|
||||||
|
select SCHED_TICKLESS_ALARM if SCHED_TICKLESS
|
||||||
|
select SCHED_TICKLESS_LIMIT_MAX_SLEEP if SCHED_TICKLESS
|
||||||
---help---
|
---help---
|
||||||
Implement alarm arch API on top of oneshot driver interface.
|
Implement alarm arch API on top of oneshot driver interface.
|
||||||
|
|
||||||
|
@ -32,18 +32,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_TICKLESS
|
|
||||||
|
|
||||||
# ifndef CONFIG_SCHED_TICKLESS_ALARM
|
|
||||||
# error CONFIG_SCHED_TICKLESS_ALARM must be set to use CONFIG_SCHED_TICKLESS
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifndef CONFIG_SCHED_TICKLESS_LIMIT_MAX_SLEEP
|
|
||||||
# error CONFIG_SCHED_TICKLESS_LIMIT_MAX_SLEEP must be set to use CONFIG_SCHED_TICKLESS
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define CONFIG_BOARD_LOOPSPER100USEC ((CONFIG_BOARD_LOOPSPERMSEC+5)/10)
|
#define CONFIG_BOARD_LOOPSPER100USEC ((CONFIG_BOARD_LOOPSPERMSEC+5)/10)
|
||||||
#define CONFIG_BOARD_LOOPSPER10USEC ((CONFIG_BOARD_LOOPSPERMSEC+50)/100)
|
#define CONFIG_BOARD_LOOPSPER10USEC ((CONFIG_BOARD_LOOPSPERMSEC+50)/100)
|
||||||
#define CONFIG_BOARD_LOOPSPERUSEC ((CONFIG_BOARD_LOOPSPERMSEC+500)/1000)
|
#define CONFIG_BOARD_LOOPSPERUSEC ((CONFIG_BOARD_LOOPSPERMSEC+500)/1000)
|
||||||
|
@ -32,16 +32,8 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_TICKLESS
|
#if defined(CONFIG_SCHED_TICKLESS) && defined(CONFIG_SCHED_TICKLESS_ALARM)
|
||||||
|
# error CONFIG_SCHED_TICKLESS_ALARM must be unset to use the arch timer
|
||||||
# ifdef CONFIG_SCHED_TICKLESS_ALARM
|
|
||||||
# error CONFIG_SCHED_TICKLESS_ALARM must be unset to use CONFIG_SCHED_TICKLESS
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifndef CONFIG_SCHED_TICKLESS_LIMIT_MAX_SLEEP
|
|
||||||
# error CONFIG_SCHED_TICKLESS_LIMIT_MAX_SLEEP must be set to use CONFIG_SCHED_TICKLESS
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CONFIG_BOARD_LOOPSPER100USEC ((CONFIG_BOARD_LOOPSPERMSEC+5)/10)
|
#define CONFIG_BOARD_LOOPSPER100USEC ((CONFIG_BOARD_LOOPSPERMSEC+5)/10)
|
||||||
|
Loading…
Reference in New Issue
Block a user