Skip to contentSkip to conversation

core: Rework REGMAP symbols implementation

PATCH In review Tom Rini 2 participants 4 messages Mar 17 – Mar 30

Subsystems (10)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 core: Rework REGMAP symbols implementation

As exposed by "make randconfig", we have an issue with the dependencies for REGMAP (and xPL variants). As this is a library function, it should always be selected and not depended on by other functionality. This is largely done correctly today, so just correct the few outliers.

---
 arch/arm/mach-airoha/Kconfig       |  1 +
 arch/arm/mach-aspeed/Kconfig       |  1 +
 arch/powerpc/cpu/mpc83xx/Kconfig   |  1 +
 configs/imx8m_data_modul.config    |  1 -
 configs/imx95_evk.config           |  1 -
 configs/imx_dhsom.config           |  1 -
 configs/kontron-osm-s-mx8mp.config |  1 -
 configs/kontron-osm-s-mx93.config  |  1 -
 configs/renesas_rcar64.config      |  1 -
 drivers/clk/microchip/Kconfig      |  1 -
 drivers/core/Kconfig               | 19 +++++++++++--------
 drivers/misc/Kconfig               |  3 ++-
 drivers/mmc/Kconfig                |  3 ++-
 13 files changed, 18 insertions(+), 17 deletions(-)
arch/arm/mach-airoha/Kconfig +1 -0
index b9cd0a413e10..4b0374001d0c 100644
@@ -10,6 +10,7 @@ config TARGET_EN7523
 	bool "Airoha EN7523 SoC"
 	select CPU_V7A
 	select ARMV7_SET_CORTEX_SMPEN
+	select REGMAP
 	help
 	  The Airoha EN7523 family (en7523/en7529/en7562) is an ARM-based
 	  SoCs with a dual-core CPU. It comes with Wi-Fi 5/6 support and
arch/arm/mach-aspeed/Kconfig +1 -0
index 9cf60378c118..c88b1e59366e 100644
@@ -18,6 +18,7 @@ config ASPEED_AST2500
 	bool "Support Aspeed AST2500 SoC"
 	select CPU_ARM1176
 	select DM_RESET
+	select REGMAP
 	help
 	  The Aspeed AST2500 is a ARM-based SoC with arm1176 CPU.
 	  It is used as Board Management Controller on many server boards,
arch/powerpc/cpu/mpc83xx/Kconfig +1 -0
index 8ac83420ee22..0dc72c874237 100644
@@ -73,6 +73,7 @@ config TARGET_KMTEPR2
 config TARGET_GAZERBEAM
 	bool "Support gazerbeam"
 	select ARCH_MPC8308
+	select REGMAP
 	select SYS_FSL_ERRATUM_ESDHC111
 	imply ENV_IS_IN_FLASH
 	help
configs/imx8m_data_modul.config +0 -1
index 4634a0972f09..18c7bb536fa0 100644
@@ -149,7 +149,6 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX8M=y
 CONFIG_POWER_DOMAIN=y
 CONFIG_PROT_TCP_SACK=y
-CONFIG_REGMAP=y
 CONFIG_RGMII=y
 CONFIG_RTC_M41T62=y
 CONFIG_SF_DEFAULT_SPEED=50000000
configs/imx95_evk.config +0 -1
index 3db583cce597..e7832d86fe91 100644
@@ -92,7 +92,6 @@ CONFIG_ETHPRIME="eth0"
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SYS_RX_ETH_BUFFER=8
 CONFIG_SPL_DM=y
-CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_CLK=y
configs/imx_dhsom.config +0 -1
index 4a3ddc7e90b7..a0d67c8a0688 100644
@@ -28,7 +28,6 @@ CONFIG_ENV_SECT_SIZE_AUTO=y
 CONFIG_ENV_REDUNDANT=y
 CONFIG_ENV_RELOC_GD_ENV_ADDR=y
 
-CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 
 CONFIG_DM_GPIO=y
