Commit eddbd288a04d26852a9b5e3598eb90cd8ff5505f
1 parent
28d657fc
More serial ports for the mips machine.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2271 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
10 additions
and
1 deletions
hw/mips_r4k.c
| @@ -24,6 +24,9 @@ static const int ide_iobase[2] = { 0x1f0, 0x170 }; | @@ -24,6 +24,9 @@ static const int ide_iobase[2] = { 0x1f0, 0x170 }; | ||
| 24 | static const int ide_iobase2[2] = { 0x3f6, 0x376 }; | 24 | static const int ide_iobase2[2] = { 0x3f6, 0x376 }; |
| 25 | static const int ide_irq[2] = { 14, 15 }; | 25 | static const int ide_irq[2] = { 14, 15 }; |
| 26 | 26 | ||
| 27 | +static int serial_io[MAX_SERIAL_PORTS] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; | ||
| 28 | +static int serial_irq[MAX_SERIAL_PORTS] = { 4, 3, 4, 3 }; | ||
| 29 | + | ||
| 27 | extern FILE *logfile; | 30 | extern FILE *logfile; |
| 28 | 31 | ||
| 29 | static PITState *pit; /* PIT i8254 */ | 32 | static PITState *pit; /* PIT i8254 */ |
| @@ -195,7 +198,13 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device, | @@ -195,7 +198,13 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device, | ||
| 195 | isa_pic = pic_init(pic_irq_request, env); | 198 | isa_pic = pic_init(pic_irq_request, env); |
| 196 | pit = pit_init(0x40, 0); | 199 | pit = pit_init(0x40, 0); |
| 197 | 200 | ||
| 198 | - serial_init(&pic_set_irq_new, isa_pic, 0x3f8, 4, serial_hds[0]); | 201 | + for(i = 0; i < MAX_SERIAL_PORTS; i++) { |
| 202 | + if (serial_hds[i]) { | ||
| 203 | + serial_init(&pic_set_irq_new, isa_pic, | ||
| 204 | + serial_io[i], serial_irq[i], serial_hds[i]); | ||
| 205 | + } | ||
| 206 | + } | ||
| 207 | + | ||
| 199 | isa_vga_init(ds, phys_ram_base + ram_size, ram_size, | 208 | isa_vga_init(ds, phys_ram_base + ram_size, ram_size, |
| 200 | vga_ram_size); | 209 | vga_ram_size); |
| 201 | 210 |