hw/armv7m_nvic: Fix incorrect default for num-irqs property
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 13 Aug 2012 10:04:05 +0000 (11:04 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 13 Aug 2012 10:04:05 +0000 (11:04 +0100)
commit55e00a19b6dc8f20e5688866451bb4a60e649459
treecd1b9f5ce57d148af7eb7078e929ed0df286efb2
parent33e95c6328a3149a52615176617997c4f8f7088b
hw/armv7m_nvic: Fix incorrect default for num-irqs property

Fix an incorrect default value for the num-irqs property (we were
attempting to override it from the default set by the parent class
but not succeeding, which meant that the lm3s6965evb model would
assert on startup attempting to wire up nonexistent irq lines).
Instead of trying to override the parent's Property array, we
define an instance_init function which runs after default setup
but before user property setting and can just fix up the default
value in the gic_state struct.

Reported-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
Tested-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/armv7m_nvic.c