mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Teresa Remmet <t.remmet@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/4] ARM: phytec-som-am335x: Add backup partition for barebox
Date: Wed, 29 Jun 2016 12:01:08 +0200	[thread overview]
Message-ID: <1467194468-31049-4-git-send-email-t.remmet@phytec.de> (raw)
In-Reply-To: <1467194468-31049-1-git-send-email-t.remmet@phytec.de>

Add a redundant barebox partition to improve nand safety at
least a little bit.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 arch/arm/boards/phytec-som-am335x/board.c   |  1 +
 arch/arm/dts/am335x-phytec-phycard-som.dtsi | 23 ++++++++++++++++-------
 arch/arm/dts/am335x-phytec-phycore-som.dtsi | 19 ++++++++++++-------
 arch/arm/dts/am335x-phytec-phyflex-som.dtsi | 23 ++++++++++++++++-------
 4 files changed, 45 insertions(+), 21 deletions(-)

diff --git a/arch/arm/boards/phytec-som-am335x/board.c b/arch/arm/boards/phytec-som-am335x/board.c
index d5c27e2..7f62453 100644
--- a/arch/arm/boards/phytec-som-am335x/board.c
+++ b/arch/arm/boards/phytec-som-am335x/board.c
@@ -62,6 +62,7 @@ static char *xloadslots[] = {
 
 static char *nandslots[] = {
 	"/dev/nand0.barebox.bb",
+	"/dev/nand0.barebox_backup.bb",
 };
 
 static int physom_devices_init(void)
diff --git a/arch/arm/dts/am335x-phytec-phycard-som.dtsi b/arch/arm/dts/am335x-phytec-phycard-som.dtsi
index f052f0c..3dd9cad 100644
--- a/arch/arm/dts/am335x-phytec-phycard-som.dtsi
+++ b/arch/arm/dts/am335x-phytec-phycard-som.dtsi
@@ -206,23 +206,32 @@
 		};
 
 		partition@100000 {
+			label = "barebox_backup";
+			reg = <0x100000 0x80000>;
+		};
+
+		partition@180000 {
 			label = "bareboxenv";
-			reg = <0x100000 0x40000>;
+			reg = <0x180000 0x40000>;
 		};
 
-		partition@140000 {
+		partition@1C0000 {
 			label = "oftree";
-			reg = <0x140000 0x40000>;
+			reg = <0x1C0000 0x40000>;
 		};
 
-		partition@180000 {
+		partition@200000 {
 			label = "kernel";
-			reg = <0x180000 0x800000>;
+			reg = <0x200000 0x800000>;
 		};
 
-		partition@980000 {
+		partition@A00000 {
 			label = "root";
-			reg = <0x980000 0x0>;
+			/*
+			 * Size 0x0 extends partition to
+			 * end of nand flash.
+			 */
+			reg = <0xA00000 0x0>;
 		};
 	};
 };
diff --git a/arch/arm/dts/am335x-phytec-phycore-som.dtsi b/arch/arm/dts/am335x-phytec-phycore-som.dtsi
index e48d545..0fc3c96 100644
--- a/arch/arm/dts/am335x-phytec-phycore-som.dtsi
+++ b/arch/arm/dts/am335x-phytec-phycore-som.dtsi
@@ -290,27 +290,32 @@
 		};
 
 		partition@100000 {
+			label = "barebox_backup";
+			reg = <0x100000 0x80000>;
+		};
+
+		partition@180000 {
 			label = "bareboxenv";
-			reg = <0x100000 0x40000>;
+			reg = <0x180000 0x40000>;
 		};
 
-		partition@140000 {
+		partition@1C0000 {
 			label = "oftree";
-			reg = <0x140000 0x40000>;
+			reg = <0x1C0000 0x40000>;
 		};
 
-		partition@180000 {
+		partition@200000 {
 			label = "kernel";
-			reg = <0x180000 0x800000>;
+			reg = <0x200000 0x800000>;
 		};
 
-		partition@980000 {
+		partition@A00000 {
 			label = "root";
 			/*
 			 * Size 0x0 extends partition to
 			 * end of nand flash.
 			 */
-			reg = <0x980000 0x0>;
+			reg = <0xA00000 0x0>;
 		};
 	};
 };
diff --git a/arch/arm/dts/am335x-phytec-phyflex-som.dtsi b/arch/arm/dts/am335x-phytec-phyflex-som.dtsi
index 6561625..db78cb1 100644
--- a/arch/arm/dts/am335x-phytec-phyflex-som.dtsi
+++ b/arch/arm/dts/am335x-phytec-phyflex-som.dtsi
@@ -304,23 +304,32 @@
 		};
 
 		partition@100000 {
+			label = "barebox_backup";
+			reg = <0x100000 0x80000>;
+		};
+
+		partition@180000 {
 			label = "bareboxenv";
-			reg = <0x100000 0x40000>;
+			reg = <0x180000 0x40000>;
 		};
 
-		partition@140000 {
+		partition@1C0000 {
 			label = "oftree";
-			reg = <0x140000 0x40000>;
+			reg = <0x1C0000 0x40000>;
 		};
 
-		partition@180000 {
+		partition@200000 {
 			label = "kernel";
-			reg = <0x180000 0x800000>;
+			reg = <0x200000 0x800000>;
 		};
 
-		partition@980000 {
+		partition@A00000 {
 			label = "root";
-			reg = <0x980000 0x0>;
+			/*
+			 * Size 0x0 extends partition to
+			 * end of nand flash.
+			 */
+			reg = <0xA00000 0x0>;
 		};
 	};
 };
-- 
1.9.1


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

  parent reply	other threads:[~2016-06-29 10:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 10:01 [PATCH 1/4] OMAP: xload: Factor out reading image from mtd partition Teresa Remmet
2016-06-29 10:01 ` [PATCH 2/4] OMAP: xload: nand: Check for redundant barebox partition Teresa Remmet
2016-06-29 10:01 ` [PATCH 3/4] OMAP: am33xx_bbu_nand: Extent barebox update handler Teresa Remmet
2016-06-29 10:01 ` Teresa Remmet [this message]
2016-06-30  6:37 ` [PATCH 1/4] OMAP: xload: Factor out reading image from mtd partition Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467194468-31049-4-git-send-email-t.remmet@phytec.de \
    --to=t.remmet@phytec.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox