[U-Boot] [PATCH v2 11/13] Rename CONFIG_SYS_BOOTCOUNT_ADDR to BOOTCOUNT_ADDR

Alex Kiernan alex.kiernan at gmail.com
Thu Feb 15 13:55:24 UTC 2018


Remove CONFIG_SYS_BOOTCOUNT_ADDR from Kconfig.

Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
---

Changes in v2: None

 drivers/bootcount/Kconfig             | 10 ++++++----
 drivers/bootcount/bootcount.c         | 16 ++++++++--------
 drivers/bootcount/bootcount_davinci.c |  4 ++--
 drivers/bootcount/bootcount_ext.c     |  8 ++++----
 drivers/bootcount/bootcount_i2c.c     |  6 +++---
 include/configs/brppt1.h              |  2 +-
 include/configs/calimain.h            |  2 +-
 include/configs/dh_imx6.h             |  2 +-
 include/configs/ge_bx50v3.h           |  2 +-
 include/configs/highbank.h            |  2 +-
 include/configs/ids8313.h             |  2 +-
 include/configs/km/kmp204x-common.h   |  2 +-
 include/configs/mx53ppd.h             |  2 +-
 include/configs/socfpga_is1.h         |  2 +-
 include/configs/socfpga_sr1500.h      |  2 +-
 include/configs/ti_am335x_common.h    |  2 +-
 include/configs/tqma6_wru4.h          |  2 +-
 include/configs/x600.h                |  2 +-
 18 files changed, 36 insertions(+), 34 deletions(-)

diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
index 583d6a6..ce26e38 100644
--- a/drivers/bootcount/Kconfig
+++ b/drivers/bootcount/Kconfig
@@ -19,9 +19,9 @@ choice
 config BOOTCOUNT_GENERIC
 	bool "Generic default boot counter"
 	help
-	  Generic bootcount stored at SYS_BOOTCOUNT_ADDR.
+	  Generic bootcount stored at BOOTCOUNT_ADDR.
 
-	  SYS_BOOTCOUNT_ADDR:
+	  BOOTCOUNT_ADDR:
 	    Set to the address where the bootcount and bootcount magic
 	    will be stored.
 
@@ -31,6 +31,9 @@ config BOOTCOUNT_EXT
 	  Add support for maintaining boot count in a file on an EXT
 	  filesystem.
 
+	  BOOTCOUNT_ADDR
+	    Set to the RAM address used for read and write.
+
 config BOOTCOUNT_AM33XX
 	bool "Boot counter in AM33XX RTC IP block"
 	depends on AM33XX || SOC_DA8XX
@@ -62,8 +65,7 @@ config BOOTCOUNT_I2C
 	help
 	  Enable support for the bootcounter on an i2c (like RTC) device.
 	  CONFIG_SYS_I2C_RTC_ADDR = i2c chip address
-	  CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which is used for
-	                              the bootcounter.
+	  BOOTCOUNT_ADDR = i2c addr which is used for the bootcounter.
 	  CONFIG_BOOTCOUNT_ALEN = address len
 
 config BOOTCOUNT_AT91
diff --git a/drivers/bootcount/bootcount.c b/drivers/bootcount/bootcount.c
index 8b499fe..82ef426 100644
--- a/drivers/bootcount/bootcount.c
+++ b/drivers/bootcount/bootcount.c
@@ -9,24 +9,24 @@
 #include <linux/compiler.h>
 
 /*
- * Only override CONFIG_SYS_BOOTCOUNT_ADDR if not already defined. This
+ * Only override BOOTCOUNT_ADDR if not already defined. This
  * way, some boards can define it directly in their config header.
  */
-#if !defined(CONFIG_SYS_BOOTCOUNT_ADDR)
+#if !defined(BOOTCOUNT_ADDR)
 
 #if defined(CONFIG_QE)
 #include <linux/immap_qe.h>
-#define CONFIG_SYS_BOOTCOUNT_ADDR	(CONFIG_SYS_IMMR + 0x110000 + \
+#define BOOTCOUNT_ADDR	(CONFIG_SYS_IMMR + 0x110000 + \
 					 QE_MURAM_SIZE - 2 * sizeof(u32))
 #endif /* defined(CONFIG_QE) */
 
-#endif /* !defined(CONFIG_SYS_BOOTCOUNT_ADDR) */
+#endif /* !defined(BOOTCOUNT_ADDR) */
 
 /* Now implement the generic default functions */
