Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Heiko Schocher <hs@denx.de>
void bootcount_store(ulong a)
{
void bootcount_store(ulong a)
{
- volatile ulong *save_addr;
- volatile ulong size = 0;
+ ulong *save_addr;
+ ulong size = 0;
- for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
+
+ for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
size += gd->bd->bi_dram[i].size;
size += gd->bd->bi_dram[i].size;
- }
- save_addr = (ulong*)(size - BOOTCOUNT_ADDR);
+ save_addr = (ulong *)(size - BOOTCOUNT_ADDR);
writel(a, save_addr);
writel(BOOTCOUNT_MAGIC, &save_addr[1]);
writel(a, save_addr);
writel(BOOTCOUNT_MAGIC, &save_addr[1]);
ulong bootcount_load(void)
{
ulong bootcount_load(void)
{
- volatile ulong *save_addr;
- volatile ulong size = 0;
+ ulong *save_addr;
+ ulong size = 0;
ulong counter = 0;
int i, tmp;
ulong counter = 0;
int i, tmp;
- for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
+ for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
size += gd->bd->bi_dram[i].size;
size += gd->bd->bi_dram[i].size;
- }
- save_addr = (ulong*)(size - BOOTCOUNT_ADDR);
+ save_addr = (ulong *)(size - BOOTCOUNT_ADDR);
counter = readl(&save_addr[0]);
counter = readl(&save_addr[0]);
ulong post_word_load(void)
{
ulong post_word_load(void)
{
- volatile void* addr = (void *) (gd->ram_size - BOOTCOUNT_ADDR + POST_WORD_OFF);
+ void* addr = (void *) (gd->ram_size - BOOTCOUNT_ADDR + POST_WORD_OFF);
return in_le32(addr);
}
void post_word_store(ulong value)
{
return in_le32(addr);
}
void post_word_store(ulong value)
{
- volatile void* addr = (void *) (gd->ram_size - BOOTCOUNT_ADDR + POST_WORD_OFF);
+ void* addr = (void *) (gd->ram_size - BOOTCOUNT_ADDR + POST_WORD_OFF);