mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jan Weitzel <j.weitzel@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH] omap: use 512k barebox partition
Date: Fri, 27 Jul 2012 13:09:07 +0200	[thread overview]
Message-ID: <1343387347-24504-1-git-send-email-j.weitzel@phytec.de> (raw)

Use 512k NAND Partion for barebox. Problem is we don't know the size of the
barebox inside xload. Set it also to 512k
Fix enviroment for boards with size in config

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
---
 arch/arm/boards/pcm049/board.c            |    7 +++++--
 arch/arm/boards/pcm049/env/config         |    2 +-
 arch/arm/boards/phycard-a-l1/env/config   |    2 +-
 arch/arm/boards/phycard-a-l1/pca-a-l1.c   |    9 ++++++---
 arch/arm/boards/phycard-a-xl2/env/config  |    2 +-
 arch/arm/boards/phycard-a-xl2/pca-a-xl2.c |    4 ++--
 arch/arm/mach-omap/xload.c                |    2 +-
 7 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boards/pcm049/board.c b/arch/arm/boards/pcm049/board.c
index 5b7854a..d7b79c1 100644
--- a/arch/arm/boards/pcm049/board.c
+++ b/arch/arm/boards/pcm049/board.c
@@ -113,9 +113,12 @@ static int pcm049_devices_init(void)
 #ifdef CONFIG_PARTITION
 	devfs_add_partition("nand0", 0x00000, SZ_128K, DEVFS_PARTITION_FIXED, "xload_raw");
 	dev_add_bb_dev("xload_raw", "xload");
-	devfs_add_partition("nand0", SZ_128K, SZ_256K, DEVFS_PARTITION_FIXED, "self_raw");
+	devfs_add_partition("nand0", SZ_128K, SZ_512K,
+			DEVFS_PARTITION_FIXED, "self_raw");
 	dev_add_bb_dev("self_raw", "self0");
