aboutsummaryrefslogtreecommitdiff
path: root/hw/i8254.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-03-14 21:46:48 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-03-14 21:46:48 +0000
commitb41a2cd1e4228c765e3b82ec6c89096528b4d7d9 (patch)
tree7f2180a4dbb0ca207e8c47ab07d03bcb00960730 /hw/i8254.c
parentc4b1fcc0f9594cae64d5bf172548a522db0c2545 (diff)
io port API change
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@664 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/i8254.c')
-rw-r--r--hw/i8254.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/i8254.c b/hw/i8254.c
index 7dc5f3c25f..6e96825013 100644
--- a/hw/i8254.c
+++ b/hw/i8254.c
@@ -201,7 +201,7 @@ static inline void pit_load_count(PITChannelState *s, int val)
}
}
-void pit_ioport_write(CPUState *env, uint32_t addr, uint32_t val)
+static void pit_ioport_write(void *opaque, uint32_t addr, uint32_t val)
{
int channel, access;
PITChannelState *s;
@@ -246,7 +246,7 @@ void pit_ioport_write(CPUState *env, uint32_t addr, uint32_t val)
}
}
-uint32_t pit_ioport_read(CPUState *env, uint32_t addr)
+static uint32_t pit_ioport_read(void *opaque, uint32_t addr)
{
int ret, count;
PITChannelState *s;
@@ -279,7 +279,7 @@ uint32_t pit_ioport_read(CPUState *env, uint32_t addr)
return ret;
}
-void pit_init(void)
+void pit_init(int base)
{
PITChannelState *s;
int i;
@@ -291,7 +291,7 @@ void pit_init(void)
pit_load_count(s, 0);
}
- register_ioport_write(0x40, 4, pit_ioport_write, 1);
- register_ioport_read(0x40, 3, pit_ioport_read, 1);
+ register_ioport_write(base, 4, 1, pit_ioport_write, NULL);
+ register_ioport_read(base, 3, 1, pit_ioport_read, NULL);
}