Patchwork [12/18] hw: move boards and other isolated files to hw/ARCH

login
register
mail settings
Submitter Paolo Bonzini
Date March 5, 2013, 5:17 p.m.
Message ID <1362503865-27292-13-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/225105/
State New
Headers show

Comments

Paolo Bonzini - March 5, 2013, 5:17 p.m.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/Makefile.objs                                  |  1 -
 hw/alpha/Makefile.objs                            |  4 ++-
 hw/{alpha_dp264.c => alpha/dp264.c}               |  0
 hw/{alpha_pci.c => alpha/pci.c}                   |  0
 hw/arm/Makefile.objs                              | 31 ++++++++++-------------
 hw/{arm_boot.c => arm/boot.c}                     |  0
 hw/{ => arm}/collie.c                             |  0
 hw/{ => arm}/exynos4_boards.c                     |  0
 hw/{ => arm}/gumstix.c                            |  0
 hw/{ => arm}/highbank.c                           |  0
 hw/{ => arm}/integratorcp.c                       |  0
 hw/{ => arm}/kzm.c                                |  0
 hw/{ => arm}/mainstone.c                          |  0
 hw/{ => arm}/musicpal.c                           |  0
 hw/{ => arm}/nseries.c                            |  0
 hw/{ => arm}/omap_sx1.c                           |  0
 hw/{ => arm}/palm.c                               |  0
 hw/{arm_pic.c => arm/pic_cpu.c}                   |  0
 hw/{ => arm}/realview.c                           |  0
 hw/{ => arm}/spitz.c                              |  0
 hw/{ => arm}/stellaris.c                          |  0
 hw/{ => arm}/tosa.c                               |  0
 hw/{ => arm}/versatilepb.c                        |  0
 hw/{ => arm}/vexpress.c                           |  0
 hw/{ => arm}/xilinx_zynq.c                        |  0
 hw/{ => arm}/z2.c                                 |  0
 hw/cris/Makefile.objs                             | 10 ++++----
 hw/{ => cris}/axis_dev88.c                        |  0
 hw/{cris-boot.c => cris/boot.c}                   |  0
 hw/{cris_pic_cpu.c => cris/pic_cpu.c}             |  0
 hw/i386/Makefile.objs                             | 13 ++++++----
 hw/{ => i386}/multiboot.c                         |  0
 hw/{ => i386}/pc.c                                |  0
 hw/{ => i386}/pc_piix.c                           |  0
 hw/{ => i386}/pc_q35.c                            |  0
 hw/{ => i386}/smbios.c                            |  0
 hw/{ => i386}/xen_domainbuild.c                   |  0
 hw/{ => i386}/xen_machine_pv.c                    |  0
 hw/lm32/Makefile.objs                             |  8 +++---
 hw/{ => lm32}/lm32_boards.c                       |  0
 hw/{ => lm32}/milkymist.c                         |  0
 hw/m68k/Makefile.objs                             |  7 +++--
 hw/{ => m68k}/an5206.c                            |  0
 hw/{ => m68k}/dummy_m68k.c                        |  0
 hw/{ => m68k}/mcf5208.c                           |  0
 hw/microblaze/Makefile.objs                       | 10 ++++----
 hw/{microblaze_boot.c => microblaze/boot.c}       |  0
 hw/{ => microblaze}/petalogix_ml605_mmu.c         |  0
 hw/{ => microblaze}/petalogix_s3adsp1800_mmu.c    |  0
 hw/{microblaze_pic_cpu.c => microblaze/pic_cpu.c} |  0
 hw/mips/Makefile.objs                             |  8 +++---
 hw/{mips_addr.c => mips/addr.c}                   |  0
 hw/{mips_timer.c => mips/cputimer.c}              |  0
 hw/{ => mips}/mips_fulong2e.c                     |  0
 hw/{ => mips}/mips_int.c                          |  0
 hw/{ => mips}/mips_jazz.c                         |  0
 hw/{ => mips}/mips_malta.c                        |  0
 hw/{ => mips}/mips_mipssim.c                      |  0
 hw/{ => mips}/mips_r4k.c                          |  0
 hw/openrisc/Makefile.objs                         |  5 ++--
 hw/{openrisc_timer.c => openrisc/cputimer.c}      |  0
 hw/{ => openrisc}/openrisc_sim.c                  |  0
 hw/{openrisc_pic.c => openrisc/pic_cpu.c}         |  0
 hw/ppc/Makefile.objs                              | 17 ++++++++-----
 hw/{ => ppc}/ppc.c                                |  0
 hw/{ => ppc}/ppc405_boards.c                      |  0
 hw/{ => ppc}/ppc405_uc.c                          |  0
 hw/{ => ppc}/ppc440_bamboo.c                      |  0
 hw/{ => ppc}/ppc_booke.c                          |  0
 hw/{ => ppc}/spapr.c                              |  0
 hw/{ => ppc}/virtex_ml507.c                       |  0
 hw/sh4/Makefile.objs                              |  4 ++-
 hw/{ => sh4}/r2d.c                                |  0
 hw/{ => sh4}/shix.c                               |  0
 hw/sparc/Makefile.objs                            |  6 +++--
 hw/{ => sparc}/leon3.c                            |  0
 hw/{ => sparc}/sun4m.c                            |  0
 hw/sparc64/Makefile.objs                          |  4 ++-
 hw/{ => sparc64}/sun4u.c                          |  0
 hw/unicore32/Makefile.objs                        |  2 --
 hw/{ => unicore32}/puv3.c                         |  0
 hw/xtensa/Makefile.objs                           |  4 +--
 hw/{xtensa_pic.c => xtensa/pic_cpu.c}             |  0
 hw/{ => xtensa}/xtensa_lx60.c                     |  0
 hw/{ => xtensa}/xtensa_sim.c                      |  0
 85 files changed, 72 insertions(+), 62 deletions(-)
 rename hw/{alpha_dp264.c => alpha/dp264.c} (100%)
 rename hw/{alpha_pci.c => alpha/pci.c} (100%)
 rename hw/{arm_boot.c => arm/boot.c} (100%)
 rename hw/{ => arm}/collie.c (100%)
 rename hw/{ => arm}/exynos4_boards.c (100%)
 rename hw/{ => arm}/gumstix.c (100%)
 rename hw/{ => arm}/highbank.c (100%)
 rename hw/{ => arm}/integratorcp.c (100%)
 rename hw/{ => arm}/kzm.c (100%)
 rename hw/{ => arm}/mainstone.c (100%)
 rename hw/{ => arm}/musicpal.c (100%)
 rename hw/{ => arm}/nseries.c (100%)
 rename hw/{ => arm}/omap_sx1.c (100%)
 rename hw/{ => arm}/palm.c (100%)
 rename hw/{arm_pic.c => arm/pic_cpu.c} (100%)
 rename hw/{ => arm}/realview.c (100%)
 rename hw/{ => arm}/spitz.c (100%)
 rename hw/{ => arm}/stellaris.c (100%)
 rename hw/{ => arm}/tosa.c (100%)
 rename hw/{ => arm}/versatilepb.c (100%)
 rename hw/{ => arm}/vexpress.c (100%)
 rename hw/{ => arm}/xilinx_zynq.c (100%)
 rename hw/{ => arm}/z2.c (100%)
 rename hw/{ => cris}/axis_dev88.c (100%)
 rename hw/{cris-boot.c => cris/boot.c} (100%)
 rename hw/{cris_pic_cpu.c => cris/pic_cpu.c} (100%)
 rename hw/{ => i386}/multiboot.c (100%)
 rename hw/{ => i386}/pc.c (100%)
 rename hw/{ => i386}/pc_piix.c (100%)
 rename hw/{ => i386}/pc_q35.c (100%)
 rename hw/{ => i386}/smbios.c (100%)
 rename hw/{ => i386}/xen_domainbuild.c (100%)
 rename hw/{ => i386}/xen_machine_pv.c (100%)
 rename hw/{ => lm32}/lm32_boards.c (100%)
 rename hw/{ => lm32}/milkymist.c (100%)
 rename hw/{ => m68k}/an5206.c (100%)
 rename hw/{ => m68k}/dummy_m68k.c (100%)
 rename hw/{ => m68k}/mcf5208.c (100%)
 rename hw/{microblaze_boot.c => microblaze/boot.c} (100%)
 rename hw/{ => microblaze}/petalogix_ml605_mmu.c (100%)
 rename hw/{ => microblaze}/petalogix_s3adsp1800_mmu.c (100%)
 rename hw/{microblaze_pic_cpu.c => microblaze/pic_cpu.c} (100%)
 rename hw/{mips_addr.c => mips/addr.c} (100%)
 rename hw/{mips_timer.c => mips/cputimer.c} (100%)
 rename hw/{ => mips}/mips_fulong2e.c (100%)
 rename hw/{ => mips}/mips_int.c (100%)
 rename hw/{ => mips}/mips_jazz.c (100%)
 rename hw/{ => mips}/mips_malta.c (100%)
 rename hw/{ => mips}/mips_mipssim.c (100%)
 rename hw/{ => mips}/mips_r4k.c (100%)
 rename hw/{openrisc_timer.c => openrisc/cputimer.c} (100%)
 rename hw/{ => openrisc}/openrisc_sim.c (100%)
 rename hw/{openrisc_pic.c => openrisc/pic_cpu.c} (100%)
 rename hw/{ => ppc}/ppc.c (100%)
 rename hw/{ => ppc}/ppc405_boards.c (100%)
 rename hw/{ => ppc}/ppc405_uc.c (100%)
 rename hw/{ => ppc}/ppc440_bamboo.c (100%)
 rename hw/{ => ppc}/ppc_booke.c (100%)
 rename hw/{ => ppc}/spapr.c (100%)
 rename hw/{ => ppc}/virtex_ml507.c (100%)
 rename hw/{ => sh4}/r2d.c (100%)
 rename hw/{ => sh4}/shix.c (100%)
 rename hw/{ => sparc}/leon3.c (100%)
 rename hw/{ => sparc}/sun4m.c (100%)
 rename hw/{ => sparc64}/sun4u.c (100%)
 rename hw/{ => unicore32}/puv3.c (100%)
 rename hw/{xtensa_pic.c => xtensa/pic_cpu.c} (100%)
 rename hw/{ => xtensa}/xtensa_lx60.c (100%)
 rename hw/{ => xtensa}/xtensa_sim.c (100%)