configs/kontron-osm-s-mx8mp.config +0 -1
index a8881726e079..786fd3e7a6de 100644
@@ -117,7 +117,6 @@ CONFIG_TFTP_TSIZE=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
-CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
configs/kontron-osm-s-mx93.config +0 -1
index a6d316de3d87..c2d4de4efa8a 100644
@@ -115,7 +115,6 @@ CONFIG_TFTP_TSIZE=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
-CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_ADC=y
 CONFIG_ADC_IMX93=y
configs/renesas_rcar64.config +0 -1
index c2cb88dc157f..da4b262fc6a5 100644
@@ -6,7 +6,6 @@ CONFIG_CMD_TEMPERATURE=y
 CONFIG_DM_THERMAL=y
 CONFIG_PHY_ANEG_TIMEOUT=20000
 CONFIG_RCAR_GEN3_THERMAL=y
-CONFIG_REGMAP=y
 CONFIG_REMAKE_ELF=y
 CONFIG_RENESAS_RPC_SPI=y
 CONFIG_SUPPORT_RAW_INITRD=y
drivers/clk/microchip/Kconfig +0 -1
index 62072e100b18..6ac7c9c56547 100644
@@ -2,6 +2,5 @@ config CLK_MPFS
 	bool "Clock support for Microchip PolarFire SoC"
 	depends on CLK && CLK_CCF
 	depends on SYSCON
-	depends on REGMAP
 	help
 	  This enables support clock driver for Microchip PolarFire SoC platform.
drivers/core/Kconfig +11 -8
index c9253099e6ea..5419bf65b5d6 100644
@@ -195,7 +195,7 @@ config DM_DMA
 	  the physical address space.
 
 config REGMAP
-	bool "Support register maps"
+	bool
 	depends on DM
 	select DEVRES
 	help
@@ -206,7 +206,7 @@ config REGMAP
 	  direct memory access.
 
 config SPL_REGMAP
-	bool "Support register maps in SPL"
+	bool
 	depends on SPL_DM
 	help
 	  Hardware peripherals tend to have one or more sets of registers
@@ -216,7 +216,7 @@ config SPL_REGMAP
 	  direct memory access.
 
 config TPL_REGMAP
-	bool "Support register maps in TPL"
+	bool
 	depends on TPL_DM
 	help
 	  Hardware peripherals tend to have one or more sets of registers
@@ -226,7 +226,7 @@ config TPL_REGMAP
 	  direct memory access.
 
 config VPL_REGMAP
-	bool "Support register maps in VPL"
+	bool
 	depends on VPL_DM
 	help
 	  Hardware peripherals tend to have one or more sets of registers
@@ -237,7 +237,7 @@ config VPL_REGMAP
 
 config SYSCON
 	bool "Support system controllers"
-	depends on REGMAP
+	select REGMAP
 	help
 	  Many SoCs have a number of system controllers which are dealt with
 	  as a group by a single driver. Some common functionality is provided
@@ -246,7 +246,8 @@ config SYSCON
 
 config SPL_SYSCON
 	bool "Support system controllers in SPL"
-	depends on SPL_REGMAP
+	depends on SPL_DM
+	select SPL_REGMAP
 	help
 	  Many SoCs have a number of system controllers which are dealt with
 	  as a group by a single driver. Some common functionality is provided
@@ -255,7 +256,8 @@ config SPL_SYSCON
 
 config TPL_SYSCON
 	bool "Support system controllers in TPL"
-	depends on TPL_REGMAP
+	depends on TPL_DM
+	select TPL_REGMAP
 	help
 	  Many SoCs have a number of system controllers which are dealt with
 	  as a group by a single driver. Some common functionality is provided
@@ -264,7 +266,8 @@ config TPL_SYSCON
 
 config VPL_SYSCON
 	bool "Support system controllers in VPL"
-	depends on VPL_REGMAP
+	depends on VPL_DM
+	select VPL_REGMAP
 	help
 	  Many SoCs have a number of system controllers which are dealt with
 	  as a group by a single driver. Some common functionality is provided
drivers/misc/Kconfig +2 -1
index a0aa290480eb..798f1dbf26cf 100644
@@ -350,7 +350,8 @@ config MXS_OCOTP
 
 config NPCM_HOST
 	bool "Enable support espi or LPC for Host"
-	depends on REGMAP && SYSCON
+	depends on SYSCON
+	select REGMAP
 	help
 	  Enable NPCM BMC espi or LPC support for Host reading and writing.
 
drivers/mmc/Kconfig +2 -1
index 39caf2eff1b7..22bd3a972bdf 100644
@@ -627,8 +627,9 @@ config MMC_SDHCI_AM654
 	depends on ARCH_K3
 	depends on MMC_SDHCI
 	depends on OF_CONTROL
-	depends on REGMAP
 	select MMC_SDHCI_IO_ACCESSORS
+	select REGMAP
+	select SPL_REGMAP if SPL_MMC
 	help
 	  Support for Secure Digital Host Controller Interface (SDHCI)
 	  controllers present on TI's AM654 SOCs.
Signature · 1 line
2.43.0
Acked-by on v1 1/1
#1 lore raw
Quoted 239 lines · Tom Rini

As exposed by "make randconfig", we have an issue with the dependencies for REGMAP (and xPL variants). As this is a library function, it should always be selected and not depended on by other functionality. This is largely done correctly today, so just correct the few outliers.

---
 arch/arm/mach-airoha/Kconfig       |  1 +
 arch/arm/mach-aspeed/Kconfig       |  1 +
 arch/powerpc/cpu/mpc83xx/Kconfig   |  1 +
 configs/imx8m_data_modul.config    |  1 -
 configs/imx95_evk.config           |  1 -
 configs/imx_dhsom.config           |  1 -
 configs/kontron-osm-s-mx8mp.config |  1 -
 configs/kontron-osm-s-mx93.config  |  1 -
 configs/renesas_rcar64.config      |  1 -
 drivers/clk/microchip/Kconfig      |  1 -
 drivers/core/Kconfig               | 19 +++++++++++--------
 drivers/misc/Kconfig               |  3 ++-
 drivers/mmc/Kconfig                |  3 ++-
 13 files changed, 18 insertions(+), 17 deletions(-)
arch/arm/mach-airoha/Kconfig +1 -0
index b9cd0a413e10..4b0374001d0c 100644
@@ -10,6 +10,7 @@ config TARGET_EN7523
 	bool "Airoha EN7523 SoC"
 	select CPU_V7A
 	select ARMV7_SET_CORTEX_SMPEN
+	select REGMAP
 	help
 	  The Airoha EN7523 family (en7523/en7529/en7562) is an ARM-based
 	  SoCs with a dual-core CPU. It comes with Wi-Fi 5/6 support and
arch/arm/mach-aspeed/Kconfig +1 -0
index 9cf60378c118..c88b1e59366e 100644
@@ -18,6 +18,7 @@ config ASPEED_AST2500
 	bool "Support Aspeed AST2500 SoC"
 	select CPU_ARM1176
 	select DM_RESET
+	select REGMAP
 	help
 	  The Aspeed AST2500 is a ARM-based SoC with arm1176 CPU.
 	  It is used as Board Management Controller on many server boards,
arch/powerpc/cpu/mpc83xx/Kconfig +1 -0
index 8ac83420ee22..0dc72c874237 100644
@@ -73,6 +73,7 @@ config TARGET_KMTEPR2
 config TARGET_GAZERBEAM
 	bool "Support gazerbeam"
 	select ARCH_MPC8308
+	select REGMAP
 	select SYS_FSL_ERRATUM_ESDHC111
 	imply ENV_IS_IN_FLASH
 	help
configs/imx8m_data_modul.config +0 -1
index 4634a0972f09..18c7bb536fa0 100644
@@ -149,7 +149,6 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX8M=y
 CONFIG_POWER_DOMAIN=y
 CONFIG_PROT_TCP_SACK=y
