/* We combine the CONFIG_SYS_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)
/* We combine the CONFIG_SYS_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((CONFIG_SYS_BOOTCOUNT_MAGIC & 0xffff0000) | (a & 0x0000ffff),
	       &gpbr->reg[AT91_GPBR_INDEX_BOOTCOUNT]);
}