[PATCH 07/20] Convert CONFIG_SYS_FLASH_CHECKSUM to Kconfig
Tom Rini
trini at konsulko.com
Sat Jul 23 19:04:59 CEST 2022
This converts the following to Kconfig:
CONFIG_SYS_FLASH_CHECKSUM
Signed-off-by: Tom Rini <trini at konsulko.com>
---
configs/M5249EVB_defconfig | 1 +
configs/M5282EVB_defconfig | 1 +
drivers/mtd/Kconfig | 7 +++++++
include/configs/M5249EVB.h | 1 -
include/configs/M5282EVB.h | 1 -
include/configs/MPC837XERDB.h | 1 -
include/configs/MPC8548CDS.h | 1 -
include/configs/P1010RDB.h | 1 -
include/configs/p1_p2_rdb_pc.h | 1 -
include/configs/socrates.h | 1 -
10 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/configs/M5249EVB_defconfig b/configs/M5249EVB_defconfig
index f99375b535ed..74301045c8e4 100644
--- a/configs/M5249EVB_defconfig
+++ b/configs/M5249EVB_defconfig
@@ -28,4 +28,5 @@ CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_CFI_WIDTH_16BIT=y
CONFIG_SYS_FLASH_PROTECTION=y
CONFIG_SYS_FLASH_CFI=y
+CONFIG_SYS_FLASH_CHECKSUM=y
CONFIG_MCFUART=y
diff --git a/configs/M5282EVB_defconfig b/configs/M5282EVB_defconfig
index 42940e1000a4..aeb7738ebe77 100644
--- a/configs/M5282EVB_defconfig
+++ b/configs/M5282EVB_defconfig
@@ -33,6 +33,7 @@ CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_CFI_WIDTH_16BIT=y
CONFIG_SYS_FLASH_PROTECTION=y
CONFIG_SYS_FLASH_CFI=y
+CONFIG_SYS_FLASH_CHECKSUM=y
CONFIG_DM_ETH=y
CONFIG_MCFFEC=y
CONFIG_MII=y
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 8c6719378ca7..985cc01e425d 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -132,6 +132,13 @@ config SYS_FLASH_CFI
Define if the flash driver uses extra elements in the
common flash structure for storing flash geometry.
+config SYS_FLASH_CHECKSUM
+ bool "Compute and print flash CRC if 'flashchecksum' is set in the environment"
+ depends on MTD_NOR_FLASH
+ help
+ If the variable flashchecksum is set in the environment, perform a CRC
+ of the flash and print the value to console.
+
config ALTERA_QSPI
bool "Altera Generic Quad SPI Controller"
depends on DM_MTD
diff --git a/include/configs/M5249EVB.h b/include/configs/M5249EVB.h
index 1889a235a2a1..39bffc29ff22 100644
--- a/include/configs/M5249EVB.h
+++ b/include/configs/M5249EVB.h
@@ -78,7 +78,6 @@
# define CONFIG_SYS_FLASH_SIZE 0x1000000 /* Max size that the board might have */
# define CONFIG_SYS_MAX_FLASH_SECT 137 /* max number of sectors on one chip */
-# define CONFIG_SYS_FLASH_CHECKSUM
# define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
#endif
diff --git a/include/configs/M5282EVB.h b/include/configs/M5282EVB.h
index 9f06f41ce11b..c476b0c4475a 100644
--- a/include/configs/M5282EVB.h
+++ b/include/configs/M5282EVB.h
@@ -96,7 +96,6 @@
# define CONFIG_SYS_FLASH_SIZE 0x1000000 /* Max size that the board might have */
# define CONFIG_SYS_MAX_FLASH_SECT 137 /* max number of sectors on one chip */
-# define CONFIG_SYS_FLASH_CHECKSUM
# define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
#endif
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index 8fffb0c5cc00..87ae9530852f 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -144,7 +144,6 @@
#define CONFIG_SYS_MAX_FLASH_SECT 256 /* max sectors per device */
-#undef CONFIG_SYS_FLASH_CHECKSUM
#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index 4c33188c5000..febe8c2476f2 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -125,7 +125,6 @@
#define CONFIG_SYS_FLASH_BANKS_LIST \
{CONFIG_SYS_FLASH_BASE_PHYS + 0x800000, CONFIG_SYS_FLASH_BASE_PHYS}
#define CONFIG_SYS_MAX_FLASH_SECT 128 /* sectors per device */
-#undef CONFIG_SYS_FLASH_CHECKSUM
#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index def21e55a611..9f680f21b8a6 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -166,7 +166,6 @@ extern unsigned long get_sdram_size(void);
#define CONFIG_SYS_FLASH_QUIET_TEST
#define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */
-#undef CONFIG_SYS_FLASH_CHECKSUM
#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index 137114fcbc76..95c438f6e970 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -198,7 +198,6 @@
#define CONFIG_SYS_FLASH_QUIET_TEST
#define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */
-#undef CONFIG_SYS_FLASH_CHECKSUM
#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
diff --git a/include/configs/socrates.h b/include/configs/socrates.h
index 5dc8d8559882..c3b1be969879 100644
--- a/include/configs/socrates.h
+++ b/include/configs/socrates.h
@@ -89,7 +89,6 @@
#define CONFIG_SYS_FLASH_BASE CONFIG_SYS_LBC_FLASH_BASE /* start of FLASH */
#define CONFIG_SYS_MAX_FLASH_SECT 256 /* sectors per device */
-#undef CONFIG_SYS_FLASH_CHECKSUM
#define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
--
2.25.1
More information about the U-Boot
mailing list