Skip to contentSkip to conversation

pxa2xx: Add a reset handler to reset the ARM CPU.

PATCH New Vijay Kumar B 1 participant 1 message Sep 30, 2016

lore
Share & tools
lore
#0 lore raw

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.

---
 hw/arm/pxa2xx.c | 8 ++++++++
 1 file changed, 8 insertions(+)
hw/arm/pxa2xx.c +8 -0
index 0241e07..08223b7 100644
@@ -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