diff --git a/hw/xtensa_pic.c b/hw/xtensa/pic_cpu.c
similarity index 100%
rename from hw/xtensa_pic.c
rename to hw/xtensa/pic_cpu.c
diff --git a/hw/xtensa_lx60.c b/hw/xtensa/xtensa_lx60.c
similarity index 100%
rename from hw/xtensa_lx60.c
rename to hw/xtensa/xtensa_lx60.c
diff --git a/hw/xtensa_sim.c b/hw/xtensa/xtensa_sim.c
similarity index 100%
rename from hw/xtensa_sim.c
rename to hw/xtensa/xtensa_sim.c

Patch

diff --git a/hw/Makefile.objs b/hw/Makefile.objs
index 43f467a..eb7eb31 100644
--- a/hw/Makefile.objs
+++ b/hw/Makefile.objs
@@ -206,7 +206,6 @@  obj-$(CONFIG_SOFTMMU) += vhost_net.o
 obj-$(CONFIG_VHOST_NET) += vhost.o
 obj-$(CONFIG_REALLY_VIRTFS) += 9pfs/
 obj-$(CONFIG_VGA) += vga.o
-obj-$(CONFIG_XEN) += xen_domainbuild.o xen_machine_pv.o
 
 # Inter-VM PCI shared memory & VFIO PCI device assignment
 ifeq ($(CONFIG_PCI), y)