-CONFIG_REGMAP=y
 CONFIG_RGMII=y
 CONFIG_RTC_M41T62=y
 CONFIG_SF_DEFAULT_SPEED=50000000
configs/imx95_evk.config +0 -1
index 3db583cce597..e7832d86fe91 100644
@@ -92,7 +92,6 @@ CONFIG_ETHPRIME="eth0"
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SYS_RX_ETH_BUFFER=8
 CONFIG_SPL_DM=y
-CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_CLK=y
configs/imx_dhsom.config +0 -1
index 4a3ddc7e90b7..a0d67c8a0688 100644
@@ -28,7 +28,6 @@ CONFIG_ENV_SECT_SIZE_AUTO=y
 CONFIG_ENV_REDUNDANT=y
 CONFIG_ENV_RELOC_GD_ENV_ADDR=y
 
-CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 
 CONFIG_DM_GPIO=y
configs/kontron-osm-s-mx8mp.config +0 -1
index a8881726e079..786fd3e7a6de 100644
@@ -117,7 +117,6 @@ CONFIG_TFTP_TSIZE=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
-CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
configs/kontron-osm-s-mx93.config +0 -1
index a6d316de3d87..c2d4de4efa8a 100644
@@ -115,7 +115,6 @@ CONFIG_TFTP_TSIZE=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
-CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_ADC=y
 CONFIG_ADC_IMX93=y
configs/renesas_rcar64.config +0 -1
index c2cb88dc157f..da4b262fc6a5 100644
@@ -6,7 +6,6 @@ CONFIG_CMD_TEMPERATURE=y
 CONFIG_DM_THERMAL=y
 CONFIG_PHY_ANEG_TIMEOUT=20000
 CONFIG_RCAR_GEN3_THERMAL=y
-CONFIG_REGMAP=y
 CONFIG_REMAKE_ELF=y
 CONFIG_RENESAS_RPC_SPI=y
 CONFIG_SUPPORT_RAW_INITRD=y
drivers/clk/microchip/Kconfig +0 -1
index 62072e100b18..6ac7c9c56547 100644
@@ -2,6 +2,5 @@ config CLK_MPFS
 	bool "Clock support for Microchip PolarFire SoC"
 	depends on CLK && CLK_CCF
 	depends on SYSCON
-	depends on REGMAP
 	help
 	  This enables support clock driver for Microchip PolarFire SoC platform.
drivers/core/Kconfig +11 -8
index c9253099e6ea..5419bf65b5d6 100644
@@ -195,7 +195,7 @@ config DM_DMA
 	  the physical address space.
 
 config REGMAP
-	bool "Support register maps"
+	bool
 	depends on DM
 	select DEVRES
 	help
@@ -206,7 +206,7 @@ config REGMAP
 	  direct memory access.
 
 config SPL_REGMAP
-	bool "Support register maps in SPL"
+	bool
 	depends on SPL_DM
 	help
 	  Hardware peripherals tend to have one or more sets of registers
@@ -216,7 +216,7 @@ config SPL_REGMAP
 	  direct memory access.
 
 config TPL_REGMAP
-	bool "Support register maps in TPL"
+	bool
 	depends on TPL_DM
 	help
 	  Hardware peripherals tend to have one or more sets of registers
@@ -226,7 +226,7 @@ config TPL_REGMAP
 	  direct memory access.
 
 config VPL_REGMAP
-	bool "Support register maps in VPL"
+	bool
 	depends on VPL_DM
 	help
 	  Hardware peripherals tend to have one or more sets of registers
@@ -237,7 +237,7 @@ config VPL_REGMAP
 
 config SYSCON
 	bool "Support system controllers"
-	depends on REGMAP
+	select REGMAP
 	help
 	  Many SoCs have a number of system controllers which are dealt with
 	  as a group by a single driver. Some common functionality is provided
@@ -246,7 +246,8 @@ config SYSCON
 
 config SPL_SYSCON
 	bool "Support system controllers in SPL"
