summaryrefslogtreecommitdiff
path: root/hw/i8254.c
diff options
context:
space:
mode:
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 7dc5f3c25..6e9682501 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);
}