mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
hw/arm_gic: Move NVIC specific reset to armv7m_nvic_reset
Move the NVIC specific bits of reset to the NVIC's own reset function, rather than using ifdefs in the common arm_gic reset. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
c48c6522f5
commit
b3387ede2f
2 changed files with 7 additions and 10 deletions
10
hw/arm_gic.c
10
hw/arm_gic.c
|
@ -743,23 +743,13 @@ static void gic_reset(DeviceState *dev)
|
|||
s->current_pending[i] = 1023;
|
||||
s->running_irq[i] = 1023;
|
||||
s->running_priority[i] = 0x100;
|
||||
#ifdef NVIC
|
||||
/* The NVIC doesn't have per-cpu interfaces, so enable by default. */
|
||||
s->cpu_enabled[i] = 1;
|
||||
#else
|
||||
s->cpu_enabled[i] = 0;
|
||||
#endif
|
||||
}
|
||||
for (i = 0; i < 16; i++) {
|
||||
GIC_SET_ENABLED(i, ALL_CPU_MASK);
|
||||
GIC_SET_TRIGGER(i);
|
||||
}
|
||||
#ifdef NVIC
|
||||
/* The NVIC is always enabled. */
|
||||
s->enabled = 1;
|
||||
#else
|
||||
s->enabled = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void gic_save(QEMUFile *f, void *opaque)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue