Commit 697584ab24c8aa4f9b8162a12993523bb2450af0

Authored by bellard
1 parent c96a29cd

Add i8259 PIT to MIPS (Ralf Baechle


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1551 c046a42c-6fe2-441c-8c8c-71466251a162
Makefile.target
@@ -295,8 +295,8 @@ VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o @@ -295,8 +295,8 @@ VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o
295 VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o heathrow_pic.o mixeng.o 295 VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o heathrow_pic.o mixeng.o
296 endif 296 endif
297 ifeq ($(TARGET_ARCH), mips) 297 ifeq ($(TARGET_ARCH), mips)
298 -VL_OBJS+= mips_r4k.o dma.o vga.o serial.o ne2000.o i8259.o  
299 -#VL_OBJS+= #ide.o pckbd.o i8254.o fdc.o m48t59.o 298 +VL_OBJS+= mips_r4k.o dma.o vga.o serial.o ne2000.o i8254.o i8259.o
  299 +#VL_OBJS+= #ide.o pckbd.o fdc.o m48t59.o
300 endif 300 endif
301 ifeq ($(TARGET_BASE_ARCH), sparc) 301 ifeq ($(TARGET_BASE_ARCH), sparc)
302 ifeq ($(TARGET_ARCH), sparc64) 302 ifeq ($(TARGET_ARCH), sparc64)
hw/mips_r4k.c
@@ -7,6 +7,8 @@ @@ -7,6 +7,8 @@
7 7
8 extern FILE *logfile; 8 extern FILE *logfile;
9 9
  10 +static PITState *pit;
  11 +
10 static void pic_irq_request(void *opaque, int level) 12 static void pic_irq_request(void *opaque, int level)
11 { 13 {
12 if (level) { 14 if (level) {
@@ -242,6 +244,7 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device, @@ -242,6 +244,7 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device,
242 isa_mem_base = 0x10000000; 244 isa_mem_base = 0x10000000;
243 245
244 isa_pic = pic_init(pic_irq_request, cpu_single_env); 246 isa_pic = pic_init(pic_irq_request, cpu_single_env);
  247 + pit = pit_init(0x40, 0);
245 serial_init(0x3f8, 4, serial_hds[0]); 248 serial_init(0x3f8, 4, serial_hds[0]);
246 vga_initialize(NULL, ds, phys_ram_base + ram_size, ram_size, 249 vga_initialize(NULL, ds, phys_ram_base + ram_size, ram_size,
247 vga_ram_size, 0, 0); 250 vga_ram_size, 0, 0);