Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1279125 > unrolled thread

[PATCH 0/4] ARM: dt: mvebu: ix4-300d: NAND cleanup and ECC

Started bySebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
First post2015-11-28 12:20 +0100
Last post2015-11-30 15:20 +0100
Articles 19 — 5 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/4] ARM: dt: mvebu: ix4-300d: NAND cleanup and ECC Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> - 2015-11-28 12:20 +0100
    [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> - 2015-11-28 12:20 +0100
      Re: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND  flash Andrew Lunn <andrew@lunn.ch> - 2015-11-28 18:10 +0100
      Re: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to  NAND flash Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - 2015-11-29 15:40 +0100
        Re: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND  flash Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> - 2015-11-30 09:40 +0100
          Re: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-11-30 15:30 +0100
    [PATCH 3/4] ARM: dt: mvebu: ix4-300d: Cleanup NAND partition ranges Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> - 2015-11-28 12:20 +0100
      Re: [PATCH 3/4] ARM: dt: mvebu: ix4-300d: Cleanup NAND partition  ranges Andrew Lunn <andrew@lunn.ch> - 2015-11-28 18:10 +0100
        Re: [PATCH 3/4] ARM: dt: mvebu: ix4-300d: Cleanup NAND partition ranges Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-11-30 15:30 +0100
    [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> - 2015-11-28 12:20 +0100
      Re: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash  partition Andrew Lunn <andrew@lunn.ch> - 2015-11-28 18:00 +0100
        Re: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash  partition Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> - 2015-11-28 18:40 +0100
          Re: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition Benoit Masson <benoitm@perenite.com> - 2015-11-28 21:40 +0100
      Re: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash  partition Andrew Lunn <andrew@lunn.ch> - 2015-11-28 22:20 +0100
        Re: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-11-30 15:20 +0100
    [PATCH 2/4] ARM: dt: mvebu: ix4-300d: move partitions to partition sub-node Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> - 2015-11-28 12:20 +0100
      Re: [PATCH 2/4] ARM: dt: mvebu: ix4-300d: move partitions to  partition sub-node Andrew Lunn <andrew@lunn.ch> - 2015-11-28 18:10 +0100
        Re: [PATCH 2/4] ARM: dt: mvebu: ix4-300d: move partitions to  partition sub-node Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> - 2015-11-28 18:40 +0100
      Re: [PATCH 2/4] ARM: dt: mvebu: ix4-300d: move partitions to partition sub-node Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-11-30 15:20 +0100

#1279125 — [PATCH 0/4] ARM: dt: mvebu: ix4-300d: NAND cleanup and ECC

FromSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Date2015-11-28 12:20 +0100
Subject[PATCH 0/4] ARM: dt: mvebu: ix4-300d: NAND cleanup and ECC
Message-ID<qzLHQ-8cc-1@gated-at.bofh.it>
This is a list of patches cleaning up some things I noticed while
working with barebox boot loader support for NAND node of Lenovo ix4-300d.

Patch 1 removes a flash partition node for the whole flash. The flash
as a whole is already best represented by the NAND device itself.

Patch 2 moves the stock flash partitions to a partitions sub-node. This
will also ease removal of stock flash partition layout for barebox and
other boot loaders.

Patch 3 cleans the flash partitions ranges by prefixing them to 32-bit
lower-case hex numbers. Also, a stale 'x' is removed from one partition
name offset.

Patch 4 finally adds ECC properties for 4-bit BCH ECC used by the ix4-300d
flash.

Sebastian

Sebastian Hesselbarth (4):
  ARM: dt: mvebu: ix4-300d: remove whole flash partition
  ARM: dt: mvebu: ix4-300d: move partitions to partition sub-node
  ARM: dt: mvebu: ix4-300d: Cleanup NAND partition ranges
  ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash

 arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 76 +++++++++++++------------
 1 file changed, 39 insertions(+), 37 deletions(-)

---
Cc: Jason Cooper <jason@lakedaemon.net> 
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com> 
Cc: Rob Herring <robh+dt@kernel.org> 
Cc: Pawel Moll <pawel.moll@arm.com> 
Cc: Mark Rutland <mark.rutland@arm.com> 
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> 
Cc: Kumar Gala <galak@codeaurora.org> 
Cc: Russell King <linux@arm.linux.org.uk> 
Cc: Benoit Masson <yahoo@perenite.com>
Cc: linux-arm-kernel@lists.infradead.org 
Cc: devicetree@vger.kernel.org 
Cc: linux-kernel@vger.kernel.org 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1279126 — [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash

FromSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Date2015-11-28 12:20 +0100
Subject[PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash
Message-ID<qzLHQ-8cc-9@gated-at.bofh.it>
In reply to#1279125
The NAND device found on Lenovo ix4-300d uses 4-bit BCH ECC protection.
Add the corresponding properties to the NAND node.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: Jason Cooper <jason@lakedaemon.net> 
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com> 
Cc: Rob Herring <robh+dt@kernel.org> 
Cc: Pawel Moll <pawel.moll@arm.com> 
Cc: Mark Rutland <mark.rutland@arm.com> 
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> 
Cc: Kumar Gala <galak@codeaurora.org> 
Cc: Russell King <linux@arm.linux.org.uk> 
Cc: Benoit Masson <yahoo@perenite.com>
Cc: linux-arm-kernel@lists.infradead.org 
Cc: devicetree@vger.kernel.org 
Cc: linux-kernel@vger.kernel.org 
---
 arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
index 13cf69a8d0fb..e4bf83c4bd2f 100644
--- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
+++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
@@ -150,6 +150,8 @@
 				marvell,nand-keep-config;
 				marvell,nand-enable-arbiter;
 				nand-on-flash-bbt;
+				nand-ecc-strength = <4>;
+				nand-ecc-step-size = <512>;
 
 				partitions {
 					#address-cells = <1>;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279180 — Re: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash

FromAndrew Lunn <andrew@lunn.ch>
Date2015-11-28 18:10 +0100
SubjectRe: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash
Message-ID<qzRax-3by-5@gated-at.bofh.it>
In reply to#1279126
On Sat, Nov 28, 2015 at 12:14:08PM +0100, Sebastian Hesselbarth wrote:
> The NAND device found on Lenovo ix4-300d uses 4-bit BCH ECC protection.
> Add the corresponding properties to the NAND node.
> 
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>

Acked-by: Andrew Lunn <andrew@lunn.ch>

	  Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279349 — Re: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash

FromThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date2015-11-29 15:40 +0100
SubjectRe: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash
Message-ID<qAbiV-7ji-7@gated-at.bofh.it>
In reply to#1279126
Sebastian,

Adding Ezequiel Garcia in Cc.

On Sat, 28 Nov 2015 12:14:08 +0100, Sebastian Hesselbarth wrote:
> The NAND device found on Lenovo ix4-300d uses 4-bit BCH ECC protection.
> Add the corresponding properties to the NAND node.

If the ONFI information from the NAND flash say that it requires 4 bits
per 512, then there should be no need to add this information to the
Device Tree as the pxa3xx_nand driver by default uses the ONFI
information.

Those properties are only needed when for some reason the vendor has
chosen to use a ECC strength that doesn't match with the one advertised
by the flash in its ONFI information (either stronger or weaker). But
in this case, your commit log is confusing, because it says that the
"NAND device ... uses 4-bit BCH ECC protection". If it really does,
then the patch is not needed :-)

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279679 — Re: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash

FromSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Date2015-11-30 09:40 +0100
SubjectRe: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash
Message-ID<qAsa6-1cU-21@gated-at.bofh.it>
In reply to#1279349
On 29.11.2015 15:35, Thomas Petazzoni wrote:
> Adding Ezequiel Garcia in Cc.
>
> On Sat, 28 Nov 2015 12:14:08 +0100, Sebastian Hesselbarth wrote:
>> The NAND device found on Lenovo ix4-300d uses 4-bit BCH ECC protection.
>> Add the corresponding properties to the NAND node.
>
> If the ONFI information from the NAND flash say that it requires 4 bits
> per 512, then there should be no need to add this information to the
> Device Tree as the pxa3xx_nand driver by default uses the ONFI
> information.

Thomas,

as said in the cover letter, this is also DT cleanup with barebox
bootloader in mind. I do not accept what Linux' pxa3xx_nand driver
is doing as a reference here ;)

> Those properties are only needed when for some reason the vendor has
> chosen to use a ECC strength that doesn't match with the one advertised
> by the flash in its ONFI information (either stronger or weaker). But
> in this case, your commit log is confusing, because it says that the
> "NAND device ... uses 4-bit BCH ECC protection". If it really does,
> then the patch is not needed :-)

I agree that if ONFI is already advertising 4/512 ECC (and it is), we
do not need the properties. Anyway, IIRC barebox does not yet properly
parse ONFI or at least it does not derive minimum ECC settings from it.

I'll have to have a closer look at barebox' ONFI parsing capabilites
and can live with this patch not applied even though it does no harm.

Sebastian

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279936 — Re: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash

FromGregory CLEMENT <gregory.clement@free-electrons.com>
Date2015-11-30 15:30 +0100
SubjectRe: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash
Message-ID<qAxCN-4L7-13@gated-at.bofh.it>
In reply to#1279679
Hi Sebastian,
 
 On lun., nov. 30 2015, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> wrote:

> On 29.11.2015 15:35, Thomas Petazzoni wrote:
>> Adding Ezequiel Garcia in Cc.
>>
>> On Sat, 28 Nov 2015 12:14:08 +0100, Sebastian Hesselbarth wrote:
>>> The NAND device found on Lenovo ix4-300d uses 4-bit BCH ECC protection.
>>> Add the corresponding properties to the NAND node.
>>
>> If the ONFI information from the NAND flash say that it requires 4 bits
>> per 512, then there should be no need to add this information to the
>> Device Tree as the pxa3xx_nand driver by default uses the ONFI
>> information.
>
> Thomas,
>
> as said in the cover letter, this is also DT cleanup with barebox
> bootloader in mind. I do not accept what Linux' pxa3xx_nand driver
> is doing as a reference here ;)
>
>> Those properties are only needed when for some reason the vendor has
>> chosen to use a ECC strength that doesn't match with the one advertised
>> by the flash in its ONFI information (either stronger or weaker). But
>> in this case, your commit log is confusing, because it says that the
>> "NAND device ... uses 4-bit BCH ECC protection". If it really does,
>> then the patch is not needed :-)
>
> I agree that if ONFI is already advertising 4/512 ECC (and it is), we
> do not need the properties. Anyway, IIRC barebox does not yet properly
> parse ONFI or at least it does not derive minimum ECC settings from it.
>
> I'll have to have a closer look at barebox' ONFI parsing capabilites
> and can live with this patch not applied even though it does no harm.

