pxa2xx: Add a reset handler to reset the ARM CPU.
PATCH 1/1 pxa2xx: Add a reset handler to reset the ARM CPU.
Currently the CPU does not get reset when the system_reset command is invoked. We register a handler in the pxa2xx SoC code, to reset the CPU as well.
Signed-off-by Vijay Kumar B. <[email protected]>
Reviewed-by Deepak S. <[email protected]>
--- hw/arm/pxa2xx.c | 8 ++++++++ 1 file changed, 8 insertions(+)
hw/arm/pxa2xx.c +8 -0
@@ -2056,6 +2056,12 @@ static void pxa2xx_reset(void *opaque, int line, int level) } } +static void pxa_reset_cb (void *opaque) +{ +PXA2xxState *s = opaque; +cpu_reset (CPU (s->cpu)); +} +/* Initialise a PXA270 integrated chip (ARM based core). */ PXA2xxState *pxa270_init (MemoryRegion *address_space,unsigned int sdram_size,const char *revision)
@@ -2192,6 +2198,8 @@ PXA2xxState *pxa270_init(MemoryRegion *address_space,/* GPIO1 resets the processor */ /* The handler can be overridden by board-specific code */ qdev_connect_gpio_out (s->gpio,1 , s->reset); + +qemu_register_reset (pxa_reset_cb, s);return s; }
Signature · 1 line
2.1.4