Received: from eggs.gnu.org ([2001:4830:134:3::10]:56278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpqmU-0001VB-Vu for qemu-devel@nongnu.org; Fri, 30 Sep 2016 01:54:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpqmT-0004JY-1a for qemu-devel@nongnu.org; Fri, 30 Sep 2016 01:54:45 -0400 From: Vijay Kumar B Date: Fri, 30 Sep 2016 11:24:07 +0530 Message-Id: <1475214847-28575-1-git-send-email-vijaykumar@zilogic.com> Subject: [Qemu-devel] [PATCH] pxa2xx: Add a reset handler to reset the ARM CPU. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Vijay Kumar B , balrogg@gmail.com, peter.maydell@linaro.org, qemu-arm@nongnu.org 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. Reviewed-by: Deepak S. --- hw/arm/pxa2xx.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index 0241e07..08223b7 100644 --- a/hw/arm/pxa2xx.c +++ b/hw/arm/pxa2xx.c @@ -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; } -- 2.1.4