-	devfs_add_partition("nand0", SZ_128K + SZ_256K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw");
+	devfs_add_partition("nand0", SZ_128K + SZ_512K, SZ_128K,
+			DEVFS_PARTITION_FIXED, "env_raw");
+
 	dev_add_bb_dev("env_raw", "env0");
 #endif
 
diff --git a/arch/arm/boards/pcm049/env/config b/arch/arm/boards/pcm049/env/config
index efbe9ea..70e374f 100644
--- a/arch/arm/boards/pcm049/env/config
+++ b/arch/arm/boards/pcm049/env/config
@@ -40,7 +40,7 @@ autoboot_timeout=3
 
 bootargs="console=ttyO2,115200"
 
-nand_parts="128k(xload)ro,256k(barebox),128k(bareboxenv),2M(kernel),-(root)"
+nand_parts="128k(xload)ro,512k(barebox),128k(bareboxenv),4M(kernel),-(root)"
 rootfs_mtdblock_nand=4
 
 # set a fancy prompt (if support is compiled in)
diff --git a/arch/arm/boards/phycard-a-l1/env/config b/arch/arm/boards/phycard-a-l1/env/config
index e0f4dcc..5bc48d7 100644
--- a/arch/arm/boards/phycard-a-l1/env/config
+++ b/arch/arm/boards/phycard-a-l1/env/config
@@ -70,7 +70,7 @@ bootargs="$bootargs omapdss.def_disp=pd050vl1"
 #bootargs="$bootargs omapdss.def_disp=pd104slf"
 #bootargs="$bootargs omapdss.def_disp=pm070wl4"
 
-nand_parts="512k(x-loader)ro,1920k(barebox),128k(bareboxenv),4M(kernel),-(root)"
+nand_parts="128k(x-loader)ro,512k(barebox),128k(bareboxenv),4M(kernel),-(root)"
 nand_device=omap2-nand.0
 rootfs_mtdblock_nand=4
 
diff --git a/arch/arm/boards/phycard-a-l1/pca-a-l1.c b/arch/arm/boards/phycard-a-l1/pca-a-l1.c
index 1cc2815..3d3596a 100644
--- a/arch/arm/boards/phycard-a-l1/pca-a-l1.c
+++ b/arch/arm/boards/phycard-a-l1/pca-a-l1.c
@@ -336,13 +336,16 @@ static int pcaal1_late_init(void)
 
 	nand = get_device_by_name("nand0");
 
-	devfs_add_partition("nand0", 0x00000, 0x80000, DEVFS_PARTITION_FIXED, "x-loader");
+	devfs_add_partition("nand0", 0x00000, SZ_128K,
+			DEVFS_PARTITION_FIXED, "x-loader");
 	dev_add_bb_dev("self_raw", "x_loader0");
 
-	devfs_add_partition("nand0", 0x80000, 0x1e0000, DEVFS_PARTITION_FIXED, "self_raw");
+	devfs_add_partition("nand0", SZ_128K, SZ_512K,
+			DEVFS_PARTITION_FIXED, "self_raw");
 	dev_add_bb_dev("self_raw", "self0");
 
-	devfs_add_partition("nand0", 0x260000, 0x20000, DEVFS_PARTITION_FIXED, "env_raw");
+	devfs_add_partition("nand0", SZ_128K + SZ_512K, SZ_128K,
+			DEVFS_PARTITION_FIXED, "env_raw");
 	dev_add_bb_dev("env_raw", "env0");
 
 	return 0;
diff --git a/arch/arm/boards/phycard-a-xl2/env/config b/arch/arm/boards/phycard-a-xl2/env/config
index 59e8eb3..44a4181 100644
--- a/arch/arm/boards/phycard-a-xl2/env/config
+++ b/arch/arm/boards/phycard-a-xl2/env/config
@@ -39,7 +39,7 @@ autoboot_timeout=3
 
 bootargs="console=ttyO2,115200"
 
-nand_parts="128k(xload)ro,256k(barebox),128k(bareboxenv),4M(kernel),-(root)"
+nand_parts="128k(xload)ro,512k(barebox),128k(bareboxenv),4M(kernel),-(root)"
 rootfs_mtdblock_nand=4
 
 # set a fancy prompt (if support is compiled in)
diff --git a/arch/arm/boards/phycard-a-xl2/pca-a-xl2.c b/arch/arm/boards/phycard-a-xl2/pca-a-xl2.c
index 128cb8f..54b4ada 100644
--- a/arch/arm/boards/phycard-a-xl2/pca-a-xl2.c
+++ b/arch/arm/boards/phycard-a-xl2/pca-a-xl2.c
@@ -131,10 +131,10 @@ static int pcaaxl2_devices_init(void)
 	devfs_add_partition("nand0", 0x00000, SZ_128K,
 			DEVFS_PARTITION_FIXED, "xload_raw");
 	dev_add_bb_dev("xload_raw", "xload");
-	devfs_add_partition("nand0", SZ_128K, SZ_256K,
+	devfs_add_partition("nand0", SZ_128K, SZ_512K,
 			DEVFS_PARTITION_FIXED, "self_raw");
 	dev_add_bb_dev("self_raw", "self0");
-	devfs_add_partition("nand0", SZ_128K + SZ_256K, SZ_128K,
+	devfs_add_partition("nand0", SZ_128K + SZ_512K, SZ_128K,
 			DEVFS_PARTITION_FIXED, "env_raw");
 	dev_add_bb_dev("env_raw", "env0");
 #endif
diff --git a/arch/arm/mach-omap/xload.c b/arch/arm/mach-omap/xload.c
index 13024ab..a58d0a3 100644
--- a/arch/arm/mach-omap/xload.c
+++ b/arch/arm/mach-omap/xload.c
@@ -80,7 +80,7 @@ int run_shell(void)
 		printf("unknown boot source. Fall back to nand\n");
 	case OMAP_BOOTSRC_NAND:
 		printf("booting from NAND\n");
-		func = omap_xload_boot_nand(SZ_128K, SZ_256K);
+		func = omap_xload_boot_nand(SZ_128K, SZ_512K);
 		break;
 	}
 
-- 
1.7.0.4


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

             reply	other threads:[~2012-07-27 11:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27 11:09 Jan Weitzel [this message]
2012-07-27 15:19 ` Sascha Hauer
2012-07-27 16:54   ` Juergen Beisert
2012-07-30  7:40     ` Sascha Hauer
2012-07-30  8:11       ` Juergen Beisert
2012-07-30  8:52         ` Sascha Hauer
2012-07-30  9:16           ` Juergen Beisert
2012-07-30  9:33             ` 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=1343387347-24504-1-git-send-email-j.weitzel@phytec.de \
    --to=j.weitzel@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