diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2019-01-26 04:12:30 -0800 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2019-01-28 11:54:54 -0800 |
commit | 66f03d7e13d2abe56c6b1841faf0edf5b4ec4b66 (patch) | |
tree | 9fc893febbb7f975bc4f21a6c858465db3c2cd81 /hw/xtensa/xtfpga.c | |
parent | 3f75038a3369078b656826eb454ead5f5dc8802e (diff) |
target/xtensa: rearrange access to external interrupts
Replace xtensa_get_extint that returns single external IRQ descriptor
with xtensa_get_extints that returns a vector of all external IRQs.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'hw/xtensa/xtfpga.c')
-rw-r--r-- | hw/xtensa/xtfpga.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index 7379b3fff4..3102f8c047 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -225,6 +225,7 @@ static void xtfpga_init(const XtfpgaBoardDesc *board, MachineState *machine) XtensaCPU *cpu = NULL; CPUXtensaState *env = NULL; MemoryRegion *system_io; + qemu_irq *extints; DriveInfo *dinfo; pflash_t *flash = NULL; QemuOpts *machine_opts = qemu_get_machine_opts(); @@ -253,6 +254,7 @@ static void xtfpga_init(const XtfpgaBoardDesc *board, MachineState *machine) */ cpu_reset(CPU(cpu)); } + extints = xtensa_get_extints(env); if (env) { XtensaMemory sysram = env->config->sysram; @@ -284,11 +286,11 @@ static void xtfpga_init(const XtfpgaBoardDesc *board, MachineState *machine) xtfpga_fpga_init(system_io, 0x0d020000, freq); if (nd_table[0].used) { xtfpga_net_init(system_io, 0x0d030000, 0x0d030400, 0x0d800000, - xtensa_get_extint(env, 1), nd_table); + extints[1], nd_table); } - serial_mm_init(system_io, 0x0d050020, 2, xtensa_get_extint(env, 0), - 115200, serial_hd(0), DEVICE_NATIVE_ENDIAN); + serial_mm_init(system_io, 0x0d050020, 2, extints[0], + 115200, serial_hd(0), DEVICE_NATIVE_ENDIAN); dinfo = drive_get(IF_PFLASH, 0, 0); if (dinfo) { |