Commit abcaa6ee2a7f2648d967ad29fbc6a27acd13658c

Authored by Tom Rini
1 parent ebc18afd0a

am33xx: Make SoC bootcount driver have its own symbol

Some am33xx boards may not use the RTC block for bootcount (as it may
not be wired up for the board) and use some other facility.  So add
another symbol for the bootcount driver for the IP block.

Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>

Showing 4 changed files with 11 additions and 3 deletions Side-by-side Diff

drivers/bootcount/Makefile
... ... @@ -6,7 +6,7 @@
6 6 obj-$(CONFIG_AT91SAM9XE) += bootcount_at91.o
7 7 obj-$(CONFIG_BLACKFIN) += bootcount_blackfin.o
8 8 obj-$(CONFIG_SOC_DA8XX) += bootcount_davinci.o
9   -obj-$(CONFIG_AM33XX) += bootcount_davinci.o
  9 +obj-$(CONFIG_BOOTCOUNT_AM33XX) += bootcount_davinci.o
10 10 obj-$(CONFIG_BOOTCOUNT_RAM) += bootcount_ram.o
11 11 obj-$(CONFIG_BOOTCOUNT_ENV) += bootcount_env.o
drivers/bootcount/bootcount_davinci.c
... ... @@ -2,6 +2,10 @@
2 2 * (C) Copyright 2011
3 3 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
4 4 *
  5 + * A bootcount driver for the RTC IP block found on many TI platforms.
  6 + * This requires the RTC clocks, etc, to be enabled prior to use and
  7 + * not all boards with this IP block on it will have the RTC in use.
  8 + *
5 9 * SPDX-License-Identifier: GPL-2.0+
6 10 */
7 11  
include/configs/am335x_evm.h
... ... @@ -199,6 +199,10 @@
199 199 #define CONFIG_SPL_POWER_SUPPORT
200 200 #define CONFIG_SPL_YMODEM_SUPPORT
201 201  
  202 +/* Bootcount using the RTC block */
  203 +#define CONFIG_BOOTCOUNT_LIMIT
  204 +#define CONFIG_BOOTCOUNT_AM33XX
  205 +
202 206 /* CPSW support */
203 207 #define CONFIG_SPL_ETH_SUPPORT
204 208  
include/configs/ti_am335x_common.h
... ... @@ -43,9 +43,9 @@
43 43  
44 44 /*
45 45 * RTC related defines. To use bootcount you must set bootlimit in the
46   - * environment to a non-zero value.
  46 + * environment to a non-zero value and enable CONFIG_BOOTCOUNT_LIMIT
  47 + * in the board config.
47 48 */
48   -#define CONFIG_BOOTCOUNT_LIMIT
49 49 #define CONFIG_SYS_BOOTCOUNT_ADDR 0x44E3E000
50 50  
51 51 /* Enable the HW watchdog, since we can use this with bootcount */