mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] cfa-10036: Use the second MMC partition to store the environment
Date: Tue, 26 Feb 2013 17:50:20 +0100	[thread overview]
Message-ID: <1361897421-3228-2-git-send-email-maxime.ripard@free-electrons.com> (raw)
In-Reply-To: <1361897421-3228-1-git-send-email-maxime.ripard@free-electrons.com>

Since the only storage medium on the cfa-10036 is the MMC card, we need
to have a registered environment partition on it if we want to be able
to modify at runtime.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/boards/crystalfontz-cfa10036/cfa10036.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c
index b59dbab..1bc20cf 100644
--- a/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c
+++ b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c
@@ -17,6 +17,7 @@
 
 #include <common.h>
 #include <environment.h>
+#include <envfs.h>
 #include <errno.h>
 #include <fec.h>
 #include <gpio.h>
@@ -99,7 +100,7 @@ mem_initcall(cfa10036_mem_init);
 
 static int cfa10036_devices_init(void)
 {
-	int i;
+	int i, ret;
 
 	/* initizalize muxing */
 	for (i = 0; i < ARRAY_SIZE(cfa10036_pads); i++)
@@ -124,6 +125,11 @@ static int cfa10036_devices_init(void)
 
 	cfa10036_detect_hw();
 
+	ret = envfs_register_partition("disk0", 1);
+	if (ret != 0)
+		printf("Cannot create the 'env0' persistent "
+			 "environment storage (%d)\n", ret);
+
 	return 0;
 }
 device_initcall(cfa10036_devices_init);
-- 
1.7.10.4


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

  reply	other threads:[~2013-02-26 16:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-26 16:50 [PATCHv2 0/2] ARM: cfa10036: Store the barebox environment on the MMC Maxime Ripard
2013-02-26 16:50 ` Maxime Ripard [this message]
2013-02-26 16:50 ` [PATCH 2/2] cfa10036: Update the environment Maxime Ripard
2013-02-27  7:58 ` [PATCHv2 0/2] ARM: cfa10036: Store the barebox environment on the MMC Sascha Hauer
  -- strict thread matches above, loose matches on Subject: below --
2013-02-13 16:45 [PATCH " Maxime Ripard
2013-02-13 16:45 ` [PATCH 1/2] cfa-10036: Use the second MMC partition to store the environment Maxime Ripard
2013-02-13 17:10   ` Eric Bénard
2013-02-13 17:12   ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-14  9:52     ` Maxime Ripard
2013-02-14  8:16   ` Juergen Beisert
2013-02-14 10:10     ` Maxime Ripard
2013-02-14 11:17       ` Eric Bénard

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=1361897421-3228-2-git-send-email-maxime.ripard@free-electrons.com \
    --to=maxime.ripard@free-electrons.com \
    --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