* [PATCH 1/2] mfd: syscon: Support native-endian regmaps
@ 2016-10-14 9:17 ` Paul Burton
0 siblings, 0 replies; 15+ messages in thread
From: Paul Burton @ 2016-10-14 9:17 UTC (permalink / raw)
To: linux-mips
Cc: Paul Burton, Lee Jones, Arnd Bergmann, Guenter Roeck,
Ralf Baechle
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
---
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,
--
2.10.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/2] MIPS: malta: Fixup reboot
@ 2016-10-14 9:17 ` Paul Burton
0 siblings, 0 replies; 15+ messages in thread
From: Paul Burton @ 2016-10-14 9:17 UTC (permalink / raw)
To: linux-mips; +Cc: Paul Burton, Ralf Baechle
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.
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>;
};
};
--
2.10.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 2/2] MIPS: malta: Fixup reboot
@ 2016-10-14 9:17 ` Paul Burton
0 siblings, 0 replies; 15+ messages in thread
From: Paul Burton @ 2016-10-14 9:17 UTC (permalink / raw)
To: linux-mips; +Cc: Paul Burton, Ralf Baechle
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.
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>;
};
};
--
2.10.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [2/2] MIPS: malta: Fixup reboot
2016-10-14 9:17 ` Paul Burton
(?)
@ 2016-10-14 17:39 ` Guenter Roeck
-1 siblings, 0 replies; 15+ messages in thread
From: Guenter Roeck @ 2016-10-14 17:39 UTC (permalink / raw)
To: Paul Burton; +Cc: linux-mips, Ralf Baechle
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>;
> };
> };
>
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH 2/2] MIPS: malta: Fixup reboot
@ 2016-10-25 10:48 ` Maciej W. Rozycki
0 siblings, 0 replies; 15+ messages in thread
From: Maciej W. Rozycki @ 2016-10-25 10:48 UTC (permalink / raw)
To: Paul Burton; +Cc: linux-mips, Ralf Baechle
On Fri, 14 Oct 2016, 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
> ---
Tested-by: Maciej W. Rozycki <macro@imgtec.com>
Maciej
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH 2/2] MIPS: malta: Fixup reboot
@ 2016-10-25 10:48 ` Maciej W. Rozycki
0 siblings, 0 replies; 15+ messages in thread
From: Maciej W. Rozycki @ 2016-10-25 10:48 UTC (permalink / raw)
To: Paul Burton; +Cc: linux-mips, Ralf Baechle
On Fri, 14 Oct 2016, 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
> ---
Tested-by: Maciej W. Rozycki <macro@imgtec.com>
Maciej
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [1/2] mfd: syscon: Support native-endian regmaps
2016-10-14 9:17 ` Paul Burton
(?)
(?)
@ 2016-10-14 17:43 ` Guenter Roeck
-1 siblings, 0 replies; 15+ messages in thread
From: Guenter Roeck @ 2016-10-14 17:43 UTC (permalink / raw)
To: Paul Burton; +Cc: linux-mips, Lee Jones, Arnd Bergmann, Ralf Baechle
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,
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] mfd: syscon: Support native-endian regmaps
@ 2016-10-25 10:47 ` Maciej W. Rozycki
0 siblings, 0 replies; 15+ messages in thread
From: Maciej W. Rozycki @ 2016-10-25 10:47 UTC (permalink / raw)
To: Paul Burton
Cc: linux-mips, Lee Jones, Arnd Bergmann, Guenter Roeck, Ralf Baechle
On Fri, 14 Oct 2016, 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
> ---
Tested-by: Maciej W. Rozycki <macro@imgtec.com>
Maciej
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] mfd: syscon: Support native-endian regmaps
@ 2016-10-25 10:47 ` Maciej W. Rozycki
0 siblings, 0 replies; 15+ messages in thread
From: Maciej W. Rozycki @ 2016-10-25 10:47 UTC (permalink / raw)
To: Paul Burton
Cc: linux-mips, Lee Jones, Arnd Bergmann, Guenter Roeck, Ralf Baechle
On Fri, 14 Oct 2016, 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
> ---
Tested-by: Maciej W. Rozycki <macro@imgtec.com>
Maciej
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] mfd: syscon: Support native-endian regmaps
2016-10-14 9:17 ` Paul Burton
` (3 preceding siblings ...)
(?)
@ 2016-10-26 13:58 ` Lee Jones
-1 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2016-10-26 13:58 UTC (permalink / raw)
To: Paul Burton; +Cc: linux-mips, Arnd Bergmann, Guenter Roeck, Ralf Baechle
On Fri, 14 Oct 2016, 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
> ---
> drivers/mfd/syscon.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Applied, thanks.
> 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,
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH 1/2] mfd: syscon: Support native-endian regmaps
2016-10-14 9:17 ` Paul Burton
` (4 preceding siblings ...)
(?)
@ 2016-11-06 5:09 ` Guenter Roeck
-1 siblings, 0 replies; 15+ messages in thread
From: Guenter Roeck @ 2016-11-06 5:09 UTC (permalink / raw)
To: Paul Burton, linux-mips; +Cc: Lee Jones, Arnd Bergmann, Ralf Baechle
On 10/14/2016 02:17 AM, 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
> ---
> 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,
>
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH 1/2] mfd: syscon: Support native-endian regmaps
2016-10-14 9:17 ` Paul Burton
` (5 preceding siblings ...)
(?)
@ 2016-11-06 5:12 ` Guenter Roeck
2016-11-07 9:41 ` Lee Jones
-1 siblings, 1 reply; 15+ messages in thread
From: Guenter Roeck @ 2016-11-06 5:12 UTC (permalink / raw)
To: Paul Burton, linux-mips; +Cc: Lee Jones, Arnd Bergmann, Ralf Baechle
On 10/14/2016 02:17 AM, 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.
>
Any chance to get this patch applied to mainline ? It is in -next, but
big endian mips malta images still fail to reboot in mainline.
Thanks,
Guenter
> 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
> ---
> 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,
>
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH 1/2] mfd: syscon: Support native-endian regmaps
2016-11-06 5:12 ` Guenter Roeck
@ 2016-11-07 9:41 ` Lee Jones
0 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2016-11-07 9:41 UTC (permalink / raw)
To: Guenter Roeck; +Cc: Paul Burton, linux-mips, Arnd Bergmann, Ralf Baechle
On Sat, 05 Nov 2016, Guenter Roeck wrote:
> On 10/14/2016 02:17 AM, 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.
> >
>
> Any chance to get this patch applied to mainline ? It is in -next, but
> big endian mips malta images still fail to reboot in mainline.
Applied to -fixes.
> > 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
> > ---
> > 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,
> >
>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 15+ messages in thread