-	depends on SPL_REGMAP
+	depends on SPL_DM
+	select SPL_REGMAP
 	help
 	  Many SoCs have a number of system controllers which are dealt with
 	  as a group by a single driver. Some common functionality is provided
@@ -255,7 +256,8 @@ config SPL_SYSCON
 
 config TPL_SYSCON
 	bool "Support system controllers in TPL"
-	depends on TPL_REGMAP
+	depends on TPL_DM
+	select TPL_REGMAP
 	help
 	  Many SoCs have a number of system controllers which are dealt with
 	  as a group by a single driver. Some common functionality is provided
@@ -264,7 +266,8 @@ config TPL_SYSCON
 
 config VPL_SYSCON
 	bool "Support system controllers in VPL"
-	depends on VPL_REGMAP
+	depends on VPL_DM
+	select VPL_REGMAP
 	help
 	  Many SoCs have a number of system controllers which are dealt with
 	  as a group by a single driver. Some common functionality is provided
drivers/misc/Kconfig +2 -1
index a0aa290480eb..798f1dbf26cf 100644
@@ -350,7 +350,8 @@ config MXS_OCOTP
 
 config NPCM_HOST
 	bool "Enable support espi or LPC for Host"
-	depends on REGMAP && SYSCON
+	depends on SYSCON
+	select REGMAP
 	help
 	  Enable NPCM BMC espi or LPC support for Host reading and writing.
 
drivers/mmc/Kconfig +0 -0
index 39caf2eff1b7..22bd3a972bdf 100644

drivers/mmc/Kconfig config MMC_SDHCI_AM654 · line 632

Quoted 7 lines
drivers/mmc/Kconfig +2 -1
@@ -627,8 +627,9 @@ config MMC_SDHCI_AM654
 	depends on ARCH_K3
 	depends on MMC_SDHCI
 	depends on OF_CONTROL
-	depends on REGMAP
 	select MMC_SDHCI_IO_ACCESSORS
+	select REGMAP
+	select SPL_REGMAP if SPL_MMC

With this there should be no need to explicitly set REGMAP configs like we do in most of K3 defconfigs for using MMC.

Quoted 3 lines
drivers/mmc/Kconfig +0 -0
 	help
 	  Support for Secure Digital Host Controller Interface (SDHCI)
 	  controllers present on TI's AM654 SOCs.
author
#2 lore raw
Quoted 235 lines · Anshul Dalal
Quoted 234 lines · Tom Rini

As exposed by "make randconfig", we have an issue with the dependencies for REGMAP (and xPL variants). As this is a library function, it should always be selected and not depended on by other functionality. This is largely done correctly today, so just correct the few outliers.

---
 arch/arm/mach-airoha/Kconfig       |  1 +
 arch/arm/mach-aspeed/Kconfig       |  1 +
 arch/powerpc/cpu/mpc83xx/Kconfig   |  1 +
 configs/imx8m_data_modul.config    |  1 -
 configs/imx95_evk.config           |  1 -
 configs/imx_dhsom.config           |  1 -
 configs/kontron-osm-s-mx8mp.config |  1 -
 configs/kontron-osm-s-mx93.config  |  1 -
 configs/renesas_rcar64.config      |  1 -
 drivers/clk/microchip/Kconfig      |  1 -
 drivers/core/Kconfig               | 19 +++++++++++--------
 drivers/misc/Kconfig               |  3 ++-
 drivers/mmc/Kconfig                |  3 ++-
 13 files changed, 18 insertions(+), 17 deletions(-)
arch/arm/mach-airoha/Kconfig +1 -0
index b9cd0a413e10..4b0374001d0c 100644
@@ -10,6 +10,7 @@ config TARGET_EN7523
 	bool "Airoha EN7523 SoC"
 	select CPU_V7A
 	select ARMV7_SET_CORTEX_SMPEN
+	select REGMAP
 	help
 	  The Airoha EN7523 family (en7523/en7529/en7562) is an ARM-based
 	  SoCs with a dual-core CPU. It comes with Wi-Fi 5/6 support and