diff --git a/hw/alpha/Makefile.objs b/hw/alpha/Makefile.objs
index af1c07f..db868d2 100644
--- a/hw/alpha/Makefile.objs
+++ b/hw/alpha/Makefile.objs
@@ -1,4 +1,6 @@ 
 obj-y = mc146818rtc.o
-obj-y += alpha_pci.o alpha_dp264.o alpha_typhoon.o
+obj-y += alpha_typhoon.o
 
 obj-y := $(addprefix ../,$(obj-y))
+
+obj-y += dp264.o pci.o
diff --git a/hw/alpha_dp264.c b/hw/alpha/dp264.c
similarity index 100%
rename from hw/alpha_dp264.c
rename to hw/alpha/dp264.c
diff --git a/hw/alpha_pci.c b/hw/alpha/pci.c
similarity index 100%
rename from hw/alpha_pci.c
rename to hw/alpha/pci.c
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
index 3eb1366..c09cc3a 100644
--- a/hw/arm/Makefile.objs
+++ b/hw/arm/Makefile.objs
@@ -1,35 +1,32 @@ 
-obj-y = integratorcp.o versatilepb.o arm_pic.o
-obj-y += arm_boot.o
-obj-y += xilinx_zynq.o zynq_slcr.o
+obj-y += zynq_slcr.o
 obj-y += xilinx_spips.o
 obj-y += arm_gic.o arm_gic_common.o
 obj-y += a9scu.o
-obj-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o
+obj-y += realview_gic.o arm_sysctl.o arm11mpcore.o a9mpcore.o
 obj-y += exynos4210_gic.o exynos4210_combiner.o exynos4210.o
-obj-y += exynos4_boards.o exynos4210_uart.o exynos4210_pwm.o
+obj-y += exynos4210_uart.o exynos4210_pwm.o
 obj-y += exynos4210_pmu.o exynos4210_mct.o exynos4210_fimd.o
 obj-y += exynos4210_rtc.o exynos4210_i2c.o
 obj-y += arm_mptimer.o a15mpcore.o
-obj-y += armv7m.o armv7m_nvic.o stellaris.o stellaris_enet.o
-obj-y += highbank.o
+obj-y += armv7m.o armv7m_nvic.o stellaris_enet.o
 obj-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o
 obj-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