-#if defined(CONFIG_SYS_BOOTCOUNT_ADDR)
+#if defined(BOOTCOUNT_ADDR)
 __weak void bootcount_store(ulong a)
 {
-	void *reg = (void *)CONFIG_SYS_BOOTCOUNT_ADDR;
+	void *reg = (void *)BOOTCOUNT_ADDR;
 
 #if defined(CONFIG_SYS_BOOTCOUNT_SINGLEWORD)
 	raw_bootcount_store(reg, (BOOTCOUNT_MAGIC & 0xffff0000) | a);
@@ -38,7 +38,7 @@ __weak void bootcount_store(ulong a)
 
 __weak ulong bootcount_load(void)
 {
-	void *reg = (void *)CONFIG_SYS_BOOTCOUNT_ADDR;
+	void *reg = (void *)BOOTCOUNT_ADDR;
 
 #if defined(CONFIG_SYS_BOOTCOUNT_SINGLEWORD)
 	u32 tmp = raw_bootcount_load(reg);
@@ -54,4 +54,4 @@ __weak ulong bootcount_load(void)
 		return raw_bootcount_load(reg);
 #endif /* defined(CONFIG_SYS_BOOTCOUNT_SINGLEWORD) */
 }
-#endif /* defined(CONFIG_SYS_BOOTCOUNT_ADDR) */
+#endif /* defined(BOOTCOUNT_ADDR) */
diff --git a/drivers/bootcount/bootcount_davinci.c b/drivers/bootcount/bootcount_davinci.c
index 17829be..d00fd7a 100644
--- a/drivers/bootcount/bootcount_davinci.c
+++ b/drivers/bootcount/bootcount_davinci.c
@@ -15,7 +15,7 @@
 void bootcount_store(ulong a)
 {
 	struct davinci_rtc *reg =
-		(struct davinci_rtc *)CONFIG_SYS_BOOTCOUNT_ADDR;
+		(struct davinci_rtc *)BOOTCOUNT_ADDR;
 
 	/*
 	 * write RTC kick registers to enable write
@@ -32,7 +32,7 @@ ulong bootcount_load(void)
 {
 	unsigned long val;
 	struct davinci_rtc *reg =
-		(struct davinci_rtc *)CONFIG_SYS_BOOTCOUNT_ADDR;
+		(struct davinci_rtc *)BOOTCOUNT_ADDR;
 
 	val = raw_bootcount_load(&reg->scratch2);
 	if ((val & 0xffff0000) != (BOOTCOUNT_MAGIC & 0xffff0000))
diff --git a/drivers/bootcount/bootcount_ext.c b/drivers/bootcount/bootcount_ext.c
index e0dd21b..e176ec1 100644
--- a/drivers/bootcount/bootcount_ext.c
+++ b/drivers/bootcount/bootcount_ext.c
@@ -22,13 +22,13 @@ void bootcount_store(ulong a)
 		return;
 	}
 
-	buf = map_sysmem(CONFIG_SYS_BOOTCOUNT_ADDR, 2);
+	buf = map_sysmem(BOOTCOUNT_ADDR, 2);
 	buf[0] = BC_MAGIC;
 	buf[1] = (a & 0xff);
 	unmap_sysmem(buf);
 
 	ret = fs_write(CONFIG_SYS_BOOTCOUNT_EXT_NAME,
-		       CONFIG_SYS_BOOTCOUNT_ADDR, 0, 2, &len);
+		       BOOTCOUNT_ADDR, 0, 2, &len);
 	if (ret != 0)
 		puts("Error storing bootcount\n");
 }
@@ -45,14 +45,14 @@ ulong bootcount_load(void)
 		return 0;
 	}
 
-	ret = fs_read(CONFIG_SYS_BOOTCOUNT_EXT_NAME, CONFIG_SYS_BOOTCOUNT_ADDR,
+	ret = fs_read(CONFIG_SYS_BOOTCOUNT_EXT_NAME, BOOTCOUNT_ADDR,
 		      0, 2, &len_read);
 	if (ret != 0 || len_read != 2) {
 		puts("Error loading bootcount\n");
 		return 0;
 	}
 
-	buf = map_sysmem(CONFIG_SYS_BOOTCOUNT_ADDR, 2);
+	buf = map_sysmem(BOOTCOUNT_ADDR, 2);
 	if (buf[0] == BC_MAGIC)
 		ret = buf[1];
 
diff --git a/drivers/bootcount/bootcount_i2c.c b/drivers/bootcount/bootcount_i2c.c
index e27b168..1dba141 100644
--- a/drivers/bootcount/bootcount_i2c.c
+++ b/drivers/bootcount/bootcount_i2c.c
@@ -18,8 +18,8 @@ void bootcount_store(ulong a)
 
 	buf[0] = BC_MAGIC;
 	buf[1] = (a & 0xff);
-	ret = i2c_write(CONFIG_SYS_I2C_RTC_ADDR, CONFIG_SYS_BOOTCOUNT_ADDR,
-		  CONFIG_BOOTCOUNT_ALEN, buf, 2);
+	ret = i2c_write(CONFIG_SYS_I2C_RTC_ADDR, BOOTCOUNT_ADDR,
+			CONFIG_BOOTCOUNT_ALEN, buf, 2);
 	if (ret != 0)
 		puts("Error writing bootcount\n");
 }
@@ -29,7 +29,7 @@ ulong bootcount_load(void)
 	unsigned char buf[3];
 	int ret;
 
-	ret = i2c_read(CONFIG_SYS_I2C_RTC_ADDR, CONFIG_SYS_BOOTCOUNT_ADDR,
+	ret = i2c_read(CONFIG_SYS_I2C_RTC_ADDR, BOOTCOUNT_ADDR,
 		       CONFIG_BOOTCOUNT_ALEN, buf, 2);
 	if (ret != 0) {
 		puts("Error loading bootcount\n");
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index 30ea2d2..e32ac7d 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -21,7 +21,7 @@
 #define LCD_BPP				LCD_COLOR32
 
 /* Bootcount using the RTC block */
-#define CONFIG_SYS_BOOTCOUNT_ADDR	0x44E3E000
+#define BOOTCOUNT_ADDR	0x44E3E000
 
 /* memory */
 #define CONFIG_SYS_MALLOC_LEN		(5 * 1024 * 1024)
diff --git a/include/configs/calimain.h b/include/configs/calimain.h
index 4c47617..255036d 100644
--- a/include/configs/calimain.h
+++ b/include/configs/calimain.h
@@ -278,7 +278,7 @@
 #define CONFIG_SYS_INIT_SP_ADDR		(0x8001ff00)
 
 #define CONFIG_SYS_BOOTCOUNT_LE		/* Use little-endian accessors */
-#define CONFIG_SYS_BOOTCOUNT_ADDR	DAVINCI_RTC_BASE
+#define BOOTCOUNT_ADDR	DAVINCI_RTC_BASE
 
 #ifndef __ASSEMBLY__
 int calimain_get_osc_freq(void);
diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h
index 464b8d7..474511d 100644
--- a/include/configs/dh_imx6.h
+++ b/include/configs/dh_imx6.h
@@ -47,7 +47,7 @@
 #define CONFIG_SYS_MALLOC_LEN		(4 * SZ_1M)
 
 /* Bootcounter */
-#define CONFIG_SYS_BOOTCOUNT_ADDR	IRAM_BASE_ADDR
+#define BOOTCOUNT_ADDR	IRAM_BASE_ADDR
 #define CONFIG_SYS_BOOTCOUNT_BE
 
 /* FEC ethernet */
diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h
index 0a72b58..1db9bad 100644
--- a/include/configs/ge_bx50v3.h
+++ b/include/configs/ge_bx50v3.h
@@ -267,6 +267,6 @@
 
 #define CONFIG_BCH
 
-#define CONFIG_SYS_BOOTCOUNT_ADDR		0x7000A000
+#define BOOTCOUNT_ADDR		0x7000A000
 
 #endif	/* __GE_BX50V3_CONFIG_H */
diff --git a/include/configs/highbank.h b/include/configs/highbank.h
index 9dc0c6c..a734181 100644
--- a/include/configs/highbank.h
+++ b/include/configs/highbank.h
@@ -27,7 +27,7 @@
 #define CONFIG_CONS_INDEX		0
 
 #define CONFIG_SYS_BOOTCOUNT_LE		/* Use little-endian accessors */
-#define CONFIG_SYS_BOOTCOUNT_ADDR	0xfff3cf0c
+#define BOOTCOUNT_ADDR	0xfff3cf0c
 
 #define CONFIG_MISC_INIT_R
 #define CONFIG_SCSI_AHCI_PLAT
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index 099d7bd..4449e27 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -516,7 +516,7 @@
 
 /* bootcount support */
 #define CONFIG_BOOTCOUNT_ALEN	1
-#define CONFIG_SYS_BOOTCOUNT_ADDR	0x9
+#define BOOTCOUNT_ADDR	0x9
 
 #define CONFIG_IMAGE_FORMAT_LEGACY
 
diff --git a/include/configs/km/kmp204x-common.h b/include/configs/km/kmp204x-common.h
index 7f735e0..19627ff 100644
--- a/include/configs/km/kmp204x-common.h
+++ b/include/configs/km/kmp204x-common.h
@@ -189,7 +189,7 @@ unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_SYS_OR1_PRELIM  CONFIG_SYS_QRIO_OR_PRELIM /* QRIO Options */
 
 /* bootcounter in QRIO */
-#define CONFIG_SYS_BOOTCOUNT_ADDR	(CONFIG_SYS_QRIO_BASE + 0x20)
+#define BOOTCOUNT_ADDR	(CONFIG_SYS_QRIO_BASE + 0x20)
 
 #define CONFIG_BOARD_EARLY_INIT_R	/* call board_early_init_r function */
 #define CONFIG_MISC_INIT_F
diff --git a/include/configs/mx53ppd.h b/include/configs/mx53ppd.h
index aa1480c..c73d73a 100644
--- a/include/configs/mx53ppd.h
+++ b/include/configs/mx53ppd.h
@@ -241,6 +241,6 @@
 	#define CONFIG_VIDEO_IPUV3
 #endif
 
-#define CONFIG_SYS_BOOTCOUNT_ADDR	0x7000A000
+#define BOOTCOUNT_ADDR		0x7000A000
 
 #endif				/* __CONFIG_H */
diff --git a/include/configs/socfpga_is1.h b/include/configs/socfpga_is1.h
index 883ffb7..70ff295 100644
--- a/include/configs/socfpga_is1.h
+++ b/include/configs/socfpga_is1.h
@@ -33,7 +33,7 @@
  * Bootcounter
  */
 /* last 2 lwords in OCRAM */
-#define CONFIG_SYS_BOOTCOUNT_ADDR       0xfffffff8
+#define BOOTCOUNT_ADDR       0xfffffff8
 #define CONFIG_SYS_BOOTCOUNT_BE
 
 #endif	/* __CONFIG_SOCFPGA_IS1_H__ */
diff --git a/include/configs/socfpga_sr1500.h b/include/configs/socfpga_sr1500.h
index 8c9069c..1fe1d60 100644
--- a/include/configs/socfpga_sr1500.h
+++ b/include/configs/socfpga_sr1500.h
@@ -32,7 +32,7 @@
  * Bootcounter
  */
 /* last 2 lwords in OCRAM */
-#define CONFIG_SYS_BOOTCOUNT_ADDR	0xfffffff8
+#define BOOTCOUNT_ADDR	0xfffffff8
 #define CONFIG_SYS_BOOTCOUNT_BE
 
 /* Environment setting for SPI flash */
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index 66cacdf..d204809 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -45,7 +45,7 @@
  * environment to a non-zero value and enable CONFIG_BOOTCOUNT_LIMIT
  * in the board config.
  */
-#define CONFIG_SYS_BOOTCOUNT_ADDR	0x44E3E000
+#define BOOTCOUNT_ADDR	0x44E3E000
 
 /*
  * SPL related defines.  The Public RAM memory map the ROM defines the
diff --git a/include/configs/tqma6_wru4.h b/include/configs/tqma6_wru4.h
index d94f790..00a2dea 100644
--- a/include/configs/tqma6_wru4.h
+++ b/include/configs/tqma6_wru4.h
@@ -34,7 +34,7 @@
 /* LED */
 
 /* Bootcounter */
-#define CONFIG_SYS_BOOTCOUNT_ADDR	IRAM_BASE_ADDR
+#define BOOTCOUNT_ADDR	IRAM_BASE_ADDR
 #define CONFIG_SYS_BOOTCOUNT_BE
 
 #endif /* __CONFIG_TQMA6_WRU4_H */
diff --git a/include/configs/x600.h b/include/configs/x600.h
index 80e5b1c..a13f7e1 100644
--- a/include/configs/x600.h
+++ b/include/configs/x600.h
@@ -120,7 +120,7 @@
 #define CONFIG_SYS_LOAD_ADDR			0x00800000
 
 /* Use last 2 lwords in internal SRAM for bootcounter */
-#define CONFIG_SYS_BOOTCOUNT_ADDR		(CONFIG_SRAM_BASE + \
+#define BOOTCOUNT_ADDR		(CONFIG_SRAM_BASE + \
 						 CONFIG_SRAM_SIZE)
 
 #define CONFIG_HOSTNAME				x600
-- 
2.7.4



More information about the U-Boot mailing list