mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: vexpress-v2p-ca9: adapt fixed NOR flash partition setup
@ 2020-04-29 15:35 Roland Hieber
  2020-05-07 10:58 ` Roland Hieber
  2020-05-11  6:59 ` Sascha Hauer
  0 siblings, 2 replies; 4+ messages in thread
From: Roland Hieber @ 2020-04-29 15:35 UTC (permalink / raw)
  To: Barebox Mailing List; +Cc: Roland Hieber

Upstream DTS commit 62a5017bf825c9e4d317 ("ARM: dts: vexpress: specify
AFS partition") [1] introduced an empty node at /smb@4000000
/motherboard/flash@0,00000000/partitions, which is preferred by the OF
partitions parser over the single partition nodes. In the same commit,
upstream set the compatible to "arm,arm-firmware-suite", which barebox
does not know about. Adapt our fixed partition setup accordingly by
wrapping all partitions in an extra "partitions" node with the correct
compatible.

[1]: https://git.kernel.org/linus/62a5017bf825c9e4d3176eb975a01c329a9f36

Fixes: 6940ba22c66ac1c71350 ("dts: update to v5.3-rc1")
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 arch/arm/dts/vexpress-v2p-ca9.dts | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/arch/arm/dts/vexpress-v2p-ca9.dts b/arch/arm/dts/vexpress-v2p-ca9.dts
index d0975330f205..b13c114f0cb0 100644
--- a/arch/arm/dts/vexpress-v2p-ca9.dts
+++ b/arch/arm/dts/vexpress-v2p-ca9.dts
@@ -16,19 +16,23 @@ 			flash@0,00000000 {
 				#address-cells = <1>;
 				#size-cells = <1>;
 
-				partition@0 {
-					label = "barebox";
-					reg = <0x0 0x80000>;
-				};
+				partitions {
+					compatible = "fixed-partitions";
 
-				barebox_env: partition@80000 {
-					label = "barebox-environment";
-					reg = <0x80000 0x80000>;
-				};
+					partition@0 {
+						label = "barebox";
+						reg = <0x0 0x80000>;
+					};
+
+					barebox_env: partition@80000 {
+						label = "barebox-environment";
+						reg = <0x80000 0x80000>;
+					};
 
-				state_storage: partition@100000 {
-					label = "barebox-state";
-					reg = <0x100000 0x100000>;
+					state_storage: partition@100000 {
+						label = "barebox-state";
+						reg = <0x100000 0x100000>;
+					};
 				};
 			};
 		};
-- 
2.26.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] ARM: dts: vexpress-v2p-ca9: adapt fixed NOR flash partition setup
  2020-04-29 15:35 [PATCH] ARM: dts: vexpress-v2p-ca9: adapt fixed NOR flash partition setup Roland Hieber
@ 2020-05-07 10:58 ` Roland Hieber
  2020-05-11  6:59 ` Sascha Hauer
  1 sibling, 0 replies; 4+ messages in thread
From: Roland Hieber @ 2020-05-07 10:58 UTC (permalink / raw)
  To: Barebox Mailing List

Any comments here, Sascha?

 - Roland