So for now, I don't apply it.

Thanks,

Gregory

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279127 — [PATCH 3/4] ARM: dt: mvebu: ix4-300d: Cleanup NAND partition ranges

FromSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Date2015-11-28 12:20 +0100
Subject[PATCH 3/4] ARM: dt: mvebu: ix4-300d: Cleanup NAND partition ranges
Message-ID<qzLHQ-8cc-13@gated-at.bofh.it>
In reply to#1279125
Prefix all partition reg properties to 32-bit to ease readability.
While at it, also remove a stale x in front of boot partition
offset and make some upper-case hex numbers lower-case.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: Jason Cooper <jason@lakedaemon.net> 
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com> 
Cc: Rob Herring <robh+dt@kernel.org> 
Cc: Pawel Moll <pawel.moll@arm.com> 
Cc: Mark Rutland <mark.rutland@arm.com> 
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> 
Cc: Kumar Gala <galak@codeaurora.org> 
Cc: Russell King <linux@arm.linux.org.uk> 
Cc: Benoit Masson <yahoo@perenite.com>
Cc: linux-arm-kernel@lists.infradead.org 
Cc: devicetree@vger.kernel.org 
Cc: linux-kernel@vger.kernel.org 
---
 arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
index 76781fd18624..13cf69a8d0fb 100644
--- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
+++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
@@ -157,35 +157,35 @@
 
 					partition@0 {
 						label = "u-boot";
-						reg = <0x0000000 0xe0000>;
+						reg = <0x00000000 0x000e0000>;
 						read-only;
 					};
 
 					partition@e0000 {
 						label = "u-boot-env";
-						reg = <0xe0000 0x20000>;
+						reg = <0x000e0000 0x00020000>;
 						read-only;
 					};
 
 					partition@100000 {
 						label = "u-boot-env2";
-						reg = <0x100000 0x20000>;
+						reg = <0x00100000 0x00020000>;
 						read-only;
 					};
 
 					partition@120000 {
 						label = "zImage";
-						reg = <0x120000 0x400000>;
+						reg = <0x00120000 0x00400000>;
 					};
 
 					partition@520000 {
 						label = "initrd";
-						reg = <0x520000 0x400000>;
+						reg = <0x00520000 0x00400000>;
 					};
 
-					partition@xE00000 {
+					partition@e00000 {
 						label = "boot";
-						reg = <0xE00000 0x3F200000>;
+						reg = <0x00e00000 0x3f200000>;
 					};
 				};
 			};
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279181 — Re: [PATCH 3/4] ARM: dt: mvebu: ix4-300d: Cleanup NAND partition ranges

FromAndrew Lunn <andrew@lunn.ch>
Date2015-11-28 18:10 +0100
SubjectRe: [PATCH 3/4] ARM: dt: mvebu: ix4-300d: Cleanup NAND partition ranges
Message-ID<qzRax-3by-7@gated-at.bofh.it>
In reply to#1279127
On Sat, Nov 28, 2015 at 12:14:07PM +0100, Sebastian Hesselbarth wrote:
> Prefix all partition reg properties to 32-bit to ease readability.
> While at it, also remove a stale x in front of boot partition
> offset and make some upper-case hex numbers lower-case.
> 
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>

Acked-by: Andrew Lunn <andrew@lunn.ch>

	  Andrew

> ---
> Cc: Jason Cooper <jason@lakedaemon.net> 
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Gregory Clement <gregory.clement@free-electrons.com> 
> Cc: Rob Herring <robh+dt@kernel.org> 
> Cc: Pawel Moll <pawel.moll@arm.com> 
> Cc: Mark Rutland <mark.rutland@arm.com> 
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> 
> Cc: Kumar Gala <galak@codeaurora.org> 
> Cc: Russell King <linux@arm.linux.org.uk> 
> Cc: Benoit Masson <yahoo@perenite.com>
> Cc: linux-arm-kernel@lists.infradead.org 
> Cc: devicetree@vger.kernel.org 
> Cc: linux-kernel@vger.kernel.org 
> ---
>  arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
> index 76781fd18624..13cf69a8d0fb 100644
> --- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
> +++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
> @@ -157,35 +157,35 @@
>  
>  					partition@0 {
>  						label = "u-boot";
> -						reg = <0x0000000 0xe0000>;
> +						reg = <0x00000000 0x000e0000>;
>  						read-only;
>  					};
>  
>  					partition@e0000 {
>  						label = "u-boot-env";
> -						reg = <0xe0000 0x20000>;
> +						reg = <0x000e0000 0x00020000>;
>  						read-only;
>  					};
>  
>  					partition@100000 {
>  						label = "u-boot-env2";
> -						reg = <0x100000 0x20000>;
> +						reg = <0x00100000 0x00020000>;
>  						read-only;
>  					};
>  
>  					partition@120000 {
>  						label = "zImage";
> -						reg = <0x120000 0x400000>;
> +						reg = <0x00120000 0x00400000>;
>  					};
>  
>  					partition@520000 {
>  						label = "initrd";
> -						reg = <0x520000 0x400000>;
> +						reg = <0x00520000 0x00400000>;
>  					};
>  
> -					partition@xE00000 {
> +					partition@e00000 {
>  						label = "boot";
> -						reg = <0xE00000 0x3F200000>;
> +						reg = <0x00e00000 0x3f200000>;
>  					};
>  				};
>  			};
> -- 
> 2.1.4
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279934 — Re: [PATCH 3/4] ARM: dt: mvebu: ix4-300d: Cleanup NAND partition ranges

