Skip to content

Commit

Permalink
Compile some MIPS devices only once
Browse files Browse the repository at this point in the history
Move CPU specific declarations to a separate file.

Signed-off-by: Blue Swirl <[email protected]>
  • Loading branch information
blueswirl committed Mar 27, 2010
1 parent 6450a33 commit b970ea8
Show file tree
Hide file tree
Showing 15 changed files with 51 additions and 18 deletions.
6 changes: 6 additions & 0 deletions Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ hw-obj-$(CONFIG_QDEV_ADDR) += qdev-addr.o
# VGA
hw-obj-$(CONFIG_VGA_PCI) += vga-pci.o
hw-obj-$(CONFIG_VGA_ISA) += vga-isa.o
hw-obj-$(CONFIG_VGA_ISA_MM) += vga-isa-mm.o

hw-obj-$(CONFIG_RC4030) += rc4030.o
hw-obj-$(CONFIG_DP8393X) += dp8393x.o
hw-obj-$(CONFIG_DS1225Y) += ds1225y.o
hw-obj-$(CONFIG_MIPSNET) += mipsnet.o

# Sound
sound-obj-y =
Expand Down
8 changes: 3 additions & 5 deletions Makefile.target
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,10 @@ 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_addr.o mips_timer.o mips_int.o
obj-mips-y += dma.o vga.o i8259.o rc4030.o
obj-mips-y += vga-isa-mm.o
obj-mips-y += g364fb.o jazz_led.o dp8393x.o
obj-mips-y += gt64xxx.o pckbd.o mc146818rtc.o acpi.o ds1225y.o
obj-mips-y += dma.o vga.o i8259.o
obj-mips-y += g364fb.o jazz_led.o
obj-mips-y += gt64xxx.o pckbd.o mc146818rtc.o acpi.o
obj-mips-y += piix4.o cirrus_vga.o
obj-mips-y += mipsnet.o
obj-mips-y += pflash_cfi01.o
obj-mips-y += vmware_vga.o

Expand Down
5 changes: 5 additions & 0 deletions default-configs/mips-softmmu.mak
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONFIG_ISA_MMIO=y
CONFIG_ESP=y
CONFIG_VGA_PCI=y
CONFIG_VGA_ISA=y
CONFIG_VGA_ISA_MM=y
CONFIG_SERIAL=y
CONFIG_PARALLEL=y
CONFIG_I8254=y
Expand All @@ -18,3 +19,7 @@ CONFIG_IDE_PIIX=y
CONFIG_NE2000_ISA=y
CONFIG_SOUND=y
CONFIG_VIRTIO_PCI=y
CONFIG_RC4030=y
CONFIG_DP8393X=y
CONFIG_DS1225Y=y
CONFIG_MIPSNET=y
5 changes: 5 additions & 0 deletions default-configs/mips64-softmmu.mak
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONFIG_ISA_MMIO=y
CONFIG_ESP=y
CONFIG_VGA_PCI=y
CONFIG_VGA_ISA=y
CONFIG_VGA_ISA_MM=y
CONFIG_SERIAL=y
CONFIG_PARALLEL=y
CONFIG_I8254=y
Expand All @@ -18,3 +19,7 @@ CONFIG_IDE_PIIX=y
CONFIG_NE2000_ISA=y
CONFIG_SOUND=y
CONFIG_VIRTIO_PCI=y
CONFIG_RC4030=y
CONFIG_DP8393X=y
CONFIG_DS1225Y=y
CONFIG_MIPSNET=y
5 changes: 5 additions & 0 deletions default-configs/mips64el-softmmu.mak
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONFIG_ISA_MMIO=y
CONFIG_ESP=y
CONFIG_VGA_PCI=y
CONFIG_VGA_ISA=y
CONFIG_VGA_ISA_MM=y
CONFIG_SERIAL=y
CONFIG_PARALLEL=y
CONFIG_I8254=y
Expand All @@ -18,3 +19,7 @@ CONFIG_IDE_PIIX=y
CONFIG_NE2000_ISA=y
CONFIG_SOUND=y
CONFIG_VIRTIO_PCI=y
CONFIG_RC4030=y
CONFIG_DP8393X=y
CONFIG_DS1225Y=y
CONFIG_MIPSNET=y
5 changes: 5 additions & 0 deletions default-configs/mipsel-softmmu.mak
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONFIG_ISA_MMIO=y
CONFIG_ESP=y
CONFIG_VGA_PCI=y
CONFIG_VGA_ISA=y
CONFIG_VGA_ISA_MM=y
CONFIG_SERIAL=y
CONFIG_PARALLEL=y
CONFIG_I8254=y
Expand All @@ -18,3 +19,7 @@ CONFIG_IDE_PIIX=y
CONFIG_NE2000_ISA=y
CONFIG_SOUND=y
CONFIG_VIRTIO_PCI=y
CONFIG_RC4030=y
CONFIG_DP8393X=y
CONFIG_DS1225Y=y
CONFIG_MIPSNET=y
10 changes: 0 additions & 10 deletions hw/mips.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ void mipsnet_init(int base, qemu_irq irq, NICInfo *nd);
/* jazz_led.c */
extern void jazz_led_init(target_phys_addr_t base);

