aboutsummaryrefslogtreecommitdiff
path: root/hw/pckbd.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-01 18:59:50 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-01 18:59:50 +0000
commit8da3ff180974732fc4272cb4433fef85c1822961 (patch)
treef23cfaffa61efb36aa46dfeb771ad33cbfd4f3aa /hw/pckbd.c
parent6ad1d22b15c0a091edb1d8efc983c1d75f74ef45 (diff)
Change MMIO callbacks to use offsets, not absolute addresses.
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pckbd.c')
-rw-r--r--hw/pckbd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/pckbd.c b/hw/pckbd.c
index 2176b83329..cceea4a5d1 100644
--- a/hw/pckbd.c
+++ b/hw/pckbd.c
@@ -125,7 +125,6 @@ typedef struct KBDState {
qemu_irq irq_kbd;
qemu_irq irq_mouse;
- target_phys_addr_t base;
int it_shift;
} KBDState;
@@ -392,7 +391,7 @@ static uint32_t kbd_mm_readb (void *opaque, target_phys_addr_t addr)
{
KBDState *s = opaque;
- switch ((addr - s->base) >> s->it_shift) {
+ switch (addr >> s->it_shift) {
case 0:
return kbd_read_data(s, 0) & 0xff;
case 1:
@@ -406,7 +405,7 @@ static void kbd_mm_writeb (void *opaque, target_phys_addr_t addr, uint32_t value
{
KBDState *s = opaque;
- switch ((addr - s->base) >> s->it_shift) {
+ switch (addr >> s->it_shift) {
case 0:
kbd_write_data(s, 0, value & 0xff);
break;
@@ -436,7 +435,6 @@ void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,
s->irq_kbd = kbd_irq;
s->irq_mouse = mouse_irq;
- s->base = base;
s->it_shift = it_shift;
kbd_reset(s);