]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/arm926ejs/at91/cpu.c
Consolidate bootcount code into drivers/bootcount
[karo-tx-uboot.git] / arch / arm / cpu / arm926ejs / at91 / cpu.c
index c47fb31e9996ab4dff6d46175fc9d2c5346c8223..5cf4fad0b092f27c560689dc474559817c6811cf 100644 (file)
@@ -71,29 +71,3 @@ int print_cpuinfo(void)
        return 0;
 }
 #endif
-
-#ifdef CONFIG_BOOTCOUNT_LIMIT
-/*
- * We combine the BOOTCOUNT_MAGIC and bootcount in one 32-bit register.
- * This is done so we need to use only one of the four GPBR registers.
- */
-void bootcount_store (ulong a)
-{
-       at91_gpbr_t *gpbr = (at91_gpbr_t *) ATMEL_BASE_GPBR;
-
-       writel((BOOTCOUNT_MAGIC & 0xffff0000) | (a & 0x0000ffff),
-               &gpbr->reg[AT91_GPBR_INDEX_BOOTCOUNT]);
-}
-
-ulong bootcount_load (void)
-{
-       at91_gpbr_t *gpbr = (at91_gpbr_t *) ATMEL_BASE_GPBR;
-
-       ulong val = readl(&gpbr->reg[AT91_GPBR_INDEX_BOOTCOUNT]);
-       if ((val & 0xffff0000) != (BOOTCOUNT_MAGIC & 0xffff0000))
-               return 0;
-       else
-               return val & 0x0000ffff;
-}
-
-#endif /* CONFIG_BOOTCOUNT_LIMIT */