/* mips_addr.c */
uint64_t cpu_mips_kseg0_to_phys(void *opaque, uint64_t addr);
uint64_t cpu_mips_phys_to_kseg0(void *opaque, uint64_t addr);

/* mips_int.c */
extern void cpu_mips_irq_init_cpu(CPUState *env);

/* mips_timer.c */
extern void cpu_mips_clock_init(CPUState *);

/* rc4030.c */
typedef struct rc4030DMAState *rc4030_dma;
void rc4030_dma_memory_rw(void *opaque, target_phys_addr_t addr, uint8_t *buf, int len, int is_write);
Expand Down
2 changes: 1 addition & 1 deletion hw/mips_addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/

#include "hw.h"
#include "mips.h"
#include "mips_cpudevs.h"

uint64_t cpu_mips_kseg0_to_phys(void *opaque, uint64_t addr)
{
Expand Down
15 changes: 15 additions & 0 deletions hw/mips_cpudevs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef HW_MIPS_CPUDEVS_H
#define HW_MIPS_CPUDEVS_H
/* Definitions for MIPS CPU internal devices. */

/* mips_addr.c */
uint64_t cpu_mips_kseg0_to_phys(void *opaque, uint64_t addr);
uint64_t cpu_mips_phys_to_kseg0(void *opaque, uint64_t addr);

/* mips_int.c */
void cpu_mips_irq_init_cpu(CPUState *env);

/* mips_timer.c */
void cpu_mips_clock_init(CPUState *);

#endif
2 changes: 1 addition & 1 deletion hw/mips_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/

#include "hw.h"
#include "mips.h"
#include "mips_cpudevs.h"
#include "cpu.h"

/* Raise IRQ to CPU if necessary. It must be called every time the active
Expand Down
1 change: 1 addition & 0 deletions hw/mips_jazz.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "hw.h"
#include "mips.h"
#include "mips_cpudevs.h"
#include "pc.h"
#include "isa.h"
#include "fdc.h"
Expand Down
1 change: 1 addition & 0 deletions hw/mips_malta.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "block.h"
#include "flash.h"
#include "mips.h"
#include "mips_cpudevs.h"
#include "pci.h"
#include "usb-uhci.h"
#include "vmware_vga.h"
Expand Down
1 change: 1 addition & 0 deletions hw/mips_mipssim.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*/
#include "hw.h"
#include "mips.h"
#include "mips_cpudevs.h"
#include "pc.h"
#include "isa.h"
#include "net.h"
Expand Down
1 change: 1 addition & 0 deletions hw/mips_r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
#include "hw.h"
#include "mips.h"
#include "mips_cpudevs.h"
#include "pc.h"
#include "isa.h"
#include "net.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/mips_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/

#include "hw.h"
#include "mips.h"
#include "mips_cpudevs.h"
#include "qemu-timer.h"

#define TIMER_FREQ 100 * 1000 * 1000
Expand Down

0 comments on commit b970ea8

Please sign in to comment.