PCI: kirin: select REGMAP and REGMAP_MMIO

Message ID 04636141da1d6d592174eefb56760511468d035d.1668410580.git.josh@joshtriplett.org
State New
Headers
Series PCI: kirin: select REGMAP and REGMAP_MMIO |

Commit Message

Josh Triplett Nov. 14, 2022, 7:23 a.m. UTC
  pcie-kirin uses regmaps, and needs to pull them in; otherwise, with
CONFIG_PCIE_KIRIN=y and without CONFIG_REGMAP:

drivers/pci/controller/dwc/pcie-kirin.c:359:21: error: variable ‘pcie_kirin_regmap_conf’ has initializer but incomplete type
  359 | static const struct regmap_config pcie_kirin_regmap_conf = {

Similarly, without CONFIG_REGMAP_MMIO, pcie-kirin produces a linker
failure looking for __devm_regmap_init_mmio_clk.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 drivers/pci/controller/dwc/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Lorenzo Pieralisi March 10, 2023, 10:40 a.m. UTC | #1
On Sun, 13 Nov 2022 23:23:26 -0800, Josh Triplett wrote:
> pcie-kirin uses regmaps, and needs to pull them in; otherwise, with
> CONFIG_PCIE_KIRIN=y and without CONFIG_REGMAP:
> 
> drivers/pci/controller/dwc/pcie-kirin.c:359:21: error: variable ‘pcie_kirin_regmap_conf’ has initializer but incomplete type
>   359 | static const struct regmap_config pcie_kirin_regmap_conf = {
> 
> Similarly, without CONFIG_REGMAP_MMIO, pcie-kirin produces a linker
> failure looking for __devm_regmap_init_mmio_clk.
> 
> [...]

Applied to controller/kirin, thanks!

[1/1] PCI: kirin: select REGMAP and REGMAP_MMIO
      https://git.kernel.org/pci/pci/c/3a2776e8a0e1

Thanks,
Lorenzo
  

Patch

diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
index 62ce3abf0f19..5412938c2cef 100644
--- a/drivers/pci/controller/dwc/Kconfig
+++ b/drivers/pci/controller/dwc/Kconfig
@@ -277,6 +277,8 @@  config PCIE_KIRIN
 	tristate "HiSilicon Kirin series SoCs PCIe controllers"
 	depends on PCI_MSI_IRQ_DOMAIN
 	select PCIE_DW_HOST
+	select REGMAP
+	select REGMAP_MMIO
 	help
 	  Say Y here if you want PCIe controller support
 	  on HiSilicon Kirin series SoCs.