FromGregory CLEMENT <gregory.clement@free-electrons.com>
Date2015-11-30 15:30 +0100
SubjectRe: [PATCH 3/4] ARM: dt: mvebu: ix4-300d: Cleanup NAND partition ranges
Message-ID<qAxCN-4L7-9@gated-at.bofh.it>
In reply to#1279181
Hi Sebastian and Andrew,
 
 On sam., nov. 28 2015, Andrew Lunn <andrew@lunn.ch> wrote:

> On Sat, Nov 28, 2015 at 12:14:07PM +0100, Sebastian Hesselbarth wrote:
>> Prefix all partition reg properties to 32-bit to ease readability.
>> While at it, also remove a stale x in front of boot partition
>> offset and make some upper-case hex numbers lower-case.
>> 
>> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
>
> Acked-by: Andrew Lunn <andrew@lunn.ch>

Applied on mvebu/dt

Thanks,

Gregory

>
> 	  Andrew
>
>> ---
>> Cc: Jason Cooper <jason@lakedaemon.net> 
>> Cc: Andrew Lunn <andrew@lunn.ch>
>> Cc: Gregory Clement <gregory.clement@free-electrons.com> 
>> Cc: Rob Herring <robh+dt@kernel.org> 
>> Cc: Pawel Moll <pawel.moll@arm.com> 
>> Cc: Mark Rutland <mark.rutland@arm.com> 
>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> 
>> Cc: Kumar Gala <galak@codeaurora.org> 
>> Cc: Russell King <linux@arm.linux.org.uk> 
>> Cc: Benoit Masson <yahoo@perenite.com>
>> Cc: linux-arm-kernel@lists.infradead.org 
>> Cc: devicetree@vger.kernel.org 
>> Cc: linux-kernel@vger.kernel.org 
>> ---
>>  arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 14 +++++++-------
>>  1 file changed, 7 insertions(+), 7 deletions(-)
>> 
>> diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
>> index 76781fd18624..13cf69a8d0fb 100644
>> --- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
>> +++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
>> @@ -157,35 +157,35 @@
>>  
>>  					partition@0 {
>>  						label = "u-boot";
>> -						reg = <0x0000000 0xe0000>;
>> +						reg = <0x00000000 0x000e0000>;
>>  						read-only;
>>  					};
>>  
>>  					partition@e0000 {
>>  						label = "u-boot-env";
>> -						reg = <0xe0000 0x20000>;
>> +						reg = <0x000e0000 0x00020000>;
>>  						read-only;
>>  					};
>>  
>>  					partition@100000 {
>>  						label = "u-boot-env2";
>> -						reg = <0x100000 0x20000>;
>> +						reg = <0x00100000 0x00020000>;
>>  						read-only;
>>  					};
>>  
>>  					partition@120000 {
>>  						label = "zImage";
>> -						reg = <0x120000 0x400000>;
>> +						reg = <0x00120000 0x00400000>;
>>  					};
>>  
>>  					partition@520000 {
>>  						label = "initrd";
>> -						reg = <0x520000 0x400000>;
>> +						reg = <0x00520000 0x00400000>;
>>  					};
>>  
>> -					partition@xE00000 {
>> +					partition@e00000 {
>>  						label = "boot";
>> -						reg = <0xE00000 0x3F200000>;
>> +						reg = <0x00e00000 0x3f200000>;
>>  					};
>>  				};
>>  			};
>> -- 
>> 2.1.4
>> 

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279129 — [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition

FromSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Date2015-11-28 12:20 +0100
Subject[PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition
Message-ID<qzLHQ-8cc-11@gated-at.bofh.it>
In reply to#1279125
Current NAND node has an additional flash partition for the whole
flash overlapping with real partitions. Remove this partition as
the whole flash is already represented by the NAND device itself.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Benoit Masson <yahoo@perenite.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
index 58b500873bfd..30a0a6eac645 100644
--- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
+++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
@@ -183,11 +183,6 @@
 					label = "boot";
 					reg = <0xE00000 0x3F200000>;
 				};
-
-				partition@flash {
-					label = "flash";
-					reg = <0x0 0x40000000>;
-				};
 			};
 		};
 	};
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279179 — Re: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition

FromAndrew Lunn <andrew@lunn.ch>
Date2015-11-28 18:00 +0100
SubjectRe: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition
Message-ID<qzR0R-2SW-7@gated-at.bofh.it>
In reply to#1279129
On Sat, Nov 28, 2015 at 12:14:05PM +0100, Sebastian Hesselbarth wrote:
> Current NAND node has an additional flash partition for the whole
> flash overlapping with real partitions. Remove this partition as
> the whole flash is already represented by the NAND device itself.

