From 453ed4283bebd0776682c5a3227619d92caa9c8c Mon Sep 17 00:00:00 2001 From: Steen Hegelund Date: Fri, 16 Apr 2021 10:40:53 +0200 Subject: reset: mchp: sparx5: add switch reset driver The Sparx5 Switch SoC has a number of components that can be reset indiviually, but at least the Switch Core needs to be in a well defined state at power on, when any of the Sparx5 drivers starts to access the Switch Core, this reset driver is available. The reset driver is loaded early via the postcore_initcall interface, and will then be available for the other Sparx5 drivers (SGPIO, SwitchDev etc) that are loaded next, and the first of them to be loaded can perform the one-time Switch Core reset that is needed. The driver has protection so that the system busses, DDR controller, PCI-E and ARM A53 CPU and a few other subsystems are not touched by the reset. Signed-off-by: Steen Hegelund Reviewed-by: Alexandre Belloni Signed-off-by: Philipp Zabel --- drivers/reset/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/reset/Kconfig') diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index 3e7f55e44d84..c319cf1d83e7 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -111,6 +111,14 @@ config RESET_LPC18XX help This enables the reset controller driver for NXP LPC18xx/43xx SoCs. +config RESET_MCHP_SPARX5 + bool "Microchip Sparx5 reset driver" + depends on HAS_IOMEM || COMPILE_TEST + default y if SPARX5_SWITCH + select MFD_SYSCON + help + This driver supports switch core reset for the Microchip Sparx5 SoC. + config RESET_MESON tristate "Meson Reset Driver" depends on ARCH_MESON || COMPILE_TEST -- cgit v1.2.3 From 42f6a76fbe85e5243f83a3ed76809b1ebbb7087e Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 16 Mar 2021 14:37:33 +0100 Subject: reset: RESET_BRCMSTB_RESCAL should depend on ARCH_BRCMSTB The Broadcom STB RESCAL reset controller is only present on Broadcom BCM7216 platforms. Hence add a dependency on ARCH_BRCMSTB, to prevent asking the user about this driver when configuring a kernel without BCM7216 support. Also, merely enabling CONFIG_COMPILE_TEST should not enable additional code, and thus should not enable this driver by default. Fixes: 4cf176e52397853e ("reset: Add Broadcom STB RESCAL reset controller") Signed-off-by: Geert Uytterhoeven Acked-by: Florian Fainelli Signed-off-by: Philipp Zabel --- drivers/reset/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/reset/Kconfig') diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index c319cf1d83e7..e82d2dbcd778 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -59,7 +59,8 @@ config RESET_BRCMSTB config RESET_BRCMSTB_RESCAL bool "Broadcom STB RESCAL reset controller" depends on HAS_IOMEM - default ARCH_BRCMSTB || COMPILE_TEST + depends on ARCH_BRCMSTB || COMPILE_TEST + default ARCH_BRCMSTB help This enables the RESCAL reset controller for SATA, PCIe0, or PCIe1 on BCM7216. -- cgit v1.2.3 From 6ab9d6219f86f0db916105444813aafce626a2f4 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 31 Mar 2021 10:15:19 +0200 Subject: reset: RESET_INTEL_GW should depend on X86 The Intel Gateway reset controller is only present on Intel Gateway platforms. Hence add a dependency on X86, to prevent asking the user about this driver when configuring a kernel without Intel Gateway support. Fixes: c9aef213e38cde27 ("reset: intel: Add system reset controller driver") Signed-off-by: Geert Uytterhoeven Signed-off-by: Philipp Zabel --- drivers/reset/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/reset/Kconfig') diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index e82d2dbcd778..a52d45cea757 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -83,6 +83,7 @@ config RESET_IMX7 config RESET_INTEL_GW bool "Intel Reset Controller Driver" + depends on X86 || COMPILE_TEST depends on OF && HAS_IOMEM select REGMAP_MMIO help -- cgit v1.2.3 From 5e787cdf0313182d9d9ebefdd261fa161ad365f6 Mon Sep 17 00:00:00 2001 From: Jisheng Zhang Date: Mon, 7 Jun 2021 18:10:15 +0800 Subject: reset: berlin: support module build Make reset-berlin driver to be tristate module, support to build as a module, this is useful for GKI. Partially reverts commit ed4dba99cae8 ("reset: berlin: make it explicitly non-modular") Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20210607181015.5b8d3711@xhacker.debian Signed-off-by: Philipp Zabel --- drivers/reset/Kconfig | 5 +++-- drivers/reset/reset-berlin.c | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'drivers/reset/Kconfig') diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index a52d45cea757..1a0403927a99 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -43,8 +43,9 @@ config RESET_BCM6345 This enables the reset controller driver for BCM6345 SoCs. config RESET_BERLIN - bool "Berlin Reset Driver" if COMPILE_TEST - default ARCH_BERLIN + tristate "Berlin Reset Driver" + depends on ARCH_BERLIN || COMPILE_TEST + default m if ARCH_BERLIN help This enables the reset controller driver for Marvell Berlin SoCs. diff --git a/drivers/reset/reset-berlin.c b/drivers/reset/reset-berlin.c index 094dba98cebc..2537ec05ecee 100644 --- a/drivers/reset/reset-berlin.c +++ b/drivers/reset/reset-berlin.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -93,6 +93,7 @@ static const struct of_device_id berlin_reset_dt_match[] = { { .compatible = "marvell,berlin2-reset" }, { }, }; +MODULE_DEVICE_TABLE(of, berlin_reset_dt_match); static struct platform_driver berlin_reset_driver = { .probe = berlin2_reset_probe, @@ -101,4 +102,9 @@ static struct platform_driver berlin_reset_driver = { .of_match_table = berlin_reset_dt_match, }, }; -builtin_platform_driver(berlin_reset_driver); +module_platform_driver(berlin_reset_driver); + +MODULE_AUTHOR("Antoine Tenart "); +MODULE_AUTHOR("Sebastian Hesselbarth "); +MODULE_DESCRIPTION("Synaptics Berlin reset controller"); +MODULE_LICENSE("GPL"); -- cgit v1.2.3