qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] arm/zynq: Add software reset
@ 2014-02-05  7:31 Sebastian Huber
  2014-02-08 14:10 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Huber @ 2014-02-05  7:31 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, peter.crosthwaite, Sebastian Huber

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---
 hw/misc/zynq_slcr.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c
index e42a5b0..d1cc233 100644
--- a/hw/misc/zynq_slcr.c
+++ b/hw/misc/zynq_slcr.c
@@ -31,6 +31,8 @@
 #define XILINX_LOCK_KEY 0x767b
 #define XILINX_UNLOCK_KEY 0xdf0d
 
+#define R_PSS_RST_CTRL_SOFT_RST 0x1
+
 typedef enum {
   ARM_PLL_CTRL,
   DDR_PLL_CTRL,
@@ -399,6 +401,9 @@ static void zynq_slcr_write(void *opaque, hwaddr offset,
                 goto bad_reg;
             }
             s->reset[(offset - 0x200) / 4] = val;
+            if (offset == 0x200 && (val & R_PSS_RST_CTRL_SOFT_RST)) {
+                qemu_system_reset_request();
+            }
             break;
         case 0x300:
             s->apu_ctrl = val;
-- 
1.7.7

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH v2] arm/zynq: Add software reset
  2014-02-05  7:31 [Qemu-devel] [PATCH v2] arm/zynq: Add software reset Sebastian Huber
@ 2014-02-08 14:10 ` Peter Maydell
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2014-02-08 14:10 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: Peter Crosthwaite, QEMU Developers

On 5 February 2014 07:31, Sebastian Huber
<sebastian.huber@embedded-brains.de> wrote:
> Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> ---
>  hw/misc/zynq_slcr.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-

Applied to target-arm.next; thanks. (I have tweaked the
commit message, which is a bit too minimalist for my taste.)

thanks
-- PMM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-08 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05  7:31 [Qemu-devel] [PATCH v2] arm/zynq: Add software reset Sebastian Huber
2014-02-08 14:10 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).