From patchwork Wed Aug 26 11:53:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 32141 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id AD5C8B70B3 for ; Wed, 26 Aug 2009 22:11:06 +1000 (EST) Received: from localhost ([127.0.0.1]:48305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgHL9-0006IL-4f for incoming@patchwork.ozlabs.org; Wed, 26 Aug 2009 08:10:59 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgH4x-00027a-U5 for qemu-devel@nongnu.org; Wed, 26 Aug 2009 07:54:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgH4s-00022y-RZ for qemu-devel@nongnu.org; Wed, 26 Aug 2009 07:54:15 -0400 Received: from [199.232.76.173] (port=52140 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgH4s-00022q-O3 for qemu-devel@nongnu.org; Wed, 26 Aug 2009 07:54:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25199) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MgH4r-00056k-QW for qemu-devel@nongnu.org; Wed, 26 Aug 2009 07:54:10 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7QBs84h001779 for ; Wed, 26 Aug 2009 07:54:09 -0400 Received: from zweiblum.home.kraxel.org (vpn1-4-183.ams2.redhat.com [10.36.4.183]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id n7QBrqaV010057; Wed, 26 Aug 2009 07:53:57 -0400 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id 5E69C700E3; Wed, 26 Aug 2009 13:53:41 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 26 Aug 2009 13:53:38 +0200 Message-Id: <1251287619-20022-11-git-send-email-kraxel@redhat.com> In-Reply-To: <1251287619-20022-1-git-send-email-kraxel@redhat.com> References: <1251287619-20022-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 10/11] ide: move code to hw/ide/ X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Gerd Hoffmann --- Makefile.target | 12 ++++++------ configure | 1 + hw/{ide.c => ide/core.c} | 12 ++++++------ hw/{ide-internal.h => ide/internal.h} | 4 ++-- hw/{ide-isa.c => ide/isa.c} | 7 ++++--- hw/{ide-macio.c => ide/macio.c} | 9 +++++---- hw/{ide-microdrive.c => ide/microdrive.c} | 9 +++++---- hw/{ide-mmio.c => ide/mmio.c} | 5 +++-- hw/{ide-pci.c => ide/pci.c} | 9 +++++---- 9 files changed, 37 insertions(+), 31 deletions(-) rename hw/{ide.c => ide/core.c} (99%) rename hw/{ide-internal.h => ide/internal.h} (99%) rename hw/{ide-isa.c => ide/isa.c} (97%) rename hw/{ide-macio.c => ide/macio.c} (98%) rename hw/{ide-microdrive.c => ide/microdrive.c} (99%) rename hw/{ide-mmio.c => ide/mmio.c} (98%) rename hw/{ide-pci.c => ide/pci.c} (99%) diff --git a/Makefile.target b/Makefile.target index bfaa256..1a21cb6 100644 --- a/Makefile.target +++ b/Makefile.target @@ -187,14 +187,14 @@ obj-y += e1000.o obj-y += wdt_ib700.o wdt_i6300esb.o # Hardware support -obj-i386-y = ide.o ide-isa.o ide-pci.o pckbd.o vga.o $(sound-obj-y) dma.o isa-bus.o +obj-i386-y = ide/core.o ide/isa.o ide/pci.o pckbd.o vga.o $(sound-obj-y) dma.o isa-bus.o obj-i386-y += fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o obj-i386-y += cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o obj-i386-y += usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o # shared objects -obj-ppc-y = ppc.o ide.o ide-isa.o ide-pci.o ide-macio.o +obj-ppc-y = ppc.o ide/core.o ide/isa.o ide/pci.o ide/macio.o obj-ppc-y += vga.o $(sound-obj-y) dma.o isa-bus.o openpic.o # PREP target obj-ppc-y += pckbd.o serial.o i8259.o i8254.o fdc.o mc146818rtc.o @@ -216,7 +216,7 @@ obj-ppc-$(CONFIG_FDT) += device_tree.o obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o obj-mips-y += mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o obj-mips-y += g364fb.o jazz_led.o dp8393x.o -obj-mips-y += ide.o ide-isa.o ide-pci.o +obj-mips-y += ide/core.o ide/isa.o ide/pci.o obj-mips-y += gt64xxx.o pckbd.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o obj-mips-y += piix_pci.o parallel.o cirrus_vga.o isa-bus.o pcspk.o $(sound-obj-y) obj-mips-y += mipsnet.o @@ -248,7 +248,7 @@ obj-cris-y += etraxfs_ser.o obj-cris-y += pflash_cfi02.o ifeq ($(TARGET_ARCH), sparc64) -obj-sparc-y = sun4u.o ide.o ide-pci.o isa-bus.o pckbd.o vga.o apb_pci.o +obj-sparc-y = sun4u.o ide/core.o ide/pci.o isa-bus.o pckbd.o vga.o apb_pci.o obj-sparc-y += fdc.o mc146818rtc.o serial.o obj-sparc-y += cirrus_vga.o parallel.o else @@ -267,7 +267,7 @@ obj-arm-y += arm-semi.o obj-arm-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o obj-arm-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o obj-arm-y += pflash_cfi01.o gumstix.o -obj-arm-y += zaurus.o ide.o ide-microdrive.o serial.o spitz.o tosa.o tc6393xb.o +obj-arm-y += zaurus.o ide/core.o ide/microdrive.o serial.o spitz.o tosa.o tc6393xb.o obj-arm-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o obj-arm-y += omap2.o omap_dss.o soc_dma.o obj-arm-y += omap_sx1.o palm.o tsc210x.o @@ -281,7 +281,7 @@ obj-arm-y += syborg_virtio.o obj-sh4-y = shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o obj-sh4-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o -obj-sh4-y += ide.o ide-mmio.o +obj-sh4-y += ide/core.o ide/mmio.o obj-m68k-y = an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o obj-m68k-y += m68k-semi.o dummy_m68k.o diff --git a/configure b/configure index 5c1065f..8d97c7a 100755 --- a/configure +++ b/configure @@ -1834,6 +1834,7 @@ test -f $config_h && mv $config_h ${config_h}~ mkdir -p $target_dir mkdir -p $target_dir/fpu mkdir -p $target_dir/tcg +mkdir -p $target_dir/ide if test "$target" = "arm-linux-user" -o "$target" = "armeb-linux-user" -o "$target" = "arm-bsd-user" -o "$target" = "armeb-bsd-user" ; then mkdir -p $target_dir/nwfpe fi diff --git a/hw/ide.c b/hw/ide/core.c similarity index 99% rename from hw/ide.c rename to hw/ide/core.c index d8e9613..79a3a9c 100644 --- a/hw/ide.c +++ b/hw/ide/core.c @@ -22,18 +22,18 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include "hw.h" -#include "pc.h" -#include "pci.h" -#include "scsi-disk.h" +#include +#include +#include +#include +#include #include "block.h" #include "block_int.h" #include "qemu-timer.h" #include "sysemu.h" -#include "sh.h" #include "dma.h" -#include "ide-internal.h" +#include static int smart_attributes[][5] = { /* id, flags, val, wrst, thrsh */ diff --git a/hw/ide-internal.h b/hw/ide/internal.h similarity index 99% rename from hw/ide-internal.h rename to hw/ide/internal.h index bb65861..3ec8129 100644 --- a/hw/ide-internal.h +++ b/hw/ide/internal.h @@ -3,10 +3,10 @@ /* * QEMU IDE Emulation -- internal header file - * only hw/ide*.c is supposed to include this file. + * only files in hw/ide/ are supposed to include this file. * non-internal declarations are in hw/ide.h */ -#include "ide.h" +#include /* debug IDE devices */ //#define DEBUG_IDE diff --git a/hw/ide-isa.c b/hw/ide/isa.c similarity index 97% rename from hw/ide-isa.c rename to hw/ide/isa.c index 279474b..aa026c7 100644 --- a/hw/ide-isa.c +++ b/hw/ide/isa.c @@ -22,13 +22,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include "hw.h" -#include "pc.h" +#include +#include #include "block.h" #include "block_int.h" #include "sysemu.h" #include "dma.h" -#include "ide-internal.h" + +#include /***********************************************************/ /* ISA IDE definitions */ diff --git a/hw/ide-macio.c b/hw/ide/macio.c similarity index 98% rename from hw/ide-macio.c rename to hw/ide/macio.c index cf66b3a..820cc77 100644 --- a/hw/ide-macio.c +++ b/hw/ide/macio.c @@ -22,14 +22,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include "hw.h" +#include +#include +#include #include "block.h" #include "block_int.h" #include "sysemu.h" #include "dma.h" -#include "ppc_mac.h" -#include "mac_dbdma.h" -#include "ide-internal.h" + +#include /***********************************************************/ /* MacIO based PowerPC IDE */ diff --git a/hw/ide-microdrive.c b/hw/ide/microdrive.c similarity index 99% rename from hw/ide-microdrive.c rename to hw/ide/microdrive.c index f055425..a735452 100644 --- a/hw/ide-microdrive.c +++ b/hw/ide/microdrive.c @@ -22,14 +22,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include "hw.h" -#include "pc.h" +#include +#include +#include #include "block.h" #include "block_int.h" #include "sysemu.h" #include "dma.h" -#include "ide-internal.h" -#include "pcmcia.h" + +#include /***********************************************************/ /* CF-ATA Microdrive */ diff --git a/hw/ide-mmio.c b/hw/ide/mmio.c similarity index 98% rename from hw/ide-mmio.c rename to hw/ide/mmio.c index ba43630..99ddf9d 100644 --- a/hw/ide-mmio.c +++ b/hw/ide/mmio.c @@ -22,12 +22,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include "hw.h" +#include #include "block.h" #include "block_int.h" #include "sysemu.h" #include "dma.h" -#include "ide-internal.h" + +#include /***********************************************************/ /* MMIO based ide port diff --git a/hw/ide-pci.c b/hw/ide/pci.c similarity index 99% rename from hw/ide-pci.c rename to hw/ide/pci.c index 04c234f..433faaf 100644 --- a/hw/ide-pci.c +++ b/hw/ide/pci.c @@ -22,14 +22,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include "hw.h" -#include "pc.h" +#include +#include +#include #include "block.h" #include "block_int.h" #include "sysemu.h" #include "dma.h" -#include "pci.h" -#include "ide-internal.h" + +#include /***********************************************************/ /* PCI IDE definitions */