All of lore.kernel.org
 help / color / mirror / Atom feed
* Commit 'MIPS: Malta: Use syscon-reboot driver to reboot' in -next and changed reset behavior
@ 2016-10-14  7:09 Guenter Roeck
  2016-10-14  9:17   ` Paul Burton
  0 siblings, 1 reply; 15+ messages in thread
From: Guenter Roeck @ 2016-10-14  7:09 UTC (permalink / raw)
  To: Paul Burton; +Cc: Linux MIPS Mailing List, linux-kernel, Ralf Baechle

Hi Paul,

with commit 'MIPS: Malta: Use syscon-reboot driver to reboot' in -next, the value written
into the reset register is changed from 0x42 to 0x4d. Is this change on purpose,
or a copy-and-paste error from the SEAD3 changes ?

Reason for asking is that qemu only accepts a value of 0x42, which causes the reset
in qemu to fail. Question is if qemu or the new reset value is wrong.

What values are valid ? Can you shed a light ?

Second question is endianness. Even when changing the value to 0x42, the system still
did not reboot for me. After a while I found out that I needed to add "big-endian;"
to the syscon node when running a big endian image. However, when running a
little endian image, "big-endian" did not work. In that case, I had to use the default,
which is little endian.

Which makes me really wonder how this is expected to work. Does the real hardware accept
any value written into the reset register ?

Thanks,
Guenter

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

* [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 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: [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 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: [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

end of thread, other threads:[~2016-11-07  9:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [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

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.