-obj-y += gumstix.o
-obj-y += zaurus.o ide/microdrive.o spitz.o tosa.o tc6393xb.o
+obj-y += zaurus.o ide/microdrive.o tc6393xb.o
 obj-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o \
                 omap_gpio.o omap_intc.o omap_uart.o
 obj-y += omap2.o omap_dss.o soc_dma.o omap_gptimer.o omap_synctimer.o \
                 omap_gpmc.o omap_sdrc.o omap_spi.o omap_tap.o omap_l4.o
-obj-y += omap_sx1.o palm.o tsc210x.o
-obj-y += nseries.o blizzard.o onenand.o cbus.o tusb6010.o usb/hcd-musb.o
-obj-y += mst_fpga.o mainstone.o
-obj-y += z2.o
-obj-y += musicpal.o bitbang_i2c.o marvell_88w8618_audio.o
+obj-y += tsc210x.o
+obj-y += blizzard.o onenand.o cbus.o tusb6010.o usb/hcd-musb.o
+obj-y += mst_fpga.o
+obj-y += bitbang_i2c.o marvell_88w8618_audio.o
 obj-y += framebuffer.o
-obj-y += vexpress.o
 obj-y += strongarm.o
-obj-y += collie.o
 obj-y += imx_serial.o imx_ccm.o imx_timer.o imx_avic.o
-obj-y += kzm.o
 
 obj-y := $(addprefix ../,$(obj-y))
+
+obj-y += boot.o collie.o exynos4_boards.o gumstix.o highbank.o
+obj-y += integratorcp.o kzm.o mainstone.o musicpal.o nseries.o
+obj-y += omap_sx1.o palm.o pic_cpu.o realview.o spitz.o stellaris.o
+obj-y += tosa.o versatilepb.o vexpress.o xilinx_zynq.o z2.o
diff --git a/hw/arm_boot.c b/hw/arm/boot.c
similarity index 100%
rename from hw/arm_boot.c
rename to hw/arm/boot.c
diff --git a/hw/collie.c b/hw/arm/collie.c
similarity index 100%
rename from hw/collie.c
rename to hw/arm/collie.c
diff --git a/hw/exynos4_boards.c b/hw/arm/exynos4_boards.c
similarity index 100%
rename from hw/exynos4_boards.c
rename to hw/arm/exynos4_boards.c
diff --git a/hw/gumstix.c b/hw/arm/gumstix.c
similarity index 100%
rename from hw/gumstix.c
rename to hw/arm/gumstix.c
diff --git a/hw/highbank.c b/hw/arm/highbank.c
similarity index 100%
rename from hw/highbank.c
rename to hw/arm/highbank.c
diff --git a/hw/integratorcp.c b/hw/arm/integratorcp.c
similarity index 100%
rename from hw/integratorcp.c
rename to hw/arm/integratorcp.c
diff --git a/hw/kzm.c b/hw/arm/kzm.c
similarity index 100%
rename from hw/kzm.c
rename to hw/arm/kzm.c
diff --git a/hw/mainstone.c b/hw/arm/mainstone.c
similarity index 100%
rename from hw/mainstone.c
rename to hw/arm/mainstone.c
diff --git a/hw/musicpal.c b/hw/arm/musicpal.c
similarity index 100%
rename from hw/musicpal.c
rename to hw/arm/musicpal.c
diff --git a/hw/nseries.c b/hw/arm/nseries.c
similarity index 100%
rename from hw/nseries.c
rename to hw/arm/nseries.c
diff --git a/hw/omap_sx1.c b/hw/arm/omap_sx1.c
similarity index 100%
rename from hw/omap_sx1.c
rename to hw/arm/omap_sx1.c
diff --git a/hw/palm.c b/hw/arm/palm.c
similarity index 100%
rename from hw/palm.c
rename to hw/arm/palm.c
diff --git a/hw/arm_pic.c b/hw/arm/pic_cpu.c
similarity index 100%
rename from hw/arm_pic.c
rename to hw/arm/pic_cpu.c
diff --git a/hw/realview.c b/hw/arm/realview.c
similarity index 100%
rename from hw/realview.c
rename to hw/arm/realview.c
diff --git a/hw/spitz.c b/hw/arm/spitz.c
similarity index 100%
rename from hw/spitz.c
rename to hw/arm/spitz.c
diff --git a/hw/stellaris.c b/hw/arm/stellaris.c
similarity index 100%
rename from hw/stellaris.c
rename to hw/arm/stellaris.c
diff --git a/hw/tosa.c b/hw/arm/tosa.c
similarity index 100%
rename from hw/tosa.c
rename to hw/arm/tosa.c
diff --git a/hw/versatilepb.c b/hw/arm/versatilepb.c
similarity index 100%
rename from hw/versatilepb.c
rename to hw/arm/versatilepb.c
diff --git a/hw/vexpress.c b/hw/arm/vexpress.c
similarity index 100%
rename from hw/vexpress.c
rename to hw/arm/vexpress.c
diff --git a/hw/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
similarity index 100%
rename from hw/xilinx_zynq.c
rename to hw/arm/xilinx_zynq.c
diff --git a/hw/z2.c b/hw/arm/z2.c
similarity index 100%
rename from hw/z2.c
rename to hw/arm/z2.c
diff --git a/hw/cris/Makefile.objs b/hw/cris/Makefile.objs
index aa9298a..a94c624 100644
--- a/hw/cris/Makefile.objs
+++ b/hw/cris/Makefile.objs
@@ -1,8 +1,3 @@ 
-# Boards
-obj-y = cris_pic_cpu.o
-obj-y += cris-boot.o
-obj-y += axis_dev88.o
-
 # IO blocks
 obj-y += etraxfs_dma.o
 obj-y += etraxfs_pic.o
