From 09d2770377e588282920044434d551f8f7475429 Mon Sep 17 00:00:00 2001 From: Dirk Brandewie Date: Fri, 5 Jun 2015 10:48:18 -0700 Subject: [PATCH] x86/bsp: move io apic driver to drivers/interrupt_controller Change-Id: I00f400e0405f526dd17cf22c703fab4a4968fce0 Signed-off-by: Dirk Brandewie --- arch/x86/Kconfig | 2 - arch/x86/Makefile | 1 - arch/x86/interrupt_controller/Kconfig | 42 ------------------- arch/x86/interrupt_controller/Makefile | 5 --- drivers/Kconfig | 5 +-- drivers/interrupt_controller/Kconfig | 8 ++++ drivers/interrupt_controller/Makefile | 1 + .../interrupt_controller/ioapic_intr.c | 0 8 files changed, 11 insertions(+), 53 deletions(-) delete mode 100644 arch/x86/interrupt_controller/Kconfig delete mode 100644 arch/x86/interrupt_controller/Makefile rename arch/x86/interrupt_controller/ioApicIntr.c => drivers/interrupt_controller/ioapic_intr.c (100%) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 7430d313152..fba4c996856 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -161,8 +161,6 @@ endif source "arch/x86/timer/Kconfig" -source "arch/x86/interrupt_controller/Kconfig" - source "drivers/Kconfig" source "net/Kconfig" diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 438a0050ca2..6d8a8934db6 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -1,7 +1,6 @@ obj-y = core/ obj-y += bsp/ obj-y += timer/ -obj-y += interrupt_controller/ obj-$(CONFIG_MICROKERNEL) += task/ obj-$(CONFIG_BSP_QUARK) += quark/ diff --git a/arch/x86/interrupt_controller/Kconfig b/arch/x86/interrupt_controller/Kconfig deleted file mode 100644 index fc7d33fbe38..00000000000 --- a/arch/x86/interrupt_controller/Kconfig +++ /dev/null @@ -1,42 +0,0 @@ -# Kconfig - x86 interrupt controller 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 "Interrupt Controller Configuration" - -config IOAPIC - bool "IOAPIC" - default n - help - This option signifies that the target has an IO-APIC device. This - capability allows IO-APIC-dependent code to be included. - -endmenu diff --git a/arch/x86/interrupt_controller/Makefile b/arch/x86/interrupt_controller/Makefile deleted file mode 100644 index fb59e88d23e..00000000000 --- a/arch/x86/interrupt_controller/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -ccflags-y +=-I$(srctree)/include/drivers -ccflags-y +=-I$(srctree)/arch/x86 -ccflags-y +=-I$(srctree)/arch/$(ARCH)/$(strip $(CONFIG_BSP_DIR)) - -obj-$(CONFIG_IOAPIC) += ioApicIntr.o diff --git a/drivers/Kconfig b/drivers/Kconfig index 820b411185a..2e523768bea 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -33,17 +33,16 @@ menu "Device Drivers" - source "drivers/simple/Kconfig" -source "drivers/interrupt_controller/Kconfig" - source "drivers/bluetooth/Kconfig" source "drivers/console/Kconfig" source "drivers/serial/Kconfig" +source "drivers/interrupt_controller/Kconfig" + source "drivers/timer/Kconfig" source "drivers/random/Kconfig" diff --git a/drivers/interrupt_controller/Kconfig b/drivers/interrupt_controller/Kconfig index 1ea0f3b596b..1fa0970ff21 100644 --- a/drivers/interrupt_controller/Kconfig +++ b/drivers/interrupt_controller/Kconfig @@ -45,4 +45,12 @@ config LOAPIC help This option selects local APIC as the interrupt controller. +config IOAPIC + bool "IOAPIC" + default n + depends on X86_32 + help + This option signifies that the target has an IO-APIC device. This + capability allows IO-APIC-dependent code to be included. + endmenu diff --git a/drivers/interrupt_controller/Makefile b/drivers/interrupt_controller/Makefile index d3e40004c6f..2075447a5bd 100644 --- a/drivers/interrupt_controller/Makefile +++ b/drivers/interrupt_controller/Makefile @@ -9,4 +9,5 @@ obj-$(CONFIG_PIC) += i8259_boi.o obj-$(CONFIG_PIC) += system_pic.o obj-$(CONFIG_LOAPIC) += system_apic.o obj-$(CONFIG_LOAPIC) += loapic_intr.o +obj-$(CONFIG_IOAPIC) += ioapic_intr.o diff --git a/arch/x86/interrupt_controller/ioApicIntr.c b/drivers/interrupt_controller/ioapic_intr.c similarity index 100% rename from arch/x86/interrupt_controller/ioApicIntr.c rename to drivers/interrupt_controller/ioapic_intr.c