ioports: remove unused env parameter and compile only once

The CPU state parameter is not used, remove it and adjust callers. Now we
can compile ioport.c once for all targets.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Blue Swirl 2009-09-20 16:05:47 +00:00
parent 5e520a7d50
commit afcea8cbde
13 changed files with 69 additions and 75 deletions

View file

@ -49,14 +49,12 @@ static void main_cpu_reset(void *opaque)
static uint32_t rtc_readb(void *opaque, target_phys_addr_t addr)
{
CPUState *env = opaque;
return cpu_inw(env, 0x71);
return cpu_inw(0x71);
}
static void rtc_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
{
CPUState *env = opaque;
cpu_outw(env, 0x71, val & 0xff);
cpu_outw(0x71, val & 0xff);
}
static CPUReadMemoryFunc * const rtc_read[3] = {
@ -243,7 +241,7 @@ void mips_jazz_init (ram_addr_t ram_size,
/* Real time clock */
rtc_init(1980);
s_rtc = cpu_register_io_memory(rtc_read, rtc_write, env);
s_rtc = cpu_register_io_memory(rtc_read, rtc_write, NULL);
cpu_register_physical_memory(0x80004000, 0x00001000, s_rtc);
/* Keyboard (i8042) */