@@ -11,3 +6,8 @@  obj-y += etraxfs_timer.o
 obj-y += etraxfs_ser.o
 
 obj-y := $(addprefix ../,$(obj-y))
+
+# Boards
+obj-y += pic_cpu.o
+obj-y += boot.o
+obj-y += axis_dev88.o
diff --git a/hw/axis_dev88.c b/hw/cris/axis_dev88.c
similarity index 100%
rename from hw/axis_dev88.c
rename to hw/cris/axis_dev88.c
diff --git a/hw/cris-boot.c b/hw/cris/boot.c
similarity index 100%
rename from hw/cris-boot.c
rename to hw/cris/boot.c
diff --git a/hw/cris_pic_cpu.c b/hw/cris/pic_cpu.c
similarity index 100%
rename from hw/cris_pic_cpu.c
rename to hw/cris/pic_cpu.c
diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
index 025803a..5d071f4 100644
--- a/hw/i386/Makefile.objs
+++ b/hw/i386/Makefile.objs
@@ -1,12 +1,11 @@ 
-obj-y += mc146818rtc.o pc.o
+obj-y += mc146818rtc.o
 obj-y += apic_common.o apic.o kvmvapic.o
 obj-y += sga.o ioapic_common.o ioapic.o piix_pci.o
 obj-y += vmport.o
-obj-y += pci/pci-hotplug.o smbios.o wdt_ib700.o
-obj-y += debugcon.o debugexit.o multiboot.o
-obj-y += pc_piix.o
+obj-y += pci/pci-hotplug.o wdt_ib700.o
+obj-y += debugcon.o debugexit.o
 obj-y += pc_sysfw.o
-obj-y += lpc_ich9.o q35.o pc_q35.o
+obj-y += lpc_ich9.o q35.o
 obj-$(CONFIG_XEN) += xen_platform.o xen_apic.o
 obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen-host-pci-device.o
 obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt.o xen_pt_config_init.o xen_pt_msi.o
@@ -15,3 +14,7 @@  obj-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o
 obj-y += pc-testdev.o
 
 obj-y := $(addprefix ../,$(obj-y))
+
+obj-y += multiboot.o smbios.o
+obj-y += pc.o pc_piix.o pc_q35.o
+obj-$(CONFIG_XEN) += xen_domainbuild.o xen_machine_pv.o
diff --git a/hw/multiboot.c b/hw/i386/multiboot.c
similarity index 100%
rename from hw/multiboot.c
rename to hw/i386/multiboot.c
diff --git a/hw/pc.c b/hw/i386/pc.c
similarity index 100%
rename from hw/pc.c
rename to hw/i386/pc.c
diff --git a/hw/pc_piix.c b/hw/i386/pc_piix.c
similarity index 100%
rename from hw/pc_piix.c
rename to hw/i386/pc_piix.c
diff --git a/hw/pc_q35.c b/hw/i386/pc_q35.c
similarity index 100%
rename from hw/pc_q35.c
rename to hw/i386/pc_q35.c
diff --git a/hw/smbios.c b/hw/i386/smbios.c
similarity index 100%
rename from hw/smbios.c
rename to hw/i386/smbios.c
diff --git a/hw/xen_domainbuild.c b/hw/i386/xen_domainbuild.c
similarity index 100%
rename from hw/xen_domainbuild.c
rename to hw/i386/xen_domainbuild.c
diff --git a/hw/xen_machine_pv.c b/hw/i386/xen_machine_pv.c
similarity index 100%
rename from hw/xen_machine_pv.c
rename to hw/i386/xen_machine_pv.c
diff --git a/hw/lm32/Makefile.objs b/hw/lm32/Makefile.objs
index 4e1843c..4592fe5 100644
--- a/hw/lm32/Makefile.objs
+++ b/hw/lm32/Makefile.objs
@@ -1,7 +1,3 @@ 
-# LM32 boards
-obj-y += lm32_boards.o
-obj-y += milkymist.o
-
 # LM32 peripherals
 obj-y += lm32_pic.o
 obj-y += lm32_juart.o
