mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/4] ARM: i.MX pcm043: register external nand boot handler
Date: Tue, 12 Mar 2013 10:29:57 +0100	[thread overview]
Message-ID: <1363080597-10510-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1363080597-10510-1-git-send-email-s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/pcm043/pcm043.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boards/pcm043/pcm043.c b/arch/arm/boards/pcm043/pcm043.c
index 04418fb..a81852a 100644
--- a/arch/arm/boards/pcm043/pcm043.c
+++ b/arch/arm/boards/pcm043/pcm043.c
@@ -44,6 +44,7 @@
 #include <mach/iomux-mx35.h>
 #include <mach/devices-imx35.h>
 #include <mach/generic.h>
+#include <mach/bbu.h>
 
 static struct fec_platform_data fec_info = {
 	.xcv_type = MII100,
@@ -115,6 +116,7 @@ static int imx35_devices_init(void)
 {
 	uint32_t reg;
 	char *envstr;
+	unsigned long bbu_nand_flags = 0;
 
 	/* CS0: Nor Flash */
 	imx35_setup_weimcs(5, 0x22C0CF00, 0x75000D01, 0x00000900);
@@ -146,6 +148,7 @@ static int imx35_devices_init(void)
 		devfs_add_partition("nand0", SZ_512K, SZ_256K, DEVFS_PARTITION_FIXED, "env_raw");
 		dev_add_bb_dev("env_raw", "env0");
 		envstr = "NAND";
+		bbu_nand_flags = BBU_HANDLER_FLAG_DEFAULT;
 		break;
 	case bootsource_nor:
 	default:
@@ -163,6 +166,9 @@ static int imx35_devices_init(void)
 	armlinux_set_bootparams((void *)0x80000100);
 	armlinux_set_architecture(MACH_TYPE_PCM043);
 
+	imx_bbu_external_nand_register_handler("nand", "/dev/nand0.barebox",
+			bbu_nand_flags);
+
 	return 0;
 }
 
-- 
1.8.2.rc2


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

      parent reply	other threads:[~2013-03-12  9:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12  9:29 [PATCH] fix i.MX external NAND boot bad block handling Sascha Hauer
2013-03-12  9:29 ` [PATCH 1/4] ARM: i.MX: external nand boot: check for bad blocks Sascha Hauer
2013-03-12  9:29 ` [PATCH 2/4] ARM: head: Add some space behind the image header Sascha Hauer
2013-03-12  9:41   ` Juergen Beisert
2013-03-12  9:29 ` [PATCH 3/4] ARM: i.MX: Add bbu handler for external NAND boot Sascha Hauer
2013-03-12  9:48   ` Juergen Beisert
2013-03-12 10:05     ` Sascha Hauer
2013-03-12 10:08       ` Juergen Beisert
2013-03-12  9:29 ` Sascha Hauer [this message]

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=1363080597-10510-5-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.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