If i remember correctly, we discussed this when the contribution was
made. I think the stock firmware might use this for applying updates.
Maybe Benoit can comment?

If so, removing this will break compatibility with stock firmware. Do
we want to do that? There are a few other mvebu dts files with a
partition spanning the whole flash. Should we remove them as well?

	      Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279188 — Re: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition

FromSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Date2015-11-28 18:40 +0100
SubjectRe: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition
Message-ID<qzRDA-3lI-17@gated-at.bofh.it>
In reply to#1279179
On 28.11.2015 17:52, Andrew Lunn wrote:
> On Sat, Nov 28, 2015 at 12:14:05PM +0100, Sebastian Hesselbarth wrote:
>> Current NAND node has an additional flash partition for the whole
>> flash overlapping with real partitions. Remove this partition as
>> the whole flash is already represented by the NAND device itself.
> 
> If i remember correctly, we discussed this when the contribution was
> made. I think the stock firmware might use this for applying updates.
> Maybe Benoit can comment?

Yes, please.

> If so, removing this will break compatibility with stock firmware. Do
> we want to do that? There are a few other mvebu dts files with a
> partition spanning the whole flash. Should we remove them as well?

Well, there is already a mtd device that spans the whole flash so
what is the purpose of another "partition" that isn't a part but
all of the device? Actually, I doubt that a FW update will wipe
the flash as a whole, i.e. including boot loader, boot env, user
config.

Anyway, let's see if Benoit can shed some light on this.

FWIW, neither single partitions nor a combined partitions node
should be a direct sub-node of the _controller_ but a NAND
_device_ node instead. Luckily, multi-device systems are not that
common, so I guess we wait with it until such a system pops up for
testing.

Sebastian


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279219 — Re: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition

FromBenoit Masson <benoitm@perenite.com>
Date2015-11-28 21:40 +0100
SubjectRe: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition
Message-ID<qzUrL-5aV-11@gated-at.bofh.it>
In reply to#1279188
From mobile

> Le 28 nov. 2015 à 18:38, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> a écrit :
>
>> On 28.11.2015 17:52, Andrew Lunn wrote:
>>> On Sat, Nov 28, 2015 at 12:14:05PM +0100, Sebastian Hesselbarth wrote:
>>> Current NAND node has an additional flash partition for the whole
>>> flash overlapping with real partitions. Remove this partition as
>>> the whole flash is already represented by the NAND device itself.
>>
>> If i remember correctly, we discussed this when the contribution was
>> made. I think the stock firmware might use this for applying updates.
>> Maybe Benoit can comment?
>
> Yes, please.
From my memory since I'm not running the stock firmware it uses the
MTD device directly. This is safe to remove. I was not very contort
able with this flash dts part it was copied over from a netgear mevbu
device ...

>
>> If so, removing this will break compatibility with stock firmware. Do
>> we want to do that? There are a few other mvebu dts files with a
>> partition spanning the whole flash. Should we remove them as well?
>
> Well, there is already a mtd device that spans the whole flash so
> what is the purpose of another "partition" that isn't a part but
> all of the device? Actually, I doubt that a FW update will wipe
> the flash as a whole, i.e. including boot loader, boot env, user
> config.
>
> Anyway, let's see if Benoit can shed some light on this.
>
> FWIW, neither single partitions nor a combined partitions node
> should be a direct sub-node of the _controller_ but a NAND
> _device_ node instead. Luckily, multi-device systems are not that
> common, so I guess we wait with it until such a system pops up for
> testing.
>
> Sebastian
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279225 — Re: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition

FromAndrew Lunn <andrew@lunn.ch>
Date2015-11-28 22:20 +0100
SubjectRe: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition
Message-ID<qzV4t-5Ew-3@gated-at.bofh.it>
In reply to#1279129
>On Sat, Nov 28, 2015 at 12:14:05PM +0100, Sebastian Hesselbarth wrote:
> Current NAND node has an additional flash partition for the whole
> flash overlapping with real partitions. Remove this partition as
> the whole flash is already represented by the NAND device itself.
> 
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>

Given Benoit comment

Acked-by: Andrew Lunn <andrew@lunn.ch>

	  Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279931 — Re: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition

FromGregory CLEMENT <gregory.clement@free-electrons.com>
Date2015-11-30 15:20 +0100
SubjectRe: [PATCH 1/4] ARM: dt: mvebu: ix4-300d: remove whole flash partition
Message-ID<qAxta-4HX-67@gated-at.bofh.it>
In reply to#1279225
Hi Sebastian and Andrew,
 
 On sam., nov. 28 2015, Andrew Lunn <andrew@lunn.ch> wrote:

>>On Sat, Nov 28, 2015 at 12:14:05PM +0100, Sebastian Hesselbarth wrote:
>> Current NAND node has an additional flash partition for the whole
>> flash overlapping with real partitions. Remove this partition as
>> the whole flash is already represented by the NAND device itself.
>> 
>> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
>
> Given Benoit comment
>
> Acked-by: Andrew Lunn <andrew@lunn.ch>


Applied on mvebu/dt

Thanks,

Gregory


