[PATCH 3/3] animeo_ip: add bootcount support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Fri Sep 20 00:46:17 EDT 2013


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

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at 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




More information about the barebox mailing list