[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH] pxa2xx: Add a reset handler to reset the ARM CPU.
From: |
Vijay Kumar B |
Subject: |
[Qemu-arm] [PATCH] pxa2xx: Add a reset handler to reset the ARM CPU. |
Date: |
Fri, 30 Sep 2016 11:24:07 +0530 |
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. <address@hidden>
Reviewed-by: Deepak S. <address@hidden>
---
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-arm] [PATCH] pxa2xx: Add a reset handler to reset the ARM CPU.,
Vijay Kumar B <=