aboutsummaryrefslogtreecommitdiff
path: root/hw/mips_r4k.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2006-12-23 00:23:19 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2006-12-23 00:23:19 +0000
commiteddbd288a04d26852a9b5e3598eb90cd8ff5505f (patch)
tree62eef850bb141504d7b6b3801a494cb333309ca2 /hw/mips_r4k.c
parent28d657fc0b790e7b338ba624074624e3ce1f457b (diff)
downloadqemu-eddbd288a04d26852a9b5e3598eb90cd8ff5505f.zip
qemu-eddbd288a04d26852a9b5e3598eb90cd8ff5505f.tar.gz
qemu-eddbd288a04d26852a9b5e3598eb90cd8ff5505f.tar.bz2
More serial ports for the mips machine.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2271 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/mips_r4k.c')
-rw-r--r--hw/mips_r4k.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c
index 1f779b2..cf52a03 100644
--- a/hw/mips_r4k.c
+++ b/hw/mips_r4k.c
@@ -24,6 +24,9 @@ static const int ide_iobase[2] = { 0x1f0, 0x170 };
static const int ide_iobase2[2] = { 0x3f6, 0x376 };
static const int ide_irq[2] = { 14, 15 };
+static int serial_io[MAX_SERIAL_PORTS] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
+static int serial_irq[MAX_SERIAL_PORTS] = { 4, 3, 4, 3 };
+
extern FILE *logfile;
static PITState *pit; /* PIT i8254 */
@@ -195,7 +198,13 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device,
isa_pic = pic_init(pic_irq_request, env);
pit = pit_init(0x40, 0);
- serial_init(&pic_set_irq_new, isa_pic, 0x3f8, 4, serial_hds[0]);
+ for(i = 0; i < MAX_SERIAL_PORTS; i++) {
+ if (serial_hds[i]) {
+ serial_init(&pic_set_irq_new, isa_pic,
+ serial_io[i], serial_irq[i], serial_hds[i]);
+ }
+ }
+
isa_vga_init(ds, phys_ram_base + ram_size, ram_size,
vga_ram_size);