@@ -21,3 +17,7 @@  obj-y += milkymist-vgafb.o
 obj-y += framebuffer.o
 
 obj-y := $(addprefix ../,$(obj-y))
+
+# LM32 boards
+obj-y += lm32_boards.o
+obj-y += milkymist.o
diff --git a/hw/lm32_boards.c b/hw/lm32/lm32_boards.c
similarity index 100%
rename from hw/lm32_boards.c
rename to hw/lm32/lm32_boards.c
diff --git a/hw/milkymist.c b/hw/lm32/milkymist.c
similarity index 100%
rename from hw/milkymist.c
rename to hw/lm32/milkymist.c
diff --git a/hw/m68k/Makefile.objs b/hw/m68k/Makefile.objs
index 93b6d25..7c033a8 100644
--- a/hw/m68k/Makefile.objs
+++ b/hw/m68k/Makefile.objs
@@ -1,4 +1,7 @@ 
-obj-y = an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
-obj-y += dummy_m68k.o
+obj-y = mcf5206.o mcf_uart.o mcf_intc.o mcf_fec.o
 
 obj-y := $(addprefix ../,$(obj-y))
+
+obj-y += an5206.o mcf5208.o
+obj-y += dummy_m68k.o
+
diff --git a/hw/an5206.c b/hw/m68k/an5206.c
similarity index 100%
rename from hw/an5206.c
rename to hw/m68k/an5206.c
diff --git a/hw/dummy_m68k.c b/hw/m68k/dummy_m68k.c
similarity index 100%
rename from hw/dummy_m68k.c
rename to hw/m68k/dummy_m68k.c
diff --git a/hw/mcf5208.c b/hw/m68k/mcf5208.c
similarity index 100%
rename from hw/mcf5208.c
rename to hw/m68k/mcf5208.c
diff --git a/hw/microblaze/Makefile.objs b/hw/microblaze/Makefile.objs
index 2ff8048..9e7f249 100644
--- a/hw/microblaze/Makefile.objs
+++ b/hw/microblaze/Makefile.objs
@@ -1,9 +1,9 @@ 
-obj-y = petalogix_s3adsp1800_mmu.o
-obj-y += petalogix_ml605_mmu.o
-obj-y += microblaze_boot.o
 obj-y += xilinx_spi.o
-
-obj-y += microblaze_pic_cpu.o
 obj-y += xilinx_ethlite.o
 
 obj-y := $(addprefix ../,$(obj-y))
+
+obj-y += petalogix_s3adsp1800_mmu.o
+obj-y += petalogix_ml605_mmu.o
+obj-y += boot.o
+obj-y += pic_cpu.o
diff --git a/hw/microblaze_boot.c b/hw/microblaze/boot.c
similarity index 100%
rename from hw/microblaze_boot.c
rename to hw/microblaze/boot.c
diff --git a/hw/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
similarity index 100%
rename from hw/petalogix_ml605_mmu.c
rename to hw/microblaze/petalogix_ml605_mmu.c
diff --git a/hw/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
similarity index 100%
rename from hw/petalogix_s3adsp1800_mmu.c
rename to hw/microblaze/petalogix_s3adsp1800_mmu.c
diff --git a/hw/microblaze_pic_cpu.c b/hw/microblaze/pic_cpu.c
similarity index 100%
rename from hw/microblaze_pic_cpu.c
rename to hw/microblaze/pic_cpu.c
diff --git a/hw/mips/Makefile.objs b/hw/mips/Makefile.objs
index 29a5d0d..1e3bca1 100644
--- a/hw/mips/Makefile.objs
+++ b/hw/mips/Makefile.objs
@@ -1,6 +1,8 @@ 
-obj-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
-obj-y += mips_addr.o mips_timer.o mips_int.o
 obj-y += gt64xxx.o mc146818rtc.o
-obj-$(CONFIG_FULONG) += bonito.o vt82c686.o mips_fulong2e.o
+obj-$(CONFIG_FULONG) += bonito.o vt82c686.o
 
 obj-y := $(addprefix ../,$(obj-y))