>
> 	  Andrew

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279130 — [PATCH 2/4] ARM: dt: mvebu: ix4-300d: move partitions to partition sub-node

FromSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Date2015-11-28 12:20 +0100
Subject[PATCH 2/4] ARM: dt: mvebu: ix4-300d: move partitions to partition sub-node
Message-ID<qzLHQ-8cc-15@gated-at.bofh.it>
In reply to#1279125
NAND flash partitions should be part of a partitions sub-node
not the flash node itself. Move the partitions which will also
allow different bootloaders get rid of the stock partitions
easily by removing the partitions node.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: Jason Cooper <jason@lakedaemon.net> 
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com> 
Cc: Rob Herring <robh+dt@kernel.org> 
Cc: Pawel Moll <pawel.moll@arm.com> 
Cc: Mark Rutland <mark.rutland@arm.com> 
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> 
Cc: Kumar Gala <galak@codeaurora.org> 
Cc: Russell King <linux@arm.linux.org.uk> 
Cc: Benoit Masson <yahoo@perenite.com>
Cc: linux-arm-kernel@lists.infradead.org 
Cc: devicetree@vger.kernel.org 
Cc: linux-kernel@vger.kernel.org 
---
 arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 67 +++++++++++++------------
 1 file changed, 36 insertions(+), 31 deletions(-)

diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
index 30a0a6eac645..76781fd18624 100644
--- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
+++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
@@ -151,37 +151,42 @@
 				marvell,nand-enable-arbiter;
 				nand-on-flash-bbt;
 
-				partition@0 {
-					label = "u-boot";
-					reg = <0x0000000 0xe0000>;
-					read-only;
-				};
-
-				partition@e0000 {
-					label = "u-boot-env";
-					reg = <0xe0000 0x20000>;
-					read-only;
-				};
-
-				partition@100000 {
-					label = "u-boot-env2";
-					reg = <0x100000 0x20000>;
-					read-only;
-				};
-
-				partition@120000 {
-					label = "zImage";
-					reg = <0x120000 0x400000>;
-				};
-
-				partition@520000 {
-					label = "initrd";
-					reg = <0x520000 0x400000>;
-				};
-
-				partition@xE00000 {
-					label = "boot";
-					reg = <0xE00000 0x3F200000>;
+				partitions {
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					partition@0 {
+						label = "u-boot";
+						reg = <0x0000000 0xe0000>;
+						read-only;
+					};
+
+					partition@e0000 {
+						label = "u-boot-env";
+						reg = <0xe0000 0x20000>;
+						read-only;
+					};
+
+					partition@100000 {
+						label = "u-boot-env2";
+						reg = <0x100000 0x20000>;
+						read-only;
+					};
+
+					partition@120000 {
+						label = "zImage";
+						reg = <0x120000 0x400000>;
+					};
+
+					partition@520000 {
+						label = "initrd";
+						reg = <0x520000 0x400000>;
+					};
+
+					partition@xE00000 {
+						label = "boot";
+						reg = <0xE00000 0x3F200000>;
+					};
 				};
 			};
 		};
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279182 — Re: [PATCH 2/4] ARM: dt: mvebu: ix4-300d: move partitions to partition sub-node

FromAndrew Lunn <andrew@lunn.ch>
Date2015-11-28 18:10 +0100
SubjectRe: [PATCH 2/4] ARM: dt: mvebu: ix4-300d: move partitions to partition sub-node
Message-ID<qzRax-3by-15@gated-at.bofh.it>
In reply to#1279130
On Sat, Nov 28, 2015 at 12:14:06PM +0100, Sebastian Hesselbarth wrote:
> NAND flash partitions should be part of a partitions sub-node
> not the flash node itself. Move the partitions which will also
> allow different bootloaders get rid of the stock partitions
> easily by removing the partitions node.
> 
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>


Humm, did not know that. Quoting Documentation/devicetree/bindings/mtd/partition.txt:

      The partition table should be a subnode of the mtd node and
      should be named 'partitions'. Partitions are defined in subnodes
      of the partitions node.

      For backwards compatibility partitions as direct subnodes of the
      mtd device are supported. This use is discouraged.

It also looks like none of the other MVEBU maintainers know that
either, since a quick look at the .dts files shows very few have a
partitions node.

Acked-by: Andrew Lunn <andrew@lunn.ch>

Thanks
	Andrew

