diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-02-21 22:43:42 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-02-21 22:43:42 +0000 |
commit | 7bcc17dc020d49f0baf25010f3d2be41ebfe238f (patch) | |
tree | 0f0a6e80c87f6c512f883f55d1d6c75804785112 /hw/mips_malta.c | |
parent | 331ad6f444f288093a174cfdbe23985f954cfad3 (diff) |
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
Diffstat (limited to 'hw/mips_malta.c')
-rw-r--r-- | hw/mips_malta.c | 9 |
1 files 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); */ |