+
+obj-y += mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
+obj-y += addr.o cputimer.o mips_int.o
+obj-$(CONFIG_FULONG) += mips_fulong2e.o
diff --git a/hw/mips_addr.c b/hw/mips/addr.c
similarity index 100%
rename from hw/mips_addr.c
rename to hw/mips/addr.c
diff --git a/hw/mips_timer.c b/hw/mips/cputimer.c
similarity index 100%
rename from hw/mips_timer.c
rename to hw/mips/cputimer.c
diff --git a/hw/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
similarity index 100%
rename from hw/mips_fulong2e.c
rename to hw/mips/mips_fulong2e.c
diff --git a/hw/mips_int.c b/hw/mips/mips_int.c
similarity index 100%
rename from hw/mips_int.c
rename to hw/mips/mips_int.c
diff --git a/hw/mips_jazz.c b/hw/mips/mips_jazz.c
similarity index 100%
rename from hw/mips_jazz.c
rename to hw/mips/mips_jazz.c
diff --git a/hw/mips_malta.c b/hw/mips/mips_malta.c
similarity index 100%
rename from hw/mips_malta.c
rename to hw/mips/mips_malta.c
diff --git a/hw/mips_mipssim.c b/hw/mips/mips_mipssim.c
similarity index 100%
rename from hw/mips_mipssim.c
rename to hw/mips/mips_mipssim.c
diff --git a/hw/mips_r4k.c b/hw/mips/mips_r4k.c
similarity index 100%
rename from hw/mips_r4k.c
rename to hw/mips/mips_r4k.c
diff --git a/hw/openrisc/Makefile.objs b/hw/openrisc/Makefile.objs
index 38ff8f5..61246b1 100644
--- a/hw/openrisc/Makefile.objs
+++ b/hw/openrisc/Makefile.objs
@@ -1,3 +1,2 @@ 
-obj-y = openrisc_pic.o openrisc_sim.o openrisc_timer.o
-
-obj-y := $(addprefix ../,$(obj-y))
+obj-y = pic_cpu.o cputimer.o
+obj-y += openrisc_sim.o 
diff --git a/hw/openrisc_timer.c b/hw/openrisc/cputimer.c
similarity index 100%
rename from hw/openrisc_timer.c
rename to hw/openrisc/cputimer.c
diff --git a/hw/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
similarity index 100%
rename from hw/openrisc_sim.c
rename to hw/openrisc/openrisc_sim.c
diff --git a/hw/openrisc_pic.c b/hw/openrisc/pic_cpu.c
similarity index 100%
rename from hw/openrisc_pic.c
rename to hw/openrisc/pic_cpu.c
diff --git a/hw/ppc/Makefile.objs b/hw/ppc/Makefile.objs
index 9141373..294d0de 100644
--- a/hw/ppc/Makefile.objs
+++ b/hw/ppc/Makefile.objs
@@ -1,19 +1,14 @@ 
-# shared objects
-obj-y = ppc.o ppc_booke.o
 # PREP target
 obj-y += mc146818rtc.o
 # IBM pSeries (sPAPR)
-obj-$(CONFIG_PSERIES) += spapr.o spapr_hcall.o spapr_rtas.o spapr_vio.o
+obj-$(CONFIG_PSERIES) += spapr_hcall.o spapr_rtas.o spapr_vio.o
 obj-$(CONFIG_PSERIES) += xics.o spapr_vty.o spapr_llan.o spapr_vscsi.o
 obj-$(CONFIG_PSERIES) += spapr_pci.o pci/pci-hotplug.o spapr_iommu.o
 obj-$(CONFIG_PSERIES) += spapr_events.o spapr_nvram.o
 # PowerPC 4xx boards
-obj-y += ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
-obj-y += ppc440_bamboo.o
+obj-y += ppc4xx_devs.o ppc4xx_pci.o
 # PowerPC E500 boards
 obj-$(CONFIG_E500) += mpc8544_guts.o ppce500_spin.o
-# PowerPC 440 Xilinx ML507 reference board.
-obj-y += virtex_ml507.o
 # PowerPC OpenPIC
 obj-y += openpic.o
 
@@ -22,6 +17,12 @@  obj-y += xilinx_ethlite.o
 
 obj-y := $(addprefix ../,$(obj-y))
 
+# shared objects
+obj-y += ppc.o ppc_booke.o
+# IBM pSeries (sPAPR)
+obj-$(CONFIG_PSERIES) += spapr.o
+# PowerPC 4xx boards
+obj-y += ppc405_boards.o ppc405_uc.o ppc440_bamboo.o
 # PReP
 obj-y += prep.o
 # OldWorld PowerMac
@@ -30,3 +31,5 @@  obj-y += mac_oldworld.o
 obj-y += mac_newworld.o
 # e500
 obj-$(CONFIG_E500) += e500.o mpc8544ds.o e500plat.o
