mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53: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
|
@ -382,6 +382,13 @@ static void armv7m_nvic_reset(DeviceState *dev)
|
|||
{
|
||||
nvic_state *s = FROM_SYSBUSGIC(nvic_state, sysbus_from_qdev(dev));
|
||||
gic_reset(&s->gic.busdev.qdev);
|
||||
/* Common GIC reset resets to disabled; the NVIC doesn't have
|
||||
* per-CPU interfaces so mark our non-existent CPU interface
|
||||
* as enabled by default.
|
||||
*/
|
||||
s->gic.cpu_enabled[0] = 1;
|
||||
/* The NVIC as a whole is always enabled. */
|
||||
s->gic.enabled = 1;
|
||||
systick_reset(s);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue