[PATCH] configs: Migrate CONFIG_ST_SMI to Kconfig

Patrick Delaunay patrick.delaunay at foss.st.com
Tue Sep 21 18:36:03 CEST 2021


Use moveconfig.py script to convert the define CONFIG_ST_SMI to Kconfig
and move this entries to defconfigs.

Before migration, the st_smi.c driver was empty when CONFIG_MTD_NOR_FLASH
wasn't activated; it is now managed in Kconfig by the "depends on" and
this driver is not compiled.

After this patch, the driver st_smic.c is no more used in U-Boot;
it was only used in SPEAr products before commit 570c3dcfc153 ("arm:
Remove spear600 boards and the rest of SPEAr support").

Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
---
In the first migration process (without depends on) the config
CONFIG_ST_SMI was added in bcm7445_defconfig and bcm7260_defconfig.

But after adding the "depends on MTD_NOR_FLASH" and a Rsync all defconfig
files using moveconfig.py the CONFIG_ST_SMI is also deactivated in these
2 last users:
- bcm7260_defconfig
- bcm7445_defconfig

The U-Boot size don't change for these 2 defconfig (tested with buildman).

 drivers/mtd/Kconfig          | 7 +++++++
 drivers/mtd/st_smi.c         | 3 ---
 include/configs/bcmstb.h     | 1 -
 scripts/config_whitelist.txt | 1 -
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index b303fabe0f..9ba163bdab 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -109,6 +109,13 @@ config HBMC_AM654
 	 This is the driver for HyperBus controller on TI's AM65x and
 	 other SoCs
 
+config ST_SMI
+	bool "SMI driver"
+	depends on MTD_NOR_FLASH
+	help
+	  This enables access to the serial memory interface controller (SMI)
+	  used in STMicroelectronics SPEAr products.
+
 source "drivers/mtd/nand/Kconfig"
 
 source "drivers/mtd/spi/Kconfig"
diff --git a/drivers/mtd/st_smi.c b/drivers/mtd/st_smi.c
index 7c652e6c53..9b9393fbb1 100644
--- a/drivers/mtd/st_smi.c
+++ b/drivers/mtd/st_smi.c
@@ -13,8 +13,6 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 
-#if defined(CONFIG_MTD_NOR_FLASH)
-
 static struct smi_regs *const smicntl =
     (struct smi_regs * const)CONFIG_SYS_SMI_BASE;
 static ulong bank_base[CONFIG_SYS_MAX_FLASH_BANKS] =
@@ -562,4 +560,3 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
 	puts(" done\n");
 	return rcode;
 }
-#endif
diff --git a/include/configs/bcmstb.h b/include/configs/bcmstb.h
index 7f1c298cdc..54e5655af6 100644
--- a/include/configs/bcmstb.h
+++ b/include/configs/bcmstb.h
@@ -127,7 +127,6 @@ extern phys_addr_t prior_stage_fdt_address;
 /*
  * Flash configuration.
  */
-#define CONFIG_ST_SMI
 #define CONFIG_SPI_FLASH_STMICRO
 #define CONFIG_SPI_FLASH_MACRONIX
 
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 36b8cc1db0..6c8277cba9 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -1308,7 +1308,6 @@ CONFIG_STM32_FLASH
 CONFIG_STV0991
 CONFIG_STV0991_HZ
 CONFIG_STV0991_HZ_CLOCK
-CONFIG_ST_SMI
 CONFIG_SXNI855T
 CONFIG_SYSFS
 CONFIG_SYSMGR_ISWGRP_HANDOFF
-- 
2.25.1



More information about the U-Boot mailing list