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 3/3] ARM pcm038: register nor update handler
Date: Fri, 14 Sep 2012 09:45:13 +0200	[thread overview]
Message-ID: <1347608713-10133-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1347608713-10133-1-git-send-email-s.hauer@pengutronix.de>

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

diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
index 912d6ea..2f4d71d 100644
--- a/arch/arm/boards/pcm038/pcm038.c
+++ b/arch/arm/boards/pcm038/pcm038.c
@@ -30,6 +30,7 @@
 #include <generated/mach-types.h>
 #include <partition.h>
 #include <fs.h>
+#include <bbu.h>
 #include <nand.h>
 #include <spi/spi.h>
 #include <io.h>
@@ -196,6 +197,7 @@ static int pcm038_devices_init(void)
 	int i;
 	u64 uid = 0;
 	char *envdev;
+	unsigned long bbu_flags_nor = 0, bbu_flags_nand = 0;
 
 	unsigned int mode[] = {
 		PD0_AIN_FEC_TXD0,
@@ -318,6 +320,7 @@ static int pcm038_devices_init(void)
 					DEVFS_PARTITION_FIXED, "env_raw");
 		dev_add_bb_dev("env_raw", "env0");
 		envdev = "NAND";
+		bbu_flags_nand = BBU_HANDLER_FLAG_DEFAULT;
 		break;
 	default:
 		devfs_add_partition("nor0", 0x00000, 0x80000,
@@ -327,6 +330,7 @@ static int pcm038_devices_init(void)
 		protect_file("/dev/env0", 1);
 
 		envdev = "NOR";
+		bbu_flags_nor = BBU_HANDLER_FLAG_DEFAULT;
 	}
 
 	printf("Using environment in %s Flash\n", envdev);
@@ -336,6 +340,9 @@ static int pcm038_devices_init(void)
 	armlinux_set_bootparams((void *)0xa0000100);
 	armlinux_set_architecture(MACH_TYPE_PCM038);
 
+	bbu_register_arm_handler("nor", "/dev/nor0", bbu_flags_nor);
+	bbu_register_arm_handler("nand", "/dev/nand0", bbu_flags_nand);
+
 	return 0;
 }
 
-- 
1.7.10.4


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

  parent reply	other threads:[~2012-09-14  7:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14  7:45 [RFC, PATCH] barebox-update command support Sascha Hauer
2012-09-14  7:45 ` [PATCH 1/3] Add barebox update infrastructure Sascha Hauer
2012-09-14 12:15   ` Jan Weitzel
2012-09-15 12:28     ` Sascha Hauer
2012-09-14  7:45 ` [PATCH 2/3] ARM: Add dummy update handler Sascha Hauer
2012-09-14 12:17   ` Jan Weitzel
2012-09-14  7:45 ` Sascha Hauer [this message]
2012-09-14 12:36 ` [RFC, PATCH] barebox-update command support Jan Weitzel
2012-09-15 12: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=1347608713-10133-4-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