]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/slavio_serial.c
Use OpenBIOS for g3bw machine
[mirror_qemu.git] / hw / slavio_serial.c
index 97891cc529c627f0dbe6fef291f8e35ebe076b92..1028ed944c71508d7c1130daeeac8dbba2563e28 100644 (file)
@@ -108,8 +108,7 @@ struct SerialState {
     struct ChannelState chn[2];
 };
 
-#define SERIAL_MAXADDR 7
-#define SERIAL_SIZE (SERIAL_MAXADDR + 1)
+#define SERIAL_SIZE 8
 #define SERIAL_CTRL 0
 #define SERIAL_DATA 1
 
@@ -260,8 +259,7 @@ static uint32_t get_queue(void *opaque)
 
 static int slavio_serial_update_irq_chn(ChannelState *s)
 {
-    if ((s->wregs[W_INTR] & INTR_INTALL) && // interrupts enabled
-        (((s->wregs[W_INTR] & INTR_TXINT) && s->txint == 1) ||
+    if ((((s->wregs[W_INTR] & INTR_TXINT) && s->txint == 1) ||
          // tx ints enabled, pending
          ((((s->wregs[W_INTR] & INTR_RXMODEMSK) == INTR_RXINT1ST) ||
            ((s->wregs[W_INTR] & INTR_RXMODEMSK) == INTR_RXINTALL)) &&
@@ -478,7 +476,7 @@ static void slavio_serial_mem_writeb(void *opaque, target_phys_addr_t addr,
 
     val &= 0xff;
     saddr = (addr & 3) >> 1;
-    channel = (addr & SERIAL_MAXADDR) >> 2;
+    channel = addr >> 2;
     s = &serial->chn[channel];
     switch (saddr) {
     case SERIAL_CTRL:
@@ -575,7 +573,7 @@ static uint32_t slavio_serial_mem_readb(void *opaque, target_phys_addr_t addr)
     int channel;
 
     saddr = (addr & 3) >> 1;
-    channel = (addr & SERIAL_MAXADDR) >> 2;
+    channel = addr >> 2;
     s = &serial->chn[channel];
     switch (saddr) {
     case SERIAL_CTRL: