mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 4/4] animeo_ip: add bootcount support
Date: Sat, 21 Sep 2013 08:46:07 +0200	[thread overview]
Message-ID: <1379745967-4575-4-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1379745967-4575-1-git-send-email-plagnioj@jcrosoft.com>

As we use a backup register with a backup battery, the boot count is since
ever.

when updating to defaultenv-2 we will use it to decide what to boot

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/animeo_ip/init.c     | 2 ++
 arch/arm/configs/animeo_ip_defconfig | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/boards/animeo_ip/init.c b/arch/arm/boards/animeo_ip/init.c
index 56b8df2..08fef58 100644
--- a/arch/arm/boards/animeo_ip/init.c
+++ b/arch/arm/boards/animeo_ip/init.c
@@ -219,6 +219,8 @@ static int animeo_ip_devices_init(void)
 	animeo_ip_add_device_mci();
 	animeo_ip_add_device_buttons();
 	animeo_ip_add_device_led();
+	add_generic_device("somfy_bootcount", DEVICE_ID_SINGLE, NULL, AT91SAM9260_BASE_GPBR + 2 * 4,
+			4, IORESOURCE_MEM, NULL);
 
 	armlinux_set_bootparams((void *)(AT91_CHIPSELECT_1 + 0x100));
 	/*
diff --git a/arch/arm/configs/animeo_ip_defconfig b/arch/arm/configs/animeo_ip_defconfig
index 23e7278..f4463b7 100644
--- a/arch/arm/configs/animeo_ip_defconfig
+++ b/arch/arm/configs/animeo_ip_defconfig
@@ -68,6 +68,8 @@ CONFIG_UBI=y
 CONFIG_MCI=y
 CONFIG_MCI_STARTUP=y
 CONFIG_MCI_ATMEL=y
+CONFIG_MISC_DEVICES=y
+CONFIG_SOMFY_BOOTCOUNT=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_LED_GPIO_BICOLOR=y
-- 
1.8.4.rc1


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

  parent reply	other threads:[~2013-09-21  6:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-21  6:45 [PATCH 0/4 v2] introduce " Jean-Christophe PLAGNIOL-VILLARD
2013-09-21  6:46 ` [PATCH 1/4] misc: add bootcount framework Jean-Christophe PLAGNIOL-VILLARD
2013-09-21  6:46   ` [PATCH 2/4] bootcount: add simple register support Jean-Christophe PLAGNIOL-VILLARD
2013-09-21  6:46   ` [PATCH 3/4] bootcount: add somfy bootcount support Jean-Christophe PLAGNIOL-VILLARD
2013-09-21  6:46   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-09-23  7:33   ` [PATCH 1/4] misc: add bootcount framework Sascha Hauer
2013-09-23  8:05     ` Jean-Christophe PLAGNIOL-VILLARD
2013-09-23  8:52       ` 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=1379745967-4575-4-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.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