From 7bcc17dc020d49f0baf25010f3d2be41ebfe238f Mon Sep 17 00:00:00 2001 From: ths Date: Wed, 21 Feb 2007 22:43:42 +0000 Subject: Fix initialisation of serial/parallel ports, spotted by Stefan Weil. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2447 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/mips_malta.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/mips_malta.c b/hw/mips_malta.c index 03db2f8a6c..eeb3513876 100644 --- a/hw/mips_malta.c +++ b/hw/mips_malta.c @@ -569,9 +569,12 @@ void mips_malta_init (int ram_size, int vga_ram_size, int boot_device, /* Super I/O */ kbd_init(); rtc_state = rtc_init(0x70, 8); - serial_init(&pic_set_irq_new, isa_pic, 0x3f8, 4, serial_hds[0]); - serial_init(&pic_set_irq_new, isa_pic, 0x2f8, 4, serial_hds[0]); - parallel_init(0x378, 7, parallel_hds[0]); + if (serial_hds[0]) + serial_init(&pic_set_irq_new, isa_pic, 0x3f8, 4, serial_hds[0]); + if (serial_hds[1]) + serial_init(&pic_set_irq_new, isa_pic, 0x2f8, 4, serial_hds[1]); + if (parallel_hds[0]) + parallel_init(0x378, 7, parallel_hds[0]); /* XXX: The floppy controller does not work correctly, something is probably wrong. floppy_controller = fdctrl_init(6, 2, 0, 0x3f0, fd_table); */ -- cgit v1.2.3