arch/arm/mach-aspeed/Kconfig +1 -0
index 9cf60378c118..c88b1e59366e 100644
@@ -18,6 +18,7 @@ config ASPEED_AST2500
 	bool "Support Aspeed AST2500 SoC"
 	select CPU_ARM1176
 	select DM_RESET
+	select REGMAP
 	help
 	  The Aspeed AST2500 is a ARM-based SoC with arm1176 CPU.
 	  It is used as Board Management Controller on many server boards,
arch/powerpc/cpu/mpc83xx/Kconfig +1 -0
index 8ac83420ee22..0dc72c874237 100644
@@ -73,6 +73,7 @@ config TARGET_KMTEPR2
 config TARGET_GAZERBEAM
 	bool "Support gazerbeam"
 	select ARCH_MPC8308
+	select REGMAP
 	select SYS_FSL_ERRATUM_ESDHC111
 	imply ENV_IS_IN_FLASH
 	help
configs/imx8m_data_modul.config +0 -1
index 4634a0972f09..18c7bb536fa0 100644
@@ -149,7 +149,6 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX8M=y
 CONFIG_POWER_DOMAIN=y
 CONFIG_PROT_TCP_SACK=y
-CONFIG_REGMAP=y
 CONFIG_RGMII=y
 CONFIG_RTC_M41T62=y
 CONFIG_SF_DEFAULT_SPEED=50000000
configs/imx95_evk.config +0 -1
index 3db583cce597..e7832d86fe91 100644
@@ -92,7 +92,6 @@ CONFIG_ETHPRIME="eth0"
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SYS_RX_ETH_BUFFER=8
 CONFIG_SPL_DM=y
-CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_CLK=y
configs/imx_dhsom.config +0 -1
index 4a3ddc7e90b7..a0d67c8a0688 100644
@@ -28,7 +28,6 @@ CONFIG_ENV_SECT_SIZE_AUTO=y
 CONFIG_ENV_REDUNDANT=y
 CONFIG_ENV_RELOC_GD_ENV_ADDR=y
 
-CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 
 CONFIG_DM_GPIO=y
configs/kontron-osm-s-mx8mp.config +0 -1
index a8881726e079..786fd3e7a6de 100644
@@ -117,7 +117,6 @@ CONFIG_TFTP_TSIZE=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
-CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
configs/kontron-osm-s-mx93.config +0 -1
index a6d316de3d87..c2d4de4efa8a 100644
@@ -115,7 +115,6 @@ CONFIG_TFTP_TSIZE=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
-CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_ADC=y
 CONFIG_ADC_IMX93=y
configs/renesas_rcar64.config +0 -1
index c2cb88dc157f..da4b262fc6a5 100644
@@ -6,7 +6,6 @@ CONFIG_CMD_TEMPERATURE=y
 CONFIG_DM_THERMAL=y
 CONFIG_PHY_ANEG_TIMEOUT=20000
 CONFIG_RCAR_GEN3_THERMAL=y
-CONFIG_REGMAP=y
 CONFIG_REMAKE_ELF=y
 CONFIG_RENESAS_RPC_SPI=y
 CONFIG_SUPPORT_RAW_INITRD=y
drivers/clk/microchip/Kconfig +0 -1
index 62072e100b18..6ac7c9c56547 100644
@@ -2,6 +2,5 @@ config CLK_MPFS
 	bool "Clock support for Microchip PolarFire SoC"
 	depends on CLK && CLK_CCF
 	depends on SYSCON
-	depends on REGMAP
 	help
 	  This enables support clock driver for Microchip PolarFire SoC platform.
drivers/core/Kconfig +11 -8
index c9253099e6ea..5419bf65b5d6 100644
@@ -195,7 +195,7 @@ config DM_DMA
 	  the physical address space.
 
 config REGMAP
-	bool "Support register maps"
+	bool
 	depends on DM
 	select DEVRES
 	help
@@ -206,7 +206,7 @@ config REGMAP
 	  direct memory access.
 
 config SPL_REGMAP
-	bool "Support register maps in SPL"
+	bool
 	depends on SPL_DM
 	help
 	  Hardware peripherals tend to have one or more sets of registers
@@ -216,7 +216,7 @@ config SPL_REGMAP
 	  direct memory access.
 
 config TPL_REGMAP
-	bool "Support register maps in TPL"
+	bool
 	depends on TPL_DM
 	help
 	  Hardware peripherals tend to have one or more sets of registers
@@ -226,7 +226,7 @@ config TPL_REGMAP
 	  direct memory access.
 
 config VPL_REGMAP
-	bool "Support register maps in VPL"
+	bool
 	depends on VPL_DM
 	help
 	  Hardware peripherals tend to have one or more sets of registers
@@ -237,7 +237,7 @@ config VPL_REGMAP
 
 config SYSCON
 	bool "Support system controllers"
-	depends on REGMAP
+	select REGMAP
 	help
 	  Many SoCs have a number of system controllers which are dealt with
 	  as a group by a single driver. Some common functionality is provided
@@ -246,7 +246,8 @@ config SYSCON
 
 config SPL_SYSCON
 	bool "Support system controllers in SPL"
-	depends on SPL_REGMAP
+	depends on SPL_DM
+	select SPL_REGMAP
 	help
 	  Many SoCs have a number of system controllers which are dealt with
 	  as a group by a single driver. Some common functionality is provided
@@ -255,7 +256,8 @@ config SPL_SYSCON
 
 config TPL_SYSCON
 	bool "Support system controllers in TPL"
-	depends on TPL_REGMAP
+	depends on TPL_DM
+	select TPL_REGMAP
 	help
 	  Many SoCs have a number of system controllers which are dealt with
 	  as a group by a single driver. Some common functionality is provided
@@ -264,7 +266,8 @@ config TPL_SYSCON
 
 config VPL_SYSCON
 	bool "Support system controllers in VPL"
-	depends on VPL_REGMAP
+	depends on VPL_DM
+	select VPL_REGMAP
 	help
 	  Many SoCs have a number of system controllers which are dealt with
 	  as a group by a single driver. Some common functionality is provided
drivers/misc/Kconfig +2 -1
index a0aa290480eb..798f1dbf26cf 100644
@@ -350,7 +350,8 @@ config MXS_OCOTP
 
 config NPCM_HOST
 	bool "Enable support espi or LPC for Host"
-	depends on REGMAP && SYSCON
+	depends on SYSCON
+	select REGMAP
 	help
 	  Enable NPCM BMC espi or LPC support for Host reading and writing.
 
Quoted 15 lines

drivers/mmc/Kconfig config MMC_SDHCI_AM654 · line 632

Quoted 12 lines
drivers/mmc/Kconfig +2 -1
index 39caf2eff1b7..22bd3a972bdf 100644
@@ -627,8 +627,9 @@ config MMC_SDHCI_AM654
 	depends on ARCH_K3
 	depends on MMC_SDHCI
 	depends on OF_CONTROL
-	depends on REGMAP
 	select MMC_SDHCI_IO_ACCESSORS
+	select REGMAP
+	select SPL_REGMAP if SPL_MMC

With this there should be no need to explicitly set REGMAP configs like we do in most of K3 defconfigs for using MMC.

Correct. A later resync will remove a lot of lines. The config fragments however are always untouched and so are part of this patch for completness.

Signature · 1 line
Tom
author
#3 lore raw
In reply to Tom Rini
Quoted 6 lines · Tom Rini

As exposed by "make randconfig", we have an issue with the dependencies for REGMAP (and xPL variants). As this is a library function, it should always be selected and not depended on by other functionality. This is largely done correctly today, so just correct the few outliers.

Applied to u-boot/next, thanks!

[1/1] core: Rework REGMAP symbols implementation

      commit: 0da1866a8fdd4d4bc4837ef2af281dbe010ae16b
Signature · 1 line
Tom