diff options
author | Stefan Roese | 2012-08-16 17:55:41 +0000 |
---|---|---|
committer | Wolfgang Denk | 2012-09-01 14:26:02 +0200 |
commit | 0044c42e94ecc258728190919b4619508fb83089 (patch) | |
tree | 4964b48f60ad93a2b77a76104b0ca9f664bde3b3 /board/enbw | |
parent | 7fe7701d322e9147c06d68ad6ebef91289b9a57e (diff) |
Consolidate bootcount code into drivers/bootcount
This patch moves all bootcount implementations into a common
directory: drivers/bootcount. The generic bootcount driver
is now usable not only by powerpc platforms, but others as well.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Cc: Christian Riesch <christian.riesch@omicron.at>
Cc: Manfred Rudigier <manfred.rudigier@omicron.at>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Reinhard Meyer <reinhard.meyer@emk-elektronik.de>
Tested-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Tested-by: Christian Riesch <christian.riesch@omicron.at>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'board/enbw')
-rw-r--r-- | board/enbw/enbw_cmc/enbw_cmc.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/board/enbw/enbw_cmc/enbw_cmc.c b/board/enbw/enbw_cmc/enbw_cmc.c index 0874e9c4e8c..67d5d4d6e5f 100644 --- a/board/enbw/enbw_cmc/enbw_cmc.c +++ b/board/enbw/enbw_cmc/enbw_cmc.c @@ -778,35 +778,6 @@ void arch_memory_failure_handle(void) } #endif -#if defined(CONFIG_BOOTCOUNT_LIMIT) -void bootcount_store(ulong a) -{ - struct davinci_rtc *reg = - (struct davinci_rtc *)CONFIG_SYS_BOOTCOUNT_ADDR; - - /* - * write RTC kick register to enable write - * for RTC Scratch registers. Scratch0 and 1 are - * used for bootcount values. - */ - writel(RTC_KICK0R_WE, ®->kick0r); - writel(RTC_KICK1R_WE, ®->kick1r); - out_be32(®->scratch0, a); - out_be32(®->scratch1, BOOTCOUNT_MAGIC); -} - -ulong bootcount_load(void) -{ - struct davinci_rtc *reg = - (struct davinci_rtc *)CONFIG_SYS_BOOTCOUNT_ADDR; - - if (in_be32(®->scratch1) != BOOTCOUNT_MAGIC) - return 0; - else - return in_be32(®->scratch0); -} -#endif - ulong post_word_load(void) { struct davinci_rtc *reg = |