> ---
> Cc: Jason Cooper <jason@lakedaemon.net> 
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Gregory Clement <gregory.clement@free-electrons.com> 
> Cc: Rob Herring <robh+dt@kernel.org> 
> Cc: Pawel Moll <pawel.moll@arm.com> 
> Cc: Mark Rutland <mark.rutland@arm.com> 
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> 
> Cc: Kumar Gala <galak@codeaurora.org> 
> Cc: Russell King <linux@arm.linux.org.uk> 
> Cc: Benoit Masson <yahoo@perenite.com>
> Cc: linux-arm-kernel@lists.infradead.org 
> Cc: devicetree@vger.kernel.org 
> Cc: linux-kernel@vger.kernel.org 
> ---
>  arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 67 +++++++++++++------------
>  1 file changed, 36 insertions(+), 31 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
> index 30a0a6eac645..76781fd18624 100644
> --- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
> +++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
> @@ -151,37 +151,42 @@
>  				marvell,nand-enable-arbiter;
>  				nand-on-flash-bbt;
>  
> -				partition@0 {
> -					label = "u-boot";
> -					reg = <0x0000000 0xe0000>;
> -					read-only;
> -				};
> -
> -				partition@e0000 {
> -					label = "u-boot-env";
> -					reg = <0xe0000 0x20000>;
> -					read-only;
> -				};
> -
> -				partition@100000 {
> -					label = "u-boot-env2";
> -					reg = <0x100000 0x20000>;
> -					read-only;
> -				};
> -
> -				partition@120000 {
> -					label = "zImage";
> -					reg = <0x120000 0x400000>;
> -				};
> -
> -				partition@520000 {
> -					label = "initrd";
> -					reg = <0x520000 0x400000>;
> -				};
> -
> -				partition@xE00000 {
> -					label = "boot";
> -					reg = <0xE00000 0x3F200000>;
> +				partitions {
> +					#address-cells = <1>;
> +					#size-cells = <1>;
> +
> +					partition@0 {
> +						label = "u-boot";
> +						reg = <0x0000000 0xe0000>;
> +						read-only;
> +					};
> +
> +					partition@e0000 {
> +						label = "u-boot-env";
> +						reg = <0xe0000 0x20000>;
> +						read-only;
> +					};
> +
> +					partition@100000 {
> +						label = "u-boot-env2";
> +						reg = <0x100000 0x20000>;
> +						read-only;
> +					};
> +
> +					partition@120000 {
> +						label = "zImage";
> +						reg = <0x120000 0x400000>;
> +					};
> +
> +					partition@520000 {
> +						label = "initrd";
> +						reg = <0x520000 0x400000>;
> +					};
> +
> +					partition@xE00000 {
> +						label = "boot";
> +						reg = <0xE00000 0x3F200000>;
> +					};
>  				};
>  			};
>  		};
> -- 
> 2.1.4
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279186 — Re: [PATCH 2/4] ARM: dt: mvebu: ix4-300d: move partitions to partition sub-node

FromSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Date2015-11-28 18:40 +0100
SubjectRe: [PATCH 2/4] ARM: dt: mvebu: ix4-300d: move partitions to partition sub-node
Message-ID<qzRDz-3lI-5@gated-at.bofh.it>
In reply to#1279182
On 28.11.2015 18:00, Andrew Lunn wrote:
> On Sat, Nov 28, 2015 at 12:14:06PM +0100, Sebastian Hesselbarth wrote:
>> NAND flash partitions should be part of a partitions sub-node
>> not the flash node itself. Move the partitions which will also
>> allow different bootloaders get rid of the stock partitions
>> easily by removing the partitions node.
>>
>> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> 
> Humm, did not know that. Quoting Documentation/devicetree/bindings/mtd/partition.txt:
> 
>       The partition table should be a subnode of the mtd node and
>       should be named 'partitions'. Partitions are defined in subnodes
>       of the partitions node.
> 
>       For backwards compatibility partitions as direct subnodes of the
>       mtd device are supported. This use is discouraged.
> 
> It also looks like none of the other MVEBU maintainers know that
> either, since a quick look at the .dts files shows very few have a
> partitions node.

Me neither, Linus Walleij's latest contribution to the pogoplug
series showed it to me. And while I am working on barebox support
for the ix4, I always wanted to remove the stock partitions easily.

Barebox always uses internal registers at 0xf1000000 so it will
never boot that stupid stock kernel that depends on 0xd0000000
registers.

> Acked-by: Andrew Lunn <andrew@lunn.ch>
> 
> Thanks
> 	Andrew

ditto ;)

Sebastian

