[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for-2.3 2/6] gus: clean up MemoryRegionPortio
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH for-2.3 2/6] gus: clean up MemoryRegionPortio |
Date: |
Mon, 30 Mar 2015 13:45:14 +0200 |
Remove 16-bit reads/writes, since ioport.c is able to synthesize them.
Remove the two MIDI registers (0x300 and 0x301) from gus_portio_list1,
and add the second MIDI register (0x301) to gus_portio_list2.
Tested with 2nd Reality.
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/audio/gus.c | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/hw/audio/gus.c b/hw/audio/gus.c
index 4a43ce7..772010e 100644
--- a/hw/audio/gus.c
+++ b/hw/audio/gus.c
@@ -71,13 +71,6 @@ IO_READ_PROTO (gus_readb)
return gus_read (&s->emu, nport, 1);
}
-IO_READ_PROTO (gus_readw)
-{
- GUSState *s = opaque;
-
- return gus_read (&s->emu, nport, 2);
-}
-
IO_WRITE_PROTO (gus_writeb)
{
GUSState *s = opaque;
@@ -85,13 +78,6 @@ IO_WRITE_PROTO (gus_writeb)
gus_write (&s->emu, nport, 1, val);
}
-IO_WRITE_PROTO (gus_writew)
-{
- GUSState *s = opaque;
-
- gus_write (&s->emu, nport, 2, val);
-}
-
static int write_audio (GUSState *s, int samples)
{
int net = 0;
@@ -236,17 +222,13 @@ static const VMStateDescription vmstate_gus = {
static const MemoryRegionPortio gus_portio_list1[] = {
{0x000, 1, 1, .write = gus_writeb },
- {0x000, 1, 2, .write = gus_writew },
{0x006, 10, 1, .read = gus_readb, .write = gus_writeb },
- {0x006, 10, 2, .read = gus_readw, .write = gus_writew },
- {0x100, 8, 1, .read = gus_readb, .write = gus_writeb },
- {0x100, 8, 2, .read = gus_readw, .write = gus_writew },
+ {0x102, 6, 1, .read = gus_readb, .write = gus_writeb },
PORTIO_END_OF_LIST (),
};
static const MemoryRegionPortio gus_portio_list2[] = {
- {0, 1, 1, .read = gus_readb },
- {0, 1, 2, .read = gus_readw },
+ {0, 2, 1, .read = gus_readb },
PORTIO_END_OF_LIST (),
};
--
2.3.4
- [Qemu-devel] [PATCH for-2.3 0/3] ioport fixes, Paolo Bonzini, 2015/03/30
- [Qemu-devel] [PATCH for-2.3 3/6] ide: there is only one data port, Paolo Bonzini, 2015/03/30
- [Qemu-devel] [PATCH for-2.3 2/6] gus: clean up MemoryRegionPortio,
Paolo Bonzini <=
- [Qemu-devel] [PATCH for-2.3 4/6] ioport: remove wrong comment, Paolo Bonzini, 2015/03/30
- [Qemu-devel] [PATCH for-2.3 1/6] sb16: remove useless mixer_write_indexw, Paolo Bonzini, 2015/03/30
- [Qemu-devel] [PATCH for-2.3 5/6] ioport: loosen assertions on emulation of 16-bit ports, Paolo Bonzini, 2015/03/30
- [Qemu-devel] [PATCH for-2.3 6/6] ioport: reserve the whole range of an I/O port in the AddressSpace, Paolo Bonzini, 2015/03/30
- Re: [Qemu-devel] [PATCH for-2.3 0/3] ioport fixes, Mark Cave-Ayland, 2015/03/31