[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] arm/zynq: Add software reset
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [PATCH] arm/zynq: Add software reset |
Date: |
Wed, 5 Feb 2014 15:38:07 +1000 |
CC PMM for target-arm queue relevance.
On Mon, Feb 3, 2014 at 5:46 PM, Sebastian Huber
<address@hidden> wrote:
> Signed-off-by: Sebastian Huber <address@hidden>
> ---
> hw/misc/zynq_slcr.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c
> index e42a5b0..433d439 100644
> --- a/hw/misc/zynq_slcr.c
> +++ b/hw/misc/zynq_slcr.c
> @@ -399,6 +399,9 @@ static void zynq_slcr_write(void *opaque, hwaddr offset,
> goto bad_reg;
> }
> s->reset[(offset - 0x200) / 4] = val;
> + if (offset == 0x200 && (val & 0x1) != 0) {
Despite the local coding style being something of a mess we should be
macroifying the masks the be self documenting.
#define R_PSS_RST_CTRL_SOFT_RST 0x1
Ideally we convert the address offsets (eg "0x200") as well, but thast
a major change pattern for another day so let that one go.
you can also drop the != 0 check.
With fixes,
Reviewed-by: Peter Crosthwaite <address@hidden>
Regards,
Peter
> + qemu_system_reset_request();
> + }
> break;
> case 0x300:
> s->apu_ctrl = val;
> --
> 1.7.7
>
>