>> ---
>> Cc: Jason Cooper <jason@lakedaemon.net> 
>> Cc: Andrew Lunn <andrew@lunn.ch>
>> Cc: Gregory Clement <gregory.clement@free-electrons.com> 
>> Cc: Rob Herring <robh+dt@kernel.org> 
>> Cc: Pawel Moll <pawel.moll@arm.com> 
>> Cc: Mark Rutland <mark.rutland@arm.com> 
>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> 
>> Cc: Kumar Gala <galak@codeaurora.org> 
>> Cc: Russell King <linux@arm.linux.org.uk> 
>> Cc: Benoit Masson <yahoo@perenite.com>
>> Cc: linux-arm-kernel@lists.infradead.org 
>> Cc: devicetree@vger.kernel.org 
>> Cc: linux-kernel@vger.kernel.org 
>> ---
>>  arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 67 +++++++++++++------------
>>  1 file changed, 36 insertions(+), 31 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
>> index 30a0a6eac645..76781fd18624 100644
>> --- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
>> +++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
>> @@ -151,37 +151,42 @@
>>  				marvell,nand-enable-arbiter;
>>  				nand-on-flash-bbt;
>>  
>> -				partition@0 {
>> -					label = "u-boot";
>> -					reg = <0x0000000 0xe0000>;
>> -					read-only;
>> -				};
>> -
>> -				partition@e0000 {
>> -					label = "u-boot-env";
>> -					reg = <0xe0000 0x20000>;
>> -					read-only;
>> -				};
>> -
>> -				partition@100000 {
>> -					label = "u-boot-env2";
>> -					reg = <0x100000 0x20000>;
>> -					read-only;
>> -				};
>> -
>> -				partition@120000 {
>> -					label = "zImage";
>> -					reg = <0x120000 0x400000>;
>> -				};
>> -
>> -				partition@520000 {
>> -					label = "initrd";
>> -					reg = <0x520000 0x400000>;
>> -				};
>> -
>> -				partition@xE00000 {
>> -					label = "boot";
>> -					reg = <0xE00000 0x3F200000>;
>> +				partitions {
>> +					#address-cells = <1>;
>> +					#size-cells = <1>;
>> +
>> +					partition@0 {
>> +						label = "u-boot";
>> +						reg = <0x0000000 0xe0000>;
>> +						read-only;
>> +					};
>> +
>> +					partition@e0000 {
>> +						label = "u-boot-env";
>> +						reg = <0xe0000 0x20000>;
>> +						read-only;
>> +					};
>> +
>> +					partition@100000 {
>> +						label = "u-boot-env2";
>> +						reg = <0x100000 0x20000>;
>> +						read-only;
>> +					};
>> +
>> +					partition@120000 {
>> +						label = "zImage";
>> +						reg = <0x120000 0x400000>;
>> +					};
>> +
>> +					partition@520000 {
>> +						label = "initrd";
>> +						reg = <0x520000 0x400000>;
>> +					};
>> +
>> +					partition@xE00000 {
>> +						label = "boot";
>> +						reg = <0xE00000 0x3F200000>;
>> +					};
>>  				};
>>  			};
>>  		};
>> -- 
>> 2.1.4
>>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279927 — Re: [PATCH 2/4] ARM: dt: mvebu: ix4-300d: move partitions to partition sub-node

FromGregory CLEMENT <gregory.clement@free-electrons.com>
Date2015-11-30 15:20 +0100
SubjectRe: [PATCH 2/4] ARM: dt: mvebu: ix4-300d: move partitions to partition sub-node
Message-ID<qAxt9-4HX-35@gated-at.bofh.it>
In reply to#1279130
Hi Sebastian,
 
 On sam., nov. 28 2015, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> wrote:

> NAND flash partitions should be part of a partitions sub-node
> not the flash node itself. Move the partitions which will also
> allow different bootloaders get rid of the stock partitions
> easily by removing the partitions node.
>
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>

Applied on mvebu/dt

Thanks,

Gregory

> ---
> Cc: Jason Cooper <jason@lakedaemon.net> 
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Gregory Clement <gregory.clement@free-electrons.com> 
> Cc: Rob Herring <robh+dt@kernel.org> 
> Cc: Pawel Moll <pawel.moll@arm.com> 
> Cc: Mark Rutland <mark.rutland@arm.com> 
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> 
> Cc: Kumar Gala <galak@codeaurora.org> 
> Cc: Russell King <linux@arm.linux.org.uk> 
> Cc: Benoit Masson <yahoo@perenite.com>
> Cc: linux-arm-kernel@lists.infradead.org 
> Cc: devicetree@vger.kernel.org 
> Cc: linux-kernel@vger.kernel.org 
> ---
>  arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 67 +++++++++++++------------
>  1 file changed, 36 insertions(+), 31 deletions(-)
>
> diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
> index 30a0a6eac645..76781fd18624 100644
> --- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
> +++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
> @@ -151,37 +151,42 @@
>  				marvell,nand-enable-arbiter;
>  				nand-on-flash-bbt;
>  
> -				partition@0 {
> -					label = "u-boot";
> -					reg = <0x0000000 0xe0000>;
> -					read-only;
> -				};
> -
> -				partition@e0000 {
> -					label = "u-boot-env";
> -					reg = <0xe0000 0x20000>;
> -					read-only;
> -				};
> -
> -				partition@100000 {
> -					label = "u-boot-env2";
> -					reg = <0x100000 0x20000>;
> -					read-only;
> -				};
> -
> -				partition@120000 {
> -					label = "zImage";
> -					reg = <0x120000 0x400000>;
> -				};
> -
> -				partition@520000 {
> -					label = "initrd";
> -					reg = <0x520000 0x400000>;
> -				};
> -
> -				partition@xE00000 {
> -					label = "boot";
> -					reg = <0xE00000 0x3F200000>;
> +				partitions {
> +					#address-cells = <1>;
> +					#size-cells = <1>;
> +
> +					partition@0 {
> +						label = "u-boot";
> +						reg = <0x0000000 0xe0000>;
> +						read-only;
> +					};
> +
> +					partition@e0000 {
> +						label = "u-boot-env";
> +						reg = <0xe0000 0x20000>;
> +						read-only;
> +					};
> +
> +					partition@100000 {
> +						label = "u-boot-env2";
> +						reg = <0x100000 0x20000>;
> +						read-only;
> +					};
> +
> +					partition@120000 {
> +						label = "zImage";
> +						reg = <0x120000 0x400000>;
> +					};
> +
> +					partition@520000 {
> +						label = "initrd";
> +						reg = <0x520000 0x400000>;
> +					};
> +
> +					partition@xE00000 {
> +						label = "boot";
> +						reg = <0xE00000 0x3F200000>;
> +					};
>  				};
>  			};
>  		};
> -- 
> 2.1.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web