From: Guenter Roeck <linux@roeck-us.net>
To: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org, Lee Jones <lee.jones@linaro.org>,
Arnd Bergmann <arnd@arndb.de>, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [1/2] mfd: syscon: Support native-endian regmaps
Date: Fri, 14 Oct 2016 10:43:08 -0700 [thread overview]
Message-ID: <20161014174308.GA22866@roeck-us.net> (raw)
In-Reply-To: <20161014091732.27536-1-paul.burton@imgtec.com>
On Fri, Oct 14, 2016 at 10:17:31AM +0100, Paul Burton wrote:
> The regmap devicetree binding documentation states that a native-endian
> property should be supported as well as big-endian & little-endian,
> however syscon in its duplication of the parsing of these properties
> omits support for native-endian. Fix this by setting
> REGMAP_ENDIAN_NATIVE when a native-endian property is found.
>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: linux-mips@linux-mips.org
Needed for 'MIPS: malta: Fixup reboot' to work.
Tested-by: Guenter Roeck <linux@roeck-us.net>
Makes me wonder though how the other syscon nodes already using
'native-endian' work.
Thanks,
Guenter
> ---
> drivers/mfd/syscon.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
> index 2f2225e..b93fe4c 100644
> --- a/drivers/mfd/syscon.c
> +++ b/drivers/mfd/syscon.c
> @@ -73,8 +73,10 @@ static struct syscon *of_syscon_register(struct device_node *np)
> /* Parse the device's DT node for an endianness specification */
> if (of_property_read_bool(np, "big-endian"))
> syscon_config.val_format_endian = REGMAP_ENDIAN_BIG;
> - else if (of_property_read_bool(np, "little-endian"))
> + else if (of_property_read_bool(np, "little-endian"))
> syscon_config.val_format_endian = REGMAP_ENDIAN_LITTLE;
> + else if (of_property_read_bool(np, "native-endian"))
> + syscon_config.val_format_endian = REGMAP_ENDIAN_NATIVE;
>
> /*
> * search for reg-io-width property in DT. If it is not provided,
next prev parent reply other threads:[~2016-10-14 17:43 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 ` [2/2] " Guenter Roeck
2016-10-25 10:48 ` [PATCH 2/2] " Maciej W. Rozycki
2016-10-25 10:48 ` Maciej W. Rozycki
2016-10-14 17:43 ` Guenter Roeck [this message]
2016-10-25 10:47 ` [PATCH 1/2] mfd: syscon: Support native-endian regmaps 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=20161014174308.GA22866@roeck-us.net \
--to=linux@roeck-us.net \
--cc=arnd@arndb.de \
--cc=lee.jones@linaro.org \
--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.