On Wed, Apr 29, 2020 at 05:35:59PM +0200, Roland Hieber wrote:
> Upstream DTS commit 62a5017bf825c9e4d317 ("ARM: dts: vexpress: specify
> AFS partition") [1] introduced an empty node at /smb@4000000
> /motherboard/flash@0,00000000/partitions, which is preferred by the OF
> partitions parser over the single partition nodes. In the same commit,
> upstream set the compatible to "arm,arm-firmware-suite", which barebox
> does not know about. Adapt our fixed partition setup accordingly by
> wrapping all partitions in an extra "partitions" node with the correct
> compatible.
> 
> [1]: https://git.kernel.org/linus/62a5017bf825c9e4d3176eb975a01c329a9f36
> 
> Fixes: 6940ba22c66ac1c71350 ("dts: update to v5.3-rc1")
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> ---
>  arch/arm/dts/vexpress-v2p-ca9.dts | 26 +++++++++++++++-----------
>  1 file changed, 15 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/dts/vexpress-v2p-ca9.dts b/arch/arm/dts/vexpress-v2p-ca9.dts
> index d0975330f205..b13c114f0cb0 100644
> --- a/arch/arm/dts/vexpress-v2p-ca9.dts
> +++ b/arch/arm/dts/vexpress-v2p-ca9.dts
> @@ -16,19 +16,23 @@ 			flash@0,00000000 {
>  				#address-cells = <1>;
>  				#size-cells = <1>;
>  
> -				partition@0 {
> -					label = "barebox";
> -					reg = <0x0 0x80000>;
> -				};
> +				partitions {
> +					compatible = "fixed-partitions";
>  
> -				barebox_env: partition@80000 {
> -					label = "barebox-environment";
> -					reg = <0x80000 0x80000>;
> -				};
> +					partition@0 {
> +						label = "barebox";
> +						reg = <0x0 0x80000>;
> +					};
> +
> +					barebox_env: partition@80000 {
> +						label = "barebox-environment";
> +						reg = <0x80000 0x80000>;
> +					};
>  
> -				state_storage: partition@100000 {
> -					label = "barebox-state";
> -					reg = <0x100000 0x100000>;
> +					state_storage: partition@100000 {
> +						label = "barebox-state";
> +						reg = <0x100000 0x100000>;
> +					};
>  				};
>  			};
>  		};
> -- 
> 2.26.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] ARM: dts: vexpress-v2p-ca9: adapt fixed NOR flash partition setup
  2020-04-29 15:35 [PATCH] ARM: dts: vexpress-v2p-ca9: adapt fixed NOR flash partition setup Roland Hieber
  2020-05-07 10:58 ` Roland Hieber
@ 2020-05-11  6:59 ` Sascha Hauer
  2020-05-11  9:58   ` Roland Hieber
  1 sibling, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2020-05-11  6:59 UTC (permalink / raw)
  To: Roland Hieber; +Cc: Barebox Mailing List

On Wed, Apr 29, 2020 at 05:35:59PM +0200, Roland Hieber wrote:
> Upstream DTS commit 62a5017bf825c9e4d317 ("ARM: dts: vexpress: specify
> AFS partition") [1] introduced an empty node at /smb@4000000
> /motherboard/flash@0,00000000/partitions, which is preferred by the OF
> partitions parser over the single partition nodes. In the same commit,
> upstream set the compatible to "arm,arm-firmware-suite", which barebox
> does not know about. Adapt our fixed partition setup accordingly by
> wrapping all partitions in an extra "partitions" node with the correct
> compatible.

I wonder what happens when we run this code on a flash that uses the
arm-firmware-suite partitioning. We may end up with inconsistent
partitioning then.
In the end the barebox vexpress code only ever runs on qemu and not on
the real hardware, so this is not relevant.
Either way the patch seems like a good start, so applied.

Sascha


> 
> [1]: https://git.kernel.org/linus/62a5017bf825c9e4d3176eb975a01c329a9f36
> 
> Fixes: 6940ba22c66ac1c71350 ("dts: update to v5.3-rc1")
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> ---
>  arch/arm/dts/vexpress-v2p-ca9.dts | 26 +++++++++++++++-----------
>  1 file changed, 15 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/dts/vexpress-v2p-ca9.dts b/arch/arm/dts/vexpress-v2p-ca9.dts
> index d0975330f205..b13c114f0cb0 100644
> --- a/arch/arm/dts/vexpress-v2p-ca9.dts
> +++ b/arch/arm/dts/vexpress-v2p-ca9.dts
> @@ -16,19 +16,23 @@ 			flash@0,00000000 {
>  				#address-cells = <1>;
>  				#size-cells = <1>;
>  
> -				partition@0 {
> -					label = "barebox";
> -					reg = <0x0 0x80000>;
> -				};
> +				partitions {
> +					compatible = "fixed-partitions";
>  
> -				barebox_env: partition@80000 {
> -					label = "barebox-environment";
> -					reg = <0x80000 0x80000>;
> -				};
> +					partition@0 {
> +						label = "barebox";
> +						reg = <0x0 0x80000>;
> +					};
> +
> +					barebox_env: partition@80000 {
> +						label = "barebox-environment";
> +						reg = <0x80000 0x80000>;
> +					};
>  
> -				state_storage: partition@100000 {
> -					label = "barebox-state";
> -					reg = <0x100000 0x100000>;
> +					state_storage: partition@100000 {
> +						label = "barebox-state";
> +						reg = <0x100000 0x100000>;
> +					};
>  				};
>  			};
>  		};
> -- 
> 2.26.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] ARM: dts: vexpress-v2p-ca9: adapt fixed NOR flash partition setup
  2020-05-11  6:59 ` Sascha Hauer
@ 2020-05-11  9:58   ` Roland Hieber
  0 siblings, 0 replies; 4+ messages in thread
From: Roland Hieber @ 2020-05-11  9:58 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox Mailing List

On Mon, May 11, 2020 at 08:59:52AM +0200, Sascha Hauer wrote:
> On Wed, Apr 29, 2020 at 05:35:59PM +0200, Roland Hieber wrote:
> > Upstream DTS commit 62a5017bf825c9e4d317 ("ARM: dts: vexpress: specify
> > AFS partition") [1] introduced an empty node at /smb@4000000
> > /motherboard/flash@0,00000000/partitions, which is preferred by the OF
> > partitions parser over the single partition nodes. In the same commit,
> > upstream set the compatible to "arm,arm-firmware-suite", which barebox
> > does not know about. Adapt our fixed partition setup accordingly by
> > wrapping all partitions in an extra "partitions" node with the correct
> > compatible.
> 
> I wonder what happens when we run this code on a flash that uses the
> arm-firmware-suite partitioning. We may end up with inconsistent
> partitioning then.
> In the end the barebox vexpress code only ever runs on qemu and not on
> the real hardware, so this is not relevant.
> Either way the patch seems like a good start, so applied.

Yes, valid concern. What about creating a separate device tree for the
qemu variant? This way we wouldn't run into that problem on the physical
hardware.

 - Roland

-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2020-05-11  9:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 15:35 [PATCH] ARM: dts: vexpress-v2p-ca9: adapt fixed NOR flash partition setup Roland Hieber
2020-05-07 10:58 ` Roland Hieber
2020-05-11  6:59 ` Sascha Hauer
2020-05-11  9:58   ` Roland Hieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox