All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [2/2] MIPS: malta: Fixup reboot
Date: Fri, 14 Oct 2016 10:39:10 -0700	[thread overview]
Message-ID: <20161014173910.GA28660@roeck-us.net> (raw)
In-Reply-To: <20161014091732.27536-2-paul.burton@imgtec.com>

On Fri, Oct 14, 2016 at 10:17:32AM +0100, Paul Burton wrote:
> Commit 10b6ea0959de ("MIPS: Malta: Use syscon-reboot driver to reboot")
> converted the Malta board to use the generic syscon-reboot driver to
> handle reboots, but incorrectly used the value 0x4d rather than 0x42 as
> the magic to write to the reboot register.
> 
> I also incorrectly believed that syscon/regmap would default to native
> endianness, but this isn't the case. Force this by specifying with a
> native-endian property in the devicetree.
> 
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> Fixes: 10b6ea0959de ("MIPS: Malta: Use syscon-reboot driver to reboot")
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: linux-mips@linux-mips.org
> ---
> Hi Guenter,
> 
> Apologies for that! Hopefully this fixes it up for you. I've tested QEMU
> in both endiannesses & it now works for me, as well as real hardware.
> 
Fixes the problem if applied together with 'mfd: syscon: Support
native-endian regmaps'. Both patches are needed.

Tested-by: Guenter Roeck <linux@roeck-us.net>

Thanks,
Guenter

> Hi Ralf,
> 
> Apologies for the brokenness! Feel free to apply this as a fixup if it's
> not too late, otherwise it would be great to get into mainline ASAP.
> ---
>  arch/mips/boot/dts/mti/malta.dts | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/mips/boot/dts/mti/malta.dts b/arch/mips/boot/dts/mti/malta.dts
> index 85468bf..48f696a 100644
> --- a/arch/mips/boot/dts/mti/malta.dts
> +++ b/arch/mips/boot/dts/mti/malta.dts
> @@ -94,12 +94,13 @@
>  	fpga_regs: system-controller@1f000000 {
>  		compatible = "mti,malta-fpga", "syscon", "simple-mfd";
>  		reg = <0x1f000000 0x1000>;
> +		native-endian;
>  
>  		reboot {
>  			compatible = "syscon-reboot";
>  			regmap = <&fpga_regs>;
>  			offset = <0x500>;
> -			mask = <0x4d>;
> +			mask = <0x42>;
>  		};
>  	};
>  

  reply	other threads:[~2016-10-14 17:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-14  7:09 Commit 'MIPS: Malta: Use syscon-reboot driver to reboot' in -next and changed reset behavior Guenter Roeck
2016-10-14  9:17 ` [PATCH 1/2] mfd: syscon: Support native-endian regmaps Paul Burton
2016-10-14  9:17   ` Paul Burton
2016-10-14  9:17   ` [PATCH 2/2] MIPS: malta: Fixup reboot Paul Burton
2016-10-14  9:17     ` Paul Burton
2016-10-14 17:39     ` Guenter Roeck [this message]
2016-10-25 10:48     ` Maciej W. Rozycki
2016-10-25 10:48       ` Maciej W. Rozycki
2016-10-14 17:43   ` [1/2] mfd: syscon: Support native-endian regmaps Guenter Roeck
2016-10-25 10:47   ` [PATCH 1/2] " Maciej W. Rozycki
2016-10-25 10:47     ` Maciej W. Rozycki
2016-10-26 13:58   ` Lee Jones
2016-11-06  5:09   ` Guenter Roeck
2016-11-06  5:12   ` Guenter Roeck
2016-11-07  9:41     ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161014173910.GA28660@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-mips@linux-mips.org \
    --cc=paul.burton@imgtec.com \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.