From 3bc79fdf2cfea8d7dc71f77b499bb2a8d0accf30 Mon Sep 17 00:00:00 2001 From: "Charles E. Youse" Date: Mon, 16 Sep 2019 13:50:56 -0400 Subject: [PATCH] arch/x86: refactor APIC timer configuration to SoC level The APIC is part of the SoC, not the board, so move the defaults down. Signed-off-by: Charles E. Youse --- boards/x86/gpmrb/gpmrb_defconfig | 2 +- boards/x86/up_squared/Kconfig.defconfig | 20 -------------------- soc/x86/apollo_lake/Kconfig.defconfig | 23 +++++++++++++++++++++-- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/boards/x86/gpmrb/gpmrb_defconfig b/boards/x86/gpmrb/gpmrb_defconfig index 02779d64403..a0ecca804f9 100644 --- a/boards/x86/gpmrb/gpmrb_defconfig +++ b/boards/x86/gpmrb/gpmrb_defconfig @@ -4,7 +4,7 @@ CONFIG_X86=y CONFIG_SOC_APOLLO_LAKE=y CONFIG_BOARD_GPMRB=y -CONFIG_HPET_TIMER=y +CONFIG_APIC_TIMER=y CONFIG_PIC_DISABLE=y CONFIG_LOAPIC=y CONFIG_CONSOLE=y diff --git a/boards/x86/up_squared/Kconfig.defconfig b/boards/x86/up_squared/Kconfig.defconfig index e091108e233..59e30d84bc9 100644 --- a/boards/x86/up_squared/Kconfig.defconfig +++ b/boards/x86/up_squared/Kconfig.defconfig @@ -31,24 +31,4 @@ endif # I2C config APIC_TIMER default y if !HPET_TIMER -if APIC_TIMER - -config APIC_TIMER_IRQ - default 24 - -config APIC_TIMER_TSC - default y - -if APIC_TIMER_TSC - -config APIC_TIMER_TSC_M - default 3 - -config APIC_TIMER_TSC_N - default 249 - -endif # APIC_TIMER_TSC - -endif # APIC_TIMER - endif # BOARD_UP_SQUARED diff --git a/soc/x86/apollo_lake/Kconfig.defconfig b/soc/x86/apollo_lake/Kconfig.defconfig index 9142daa3216..97d8be312ac 100644 --- a/soc/x86/apollo_lake/Kconfig.defconfig +++ b/soc/x86/apollo_lake/Kconfig.defconfig @@ -13,8 +13,27 @@ config SOC default "apollo_lake" config SYS_CLOCK_HW_CYCLES_PER_SEC - default 150000000 if LOAPIC_TIMER - default 25000000 if HPET_TIMER + default 19200000 + +if APIC_TIMER + +config APIC_TIMER_IRQ + default 24 + +config APIC_TIMER_TSC + default y + +if APIC_TIMER_TSC + +config APIC_TIMER_TSC_M + default 3 + +config APIC_TIMER_TSC_N + default 249 + +endif # APIC_TIMER_TSC + +endif # APIC_TIMER config CLFLUSH_DETECT default y if CACHE_FLUSHING