From 6ea75b8c9c7df92806fd1a264e9b128754bfedcb Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Wed, 4 Mar 2015 22:03:45 +0100 Subject: [PATCH] cmd_bootcycle: initcycle will now set a valid crc --- u-boot/common/cmd_bootcycle.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/u-boot/common/cmd_bootcycle.c b/u-boot/common/cmd_bootcycle.c index 6c040eb245..09feba682a 100644 --- a/u-boot/common/cmd_bootcycle.c +++ b/u-boot/common/cmd_bootcycle.c @@ -60,9 +60,10 @@ static int valid_boot_cycle(struct sram_boot_cycle *sram) static void init_boot_cycle(struct sram_boot_cycle *sram) { - sram->magic = BOOT_CYCLE_MAGIC; - sram->version = BOOT_CYCLE_VERSION; - sram->counter = 0; + sram->magic = BOOT_CYCLE_MAGIC; + sram->version = BOOT_CYCLE_VERSION; + sram->counter = 0; + sram->crc = (uint32_t) crc32(0xdeadbeef, (void *)sram, sizeof(*sram) - 4); } void increase_boot_cycle(struct sram_boot_cycle *sram)