From 11edf422b49ca75358ece29946b73b17081ee6d0 Mon Sep 17 00:00:00 2001 From: Dirk Brandewie Date: Mon, 8 Jun 2015 07:54:45 -0700 Subject: [PATCH] x86/bsp: move local apic timer driver to drivers/timer Change-Id: I74f7297d21f3acf4a457ca335162602b35f4f6c1 Signed-off-by: Dirk Brandewie --- arch/x86/Kconfig | 2 - arch/x86/Makefile | 1 - arch/x86/timer/Kconfig | 49 ------------------- arch/x86/timer/Makefile | 5 -- drivers/timer/Kconfig | 14 ++++++ drivers/timer/Makefile | 1 + .../timer/loapic_timer.c | 0 7 files changed, 15 insertions(+), 57 deletions(-) delete mode 100644 arch/x86/timer/Kconfig delete mode 100644 arch/x86/timer/Makefile rename arch/x86/timer/loApicTimer.c => drivers/timer/loapic_timer.c (100%) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index fba4c996856..a8cf05d676a 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -159,8 +159,6 @@ if BSP_QUARK source "arch/x86/quark/Kconfig" endif -source "arch/x86/timer/Kconfig" - source "drivers/Kconfig" source "net/Kconfig" diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 6d8a8934db6..f5b30bb2fc6 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -1,6 +1,5 @@ obj-y = core/ obj-y += bsp/ -obj-y += timer/ obj-$(CONFIG_MICROKERNEL) += task/ obj-$(CONFIG_BSP_QUARK) += quark/ diff --git a/arch/x86/timer/Kconfig b/arch/x86/timer/Kconfig deleted file mode 100644 index 54ba586d2da..00000000000 --- a/arch/x86/timer/Kconfig +++ /dev/null @@ -1,49 +0,0 @@ -# Kconfig - x86 timer configuration options - -# -# Copyright (c) 2014-2015 Wind River Systems, Inc. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# 3) Neither the name of Wind River Systems nor the names of its contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -menu "Timer Configuration" - -config LOAPIC_TIMER - bool "LOAPIC timer" - depends on LOAPIC && BSP_GENERIC_PC - default n - help - This option selects LOAPIC timer as a system timer. - -config LOAPIC_TIMER_FREQ - int "LOAPIC timer frequency" - depends on LOAPIC_TIMER - default 0 - help - This option specifies LOAPIC timer frequency in HZ. - -endmenu diff --git a/arch/x86/timer/Makefile b/arch/x86/timer/Makefile deleted file mode 100644 index b73da1e5f8b..00000000000 --- a/arch/x86/timer/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -ccflags-y +=-I$(srctree)/include/drivers -ccflags-y +=-I$(srctree)/arch/$(ARCH)/$(strip $(CONFIG_BSP_DIR)) -ccflags-y +=-I$(srctree)/arch/x86 - -obj-$(CONFIG_LOAPIC_TIMER) += loApicTimer.o diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig index b293b6e7d1c..1fc5ec3ae9e 100644 --- a/drivers/timer/Kconfig +++ b/drivers/timer/Kconfig @@ -41,6 +41,20 @@ config HPET_TIMER This option selects High Precision Event Timer (HPET) as a system timer. +config LOAPIC_TIMER + bool "LOAPIC timer" + depends on LOAPIC && X86_32 + default n + help + This option selects LOAPIC timer as a system timer. + +config LOAPIC_TIMER_FREQ + int "LOAPIC timer frequency" + depends on LOAPIC_TIMER && X86_32 + default 0 + help + This option specifies LOAPIC timer frequency in HZ. + config PIT bool "PIT (i8253)" default n diff --git a/drivers/timer/Makefile b/drivers/timer/Makefile index c2a99d488be..fd65531a9d7 100644 --- a/drivers/timer/Makefile +++ b/drivers/timer/Makefile @@ -3,3 +3,4 @@ ccflags-y +=-I$(srctree)/arch/$(ARCH)/$(subst $(DQUOTE),,$(CONFIG_BSP_DIR)) obj-$(CONFIG_PIT) = i8253.o obj-$(CONFIG_HPET_TIMER) += hpet.o +obj-$(CONFIG_LOAPIC_TIMER) += loapic_timer.o diff --git a/arch/x86/timer/loApicTimer.c b/drivers/timer/loapic_timer.c similarity index 100% rename from arch/x86/timer/loApicTimer.c rename to drivers/timer/loapic_timer.c