diff mbox

[1/3] ARM: dts: at91: nattis: use up-to-date mtd partitions

Message ID 20180116160835.27943-2-peda@axentia.se (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Rosin Jan. 16, 2018, 4:08 p.m. UTC
The nattis currently relies on the cmdline to correctly configure the
MTD partition table, and the one given in the device tree is simply
ignored. Which is fortunate, since the device tree partition table is
bonkers and does not match reality.

So, in order to avoid confusion, fix the device tree partition table
to match what is expected (i.e. what is normally provided on the cmdline).
In particular, the rootfs partition should be mtd6.

Fixes: 0e4323899973 ("ARM: dts: at91: add devicetree for the Axentia Nattis with Natte power")
Signed-off-by: Peter Rosin <peda@axentia.se>
---
 arch/arm/boot/dts/at91-nattis-2-natte-2.dts | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

Comments

Alexandre Belloni Jan. 16, 2018, 4:30 p.m. UTC | #1
Hi,

On 16/01/2018 at 17:08:33 +0100, Peter Rosin wrote:
> The nattis currently relies on the cmdline to correctly configure the
> MTD partition table, and the one given in the device tree is simply
> ignored. Which is fortunate, since the device tree partition table is
> bonkers and does not match reality.
> 

Shouldn't it be simply removed then?

> So, in order to avoid confusion, fix the device tree partition table
> to match what is expected (i.e. what is normally provided on the cmdline).
> In particular, the rootfs partition should be mtd6.
> 
> Fixes: 0e4323899973 ("ARM: dts: at91: add devicetree for the Axentia Nattis with Natte power")
> Signed-off-by: Peter Rosin <peda@axentia.se>
> ---
>  arch/arm/boot/dts/at91-nattis-2-natte-2.dts | 25 +++++++++++++++----------
>  1 file changed, 15 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/at91-nattis-2-natte-2.dts b/arch/arm/boot/dts/at91-nattis-2-natte-2.dts
> index 3ea1d26e1c68..4882bd6d38c1 100644
> --- a/arch/arm/boot/dts/at91-nattis-2-natte-2.dts
> +++ b/arch/arm/boot/dts/at91-nattis-2-natte-2.dts
> @@ -216,24 +216,29 @@
>  			reg = <0x0 0x40000>;
>  		};
>  
> -		bootloader@40000 {
> -			label = "bootloader";
> -			reg = <0x40000 0x80000>;
> +		barebox@40000 {
> +			label = "barebox";
> +			reg = <0x40000 0x60000>;
>  		};
>  
> -		bootloaderenv@c0000 {
> -			label = "bootloader env";
> -			reg = <0xc0000 0xc0000>;
> +		bareboxenv@c0000 {
> +			label = "bareboxenv";
> +			reg = <0xc0000 0x40000>;
>  		};
>  
> -		dtb@180000 {
> -			label = "device tree";
> -			reg = <0x180000 0x80000>;
> +		bareboxenv2@100000 {
> +			label = "bareboxenv2";
> +			reg = <0x100000 0x40000>;
> +		};
> +
> +		oftree@180000 {
> +			label = "oftree";
> +			reg = <0x180000 0x20000>;
>  		};
>  
>  		kernel@200000 {
>  			label = "kernel";
> -			reg = <0x200000 0x600000>;
> +			reg = <0x200000 0x500000>;
>  		};
>  
>  		rootfs@800000 {
> -- 
> 2.11.0
>
Peter Rosin Jan. 16, 2018, 10:17 p.m. UTC | #2
On 2018-01-16 17:30, Alexandre Belloni wrote:
> Hi,
> 
> On 16/01/2018 at 17:08:33 +0100, Peter Rosin wrote:
>> The nattis currently relies on the cmdline to correctly configure the
>> MTD partition table, and the one given in the device tree is simply
>> ignored. Which is fortunate, since the device tree partition table is
>> bonkers and does not match reality.
>>
> 
> Shouldn't it be simply removed then?

Hmm, that's a thought! Less is more, and all that. However, I think I
rather have it in the device tree anyway. Then I have the option to
drop a lot of tedious cmdline args in the future.

Cheers,
Peter
diff mbox

Patch

diff --git a/arch/arm/boot/dts/at91-nattis-2-natte-2.dts b/arch/arm/boot/dts/at91-nattis-2-natte-2.dts
index 3ea1d26e1c68..4882bd6d38c1 100644
--- a/arch/arm/boot/dts/at91-nattis-2-natte-2.dts
+++ b/arch/arm/boot/dts/at91-nattis-2-natte-2.dts
@@ -216,24 +216,29 @@ 
 			reg = <0x0 0x40000>;
 		};
 
-		bootloader@40000 {
-			label = "bootloader";
-			reg = <0x40000 0x80000>;
+		barebox@40000 {
+			label = "barebox";
+			reg = <0x40000 0x60000>;
 		};
 
-		bootloaderenv@c0000 {
-			label = "bootloader env";
-			reg = <0xc0000 0xc0000>;
+		bareboxenv@c0000 {
+			label = "bareboxenv";
+			reg = <0xc0000 0x40000>;
 		};
 
-		dtb@180000 {
-			label = "device tree";
-			reg = <0x180000 0x80000>;
+		bareboxenv2@100000 {
+			label = "bareboxenv2";
+			reg = <0x100000 0x40000>;
+		};
+
+		oftree@180000 {
+			label = "oftree";
+			reg = <0x180000 0x20000>;
 		};
 
 		kernel@200000 {
 			label = "kernel";
-			reg = <0x200000 0x600000>;
+			reg = <0x200000 0x500000>;
 		};
 
 		rootfs@800000 {