+# PowerPC 440 Xilinx ML507 reference board.
+obj-y += virtex_ml507.o
diff --git a/hw/ppc.c b/hw/ppc/ppc.c
similarity index 100%
rename from hw/ppc.c
rename to hw/ppc/ppc.c
diff --git a/hw/ppc405_boards.c b/hw/ppc/ppc405_boards.c
similarity index 100%
rename from hw/ppc405_boards.c
rename to hw/ppc/ppc405_boards.c
diff --git a/hw/ppc405_uc.c b/hw/ppc/ppc405_uc.c
similarity index 100%
rename from hw/ppc405_uc.c
rename to hw/ppc/ppc405_uc.c
diff --git a/hw/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c
similarity index 100%
rename from hw/ppc440_bamboo.c
rename to hw/ppc/ppc440_bamboo.c
diff --git a/hw/ppc_booke.c b/hw/ppc/ppc_booke.c
similarity index 100%
rename from hw/ppc_booke.c
rename to hw/ppc/ppc_booke.c
diff --git a/hw/spapr.c b/hw/ppc/spapr.c
similarity index 100%
rename from hw/spapr.c
rename to hw/ppc/spapr.c
diff --git a/hw/virtex_ml507.c b/hw/ppc/virtex_ml507.c
similarity index 100%
rename from hw/virtex_ml507.c
rename to hw/ppc/virtex_ml507.c
diff --git a/hw/sh4/Makefile.objs b/hw/sh4/Makefile.objs
index 68c5921..b2e1f1e 100644
--- a/hw/sh4/Makefile.objs
+++ b/hw/sh4/Makefile.objs
@@ -1,5 +1,7 @@ 
-obj-y = shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
+obj-y = sh7750.o sh7750_regnames.o tc58128.o
 obj-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o
 obj-y += ide/mmio.o
 
 obj-y := $(addprefix ../,$(obj-y))
+
+obj-y += shix.o r2d.o
diff --git a/hw/r2d.c b/hw/sh4/r2d.c
similarity index 100%
rename from hw/r2d.c
rename to hw/sh4/r2d.c
diff --git a/hw/shix.c b/hw/sh4/shix.c
similarity index 100%
rename from hw/shix.c
rename to hw/sh4/shix.c
diff --git a/hw/sparc/Makefile.objs b/hw/sparc/Makefile.objs
index a39a511..71bbddf 100644
--- a/hw/sparc/Makefile.objs
+++ b/hw/sparc/Makefile.objs
@@ -1,8 +1,10 @@ 
-obj-y = sun4m.o lance.o tcx.o sun4m_iommu.o slavio_intctl.o
+obj-y = lance.o tcx.o sun4m_iommu.o slavio_intctl.o
 obj-y += slavio_timer.o slavio_misc.o sparc32_dma.o
-obj-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o leon3.o
+obj-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o
 
 # GRLIB
 obj-y += grlib_gptimer.o grlib_irqmp.o grlib_apbuart.o
 
 obj-y := $(addprefix ../,$(obj-y))
+
+obj-y += sun4m.o leon3.o
diff --git a/hw/leon3.c b/hw/sparc/leon3.c
similarity index 100%
rename from hw/leon3.c
rename to hw/sparc/leon3.c
diff --git a/hw/sun4m.c b/hw/sparc/sun4m.c
similarity index 100%
rename from hw/sun4m.c
rename to hw/sparc/sun4m.c
diff --git a/hw/sparc64/Makefile.objs b/hw/sparc64/Makefile.objs
index 8c65fc4..4df0d90 100644
--- a/hw/sparc64/Makefile.objs
+++ b/hw/sparc64/Makefile.objs
@@ -1,4 +1,6 @@ 
-obj-y = sun4u.o apb_pci.o
+obj-y = apb_pci.o
 obj-y += mc146818rtc.o
 
 obj-y := $(addprefix ../,$(obj-y))
+
+obj-y += sun4u.o
diff --git a/hw/sun4u.c b/hw/sparc64/sun4u.c
similarity index 100%
rename from hw/sun4u.c
rename to hw/sparc64/sun4u.c
diff --git a/hw/unicore32/Makefile.objs b/hw/unicore32/Makefile.objs
index 0725ce3..e0fd628 100644
--- a/hw/unicore32/Makefile.objs
+++ b/hw/unicore32/Makefile.objs
@@ -2,5 +2,3 @@ 
 
 # PKUnity-v3 SoC and board information
 obj-${CONFIG_PUV3} += puv3.o
-
-obj-y := $(addprefix ../,$(obj-y))
diff --git a/hw/puv3.c b/hw/unicore32/puv3.c
similarity index 100%
rename from hw/puv3.c
rename to hw/unicore32/puv3.c
diff --git a/hw/xtensa/Makefile.objs b/hw/xtensa/Makefile.objs
index 79698e9..6ead782 100644
--- a/hw/xtensa/Makefile.objs
+++ b/hw/xtensa/Makefile.objs
@@ -1,5 +1,3 @@ 
-obj-y += xtensa_pic.o
+obj-y += pic_cpu.o
 obj-y += xtensa_sim.o
 obj-y += xtensa_lx60.o
-
-obj-y := $(addprefix ../,$(obj-y))