2023-09-15 13:06:02

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 00/17] pmdomain: Move Kconfig options/files to the pmdomain subsystem

Changes in v2:
- Posted as a proper series, I screwed up last time.
- Fixed bug in patch1, according to comments from Geert.
- Moved to use "PM domains" in menus/submenus.
- Updated MAINTAINERS for starfive, according comments from Conor/Walker.
- Added some tags.

Recently we added a new subsystem to host pmdomain (genpd) providers and moved
a bunch of code for them in there. However, their corresponding Kconfig
options/files was not moved in that first step, but instead that is taken care
of in this series. Ideally it should be easier to keep Kconfig options closer
to their corresponding implementations.

Note that, I am planning to queue this up via my pmdomain tree [1] as soon as I
have received enough of reviewed/acked-by tags from soc maintainers. If you
have reasons to belive that this can be problem, due to conflicts etc, please
let me know so we can figure out a way forward.

Kind regards
Uffe

[1]
git git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git next


Ulf Hansson (17):
pmdomain: Prepare to move Kconfig files into the pmdomain subsystem
pmdomain: actions: Move Kconfig file to the pmdomain subsystem
pmdomain: amlogic: Move Kconfig options to the pmdomain subsystem
pmdomain: apple: Move Kconfig option to the pmdomain subsystem
pmdomain: bcm: Move Kconfig options to the pmdomain subsystem
pmdomain: imx: Move Kconfig options to the pmdomain subsystem
pmdomain: mediatek: Move Kconfig options to the pmdomain subsystem
pmdomain: qcom: Move Kconfig options to the pmdomain subsystem
pmdomain: renesas: Move Kconfig options to the pmdomain subsystem
pmdomain: rockchip: Move Kconfig option to the pmdomain subsystem
pmdomain: samsung: Move Kconfig option to the pmdomain subsystem
pmdomain: st: Add a Kconfig option for the ux500 power domain
pmdomain: starfive: Move Kconfig file to the pmdomain subsystem
pmdomain: sunxi: Move Kconfig option to the pmdomain subsystem
pmdomain: tegra: Move Kconfig option to the pmdomain subsystem
pmdomain: ti: Move and add Kconfig options to the pmdomain subsystem
pmdomain: xilinx: Move Kconfig option to the pmdomain subsystem

MAINTAINERS | 5 +-
drivers/Kconfig | 2 +
drivers/firmware/imx/Kconfig | 6 --
drivers/pmdomain/Kconfig | 21 ++++
drivers/{soc => pmdomain}/actions/Kconfig | 0
drivers/pmdomain/amlogic/Kconfig | 39 ++++++++
drivers/pmdomain/apple/Kconfig | 18 ++++
drivers/pmdomain/bcm/Kconfig | 46 +++++++++
drivers/pmdomain/imx/Kconfig | 29 ++++++
drivers/pmdomain/mediatek/Kconfig | 29 ++++++
drivers/pmdomain/qcom/Kconfig | 41 ++++++++
drivers/pmdomain/renesas/Kconfig | 109 +++++++++++++++++++++
drivers/pmdomain/rockchip/Kconfig | 16 +++
drivers/pmdomain/samsung/Kconfig | 8 ++
drivers/pmdomain/st/Kconfig | 5 +
drivers/pmdomain/st/Makefile | 2 +-
drivers/{soc => pmdomain}/starfive/Kconfig | 0
drivers/pmdomain/sunxi/Kconfig | 10 ++
drivers/pmdomain/tegra/Kconfig | 6 ++
drivers/pmdomain/ti/Kconfig | 22 +++++
drivers/pmdomain/ti/Makefile | 2 +-
drivers/pmdomain/xilinx/Kconfig | 10 ++
drivers/soc/Kconfig | 2 -
drivers/soc/amlogic/Kconfig | 35 -------
drivers/soc/apple/Kconfig | 13 ---
drivers/soc/bcm/Kconfig | 42 --------
drivers/soc/imx/Kconfig | 19 ----
drivers/soc/mediatek/Kconfig | 23 -----
drivers/soc/qcom/Kconfig | 37 -------
drivers/soc/renesas/Kconfig | 105 --------------------
drivers/soc/rockchip/Kconfig | 12 ---
drivers/soc/samsung/Kconfig | 4 -
drivers/soc/sunxi/Kconfig | 9 --
drivers/soc/tegra/Kconfig | 5 -
drivers/soc/ti/Kconfig | 12 ---
drivers/soc/xilinx/Kconfig | 9 --
36 files changed, 415 insertions(+), 338 deletions(-)
create mode 100644 drivers/pmdomain/Kconfig
rename drivers/{soc => pmdomain}/actions/Kconfig (100%)
create mode 100644 drivers/pmdomain/amlogic/Kconfig
create mode 100644 drivers/pmdomain/apple/Kconfig
create mode 100644 drivers/pmdomain/bcm/Kconfig
create mode 100644 drivers/pmdomain/imx/Kconfig
create mode 100644 drivers/pmdomain/mediatek/Kconfig
create mode 100644 drivers/pmdomain/qcom/Kconfig
create mode 100644 drivers/pmdomain/renesas/Kconfig
create mode 100644 drivers/pmdomain/rockchip/Kconfig
create mode 100644 drivers/pmdomain/samsung/Kconfig
create mode 100644 drivers/pmdomain/st/Kconfig
rename drivers/{soc => pmdomain}/starfive/Kconfig (100%)
create mode 100644 drivers/pmdomain/sunxi/Kconfig
create mode 100644 drivers/pmdomain/tegra/Kconfig
create mode 100644 drivers/pmdomain/ti/Kconfig
create mode 100644 drivers/pmdomain/xilinx/Kconfig

--
2.34.1


2023-09-15 13:20:12

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 11/17] pmdomain: samsung: Move Kconfig option to the pmdomain subsystem

The Kconfig option belongs closer to the corresponding implementation,
hence let's move it from the soc subsystem to the pmdomain subsystem.

Cc: Krzysztof Kozlowski <[email protected]>
Cc: Alim Akhtar <[email protected]>
Cc: <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/pmdomain/Kconfig | 1 +
drivers/pmdomain/samsung/Kconfig | 8 ++++++++
drivers/soc/samsung/Kconfig | 4 ----
3 files changed, 9 insertions(+), 4 deletions(-)
create mode 100644 drivers/pmdomain/samsung/Kconfig

diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index 8afe69251dd2..4a411e0985c3 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -10,5 +10,6 @@ source "drivers/pmdomain/mediatek/Kconfig"
source "drivers/pmdomain/qcom/Kconfig"
source "drivers/pmdomain/renesas/Kconfig"
source "drivers/pmdomain/rockchip/Kconfig"
+source "drivers/pmdomain/samsung/Kconfig"

endmenu
diff --git a/drivers/pmdomain/samsung/Kconfig b/drivers/pmdomain/samsung/Kconfig
new file mode 100644
index 000000000000..0debfe36b00a
--- /dev/null
+++ b/drivers/pmdomain/samsung/Kconfig
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0
+if SOC_SAMSUNG
+
+config EXYNOS_PM_DOMAINS
+ bool "Exynos PM domains" if COMPILE_TEST
+ depends on (ARCH_EXYNOS && PM_GENERIC_DOMAINS) || COMPILE_TEST
+
+endif
diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig
index 7a8f291e7704..27ec99af77e3 100644
--- a/drivers/soc/samsung/Kconfig
+++ b/drivers/soc/samsung/Kconfig
@@ -48,10 +48,6 @@ config EXYNOS_PMU_ARM_DRIVERS
bool "Exynos PMU ARMv7-specific driver extensions" if COMPILE_TEST
depends on EXYNOS_PMU

-config EXYNOS_PM_DOMAINS
- bool "Exynos PM domains" if COMPILE_TEST
- depends on (ARCH_EXYNOS && PM_GENERIC_DOMAINS) || COMPILE_TEST
-
config SAMSUNG_PM_CHECK
bool "S3C2410 PM Suspend Memory CRC"
depends on PM && (ARCH_S3C64XX || ARCH_S5PV210)
--
2.34.1

2023-09-15 13:49:35

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 14/17] pmdomain: sunxi: Move Kconfig option to the pmdomain subsystem

The Kconfig option belongs closer to the corresponding implementation,
hence let's move it from the soc subsystem to the pmdomain subsystem.

Cc: Chen-Yu Tsai <[email protected]>
Cc: Jernej Skrabec <[email protected]>
Cc: Samuel Holland <[email protected]>
Cc: <[email protected]>
Acked-by: Jernej Skrabec <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/pmdomain/Kconfig | 1 +
drivers/pmdomain/sunxi/Kconfig | 10 ++++++++++
drivers/soc/sunxi/Kconfig | 9 ---------
3 files changed, 11 insertions(+), 9 deletions(-)
create mode 100644 drivers/pmdomain/sunxi/Kconfig

diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index 2286c36076db..10c3bc2e2444 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -13,5 +13,6 @@ source "drivers/pmdomain/rockchip/Kconfig"
source "drivers/pmdomain/samsung/Kconfig"
source "drivers/pmdomain/st/Kconfig"
source "drivers/pmdomain/starfive/Kconfig"
+source "drivers/pmdomain/sunxi/Kconfig"

endmenu
diff --git a/drivers/pmdomain/sunxi/Kconfig b/drivers/pmdomain/sunxi/Kconfig
new file mode 100644
index 000000000000..17781bf8d86d
--- /dev/null
+++ b/drivers/pmdomain/sunxi/Kconfig
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config SUN20I_PPU
+ bool "Allwinner D1 PPU power domain driver"
+ depends on ARCH_SUNXI || COMPILE_TEST
+ depends on PM
+ select PM_GENERIC_DOMAINS
+ help
+ Say y to enable the PPU power domain driver. This saves power
+ when certain peripherals, such as the video engine, are idle.
diff --git a/drivers/soc/sunxi/Kconfig b/drivers/soc/sunxi/Kconfig
index c5070914fc6a..8aecbc9b1976 100644
--- a/drivers/soc/sunxi/Kconfig
+++ b/drivers/soc/sunxi/Kconfig
@@ -19,12 +19,3 @@ config SUNXI_SRAM
Say y here to enable the SRAM controller support. This
device is responsible on mapping the SRAM in the sunXi SoCs
whether to the CPU/DMA, or to the devices.
-
-config SUN20I_PPU
- bool "Allwinner D1 PPU power domain driver"
- depends on ARCH_SUNXI || COMPILE_TEST
- depends on PM
- select PM_GENERIC_DOMAINS
- help
- Say y to enable the PPU power domain driver. This saves power
- when certain peripherals, such as the video engine, are idle.
--
2.34.1

2023-09-15 13:54:59

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 09/17] pmdomain: renesas: Move Kconfig options to the pmdomain subsystem

The Kconfig options belongs closer to the corresponding implementations,
hence let's move them from the soc subsystem to the pmdomain subsystem.

Cc: Geert Uytterhoeven <[email protected]>
Cc: Magnus Damm <[email protected]>
Cc: <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/pmdomain/Kconfig | 1 +
drivers/pmdomain/renesas/Kconfig | 109 +++++++++++++++++++++++++++++++
drivers/soc/renesas/Kconfig | 105 -----------------------------
3 files changed, 110 insertions(+), 105 deletions(-)
create mode 100644 drivers/pmdomain/renesas/Kconfig

diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index c91fdd40163a..0a75a17f2f3a 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -8,5 +8,6 @@ source "drivers/pmdomain/bcm/Kconfig"
source "drivers/pmdomain/imx/Kconfig"
source "drivers/pmdomain/mediatek/Kconfig"
source "drivers/pmdomain/qcom/Kconfig"
+source "drivers/pmdomain/renesas/Kconfig"

endmenu
diff --git a/drivers/pmdomain/renesas/Kconfig b/drivers/pmdomain/renesas/Kconfig
new file mode 100644
index 000000000000..80bf2cf8b60e
--- /dev/null
+++ b/drivers/pmdomain/renesas/Kconfig
@@ -0,0 +1,109 @@
+# SPDX-License-Identifier: GPL-2.0
+if SOC_RENESAS
+
+config SYSC_RCAR
+ bool "System Controller support for R-Car" if COMPILE_TEST
+
+config SYSC_RCAR_GEN4
+ bool "System Controller support for R-Car Gen4" if COMPILE_TEST
+
+config SYSC_R8A77995
+ bool "System Controller support for R-Car D3" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A7794
+ bool "System Controller support for R-Car E2" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A77990
+ bool "System Controller support for R-Car E3" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A7779
+ bool "System Controller support for R-Car H1" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A7790
+ bool "System Controller support for R-Car H2" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A7795
+ bool "System Controller support for R-Car H3" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A7791
+ bool "System Controller support for R-Car M2-W/N" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A77965
+ bool "System Controller support for R-Car M3-N" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A77960
+ bool "System Controller support for R-Car M3-W" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A77961
+ bool "System Controller support for R-Car M3-W+" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A779F0
+ bool "System Controller support for R-Car S4-8" if COMPILE_TEST
+ select SYSC_RCAR_GEN4
+
+config SYSC_R8A7792
+ bool "System Controller support for R-Car V2H" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A77980
+ bool "System Controller support for R-Car V3H" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A77970
+ bool "System Controller support for R-Car V3M" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A779A0
+ bool "System Controller support for R-Car V3U" if COMPILE_TEST
+ select SYSC_RCAR_GEN4
+
+config SYSC_R8A779G0
+ bool "System Controller support for R-Car V4H" if COMPILE_TEST
+ select SYSC_RCAR_GEN4
+
+config SYSC_RMOBILE
+ bool "System Controller support for R-Mobile" if COMPILE_TEST
+
+config SYSC_R8A77470
+ bool "System Controller support for RZ/G1C" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A7745
+ bool "System Controller support for RZ/G1E" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A7742
+ bool "System Controller support for RZ/G1H" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A7743
+ bool "System Controller support for RZ/G1M" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A774C0
+ bool "System Controller support for RZ/G2E" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A774E1
+ bool "System Controller support for RZ/G2H" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A774A1
+ bool "System Controller support for RZ/G2M" if COMPILE_TEST
+ select SYSC_RCAR
+
+config SYSC_R8A774B1
+ bool "System Controller support for RZ/G2N" if COMPILE_TEST
+ select SYSC_RCAR
+
+endif
diff --git a/drivers/soc/renesas/Kconfig b/drivers/soc/renesas/Kconfig
index 5a75ab64d1ed..650f4dd96dec 100644
--- a/drivers/soc/renesas/Kconfig
+++ b/drivers/soc/renesas/Kconfig
@@ -350,109 +350,4 @@ config PWC_RZV2M
config RST_RCAR
bool "Reset Controller support for R-Car" if COMPILE_TEST

-config SYSC_RCAR
- bool "System Controller support for R-Car" if COMPILE_TEST
-
-config SYSC_RCAR_GEN4
- bool "System Controller support for R-Car Gen4" if COMPILE_TEST
-
-config SYSC_R8A77995
- bool "System Controller support for R-Car D3" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A7794
- bool "System Controller support for R-Car E2" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A77990
- bool "System Controller support for R-Car E3" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A7779
- bool "System Controller support for R-Car H1" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A7790
- bool "System Controller support for R-Car H2" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A7795
- bool "System Controller support for R-Car H3" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A7791
- bool "System Controller support for R-Car M2-W/N" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A77965
- bool "System Controller support for R-Car M3-N" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A77960
- bool "System Controller support for R-Car M3-W" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A77961
- bool "System Controller support for R-Car M3-W+" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A779F0
- bool "System Controller support for R-Car S4-8" if COMPILE_TEST
- select SYSC_RCAR_GEN4
-
-config SYSC_R8A7792
- bool "System Controller support for R-Car V2H" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A77980
- bool "System Controller support for R-Car V3H" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A77970
- bool "System Controller support for R-Car V3M" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A779A0
- bool "System Controller support for R-Car V3U" if COMPILE_TEST
- select SYSC_RCAR_GEN4
-
-config SYSC_R8A779G0
- bool "System Controller support for R-Car V4H" if COMPILE_TEST
- select SYSC_RCAR_GEN4
-
-config SYSC_RMOBILE
- bool "System Controller support for R-Mobile" if COMPILE_TEST
-
-config SYSC_R8A77470
- bool "System Controller support for RZ/G1C" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A7745
- bool "System Controller support for RZ/G1E" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A7742
- bool "System Controller support for RZ/G1H" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A7743
- bool "System Controller support for RZ/G1M" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A774C0
- bool "System Controller support for RZ/G2E" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A774E1
- bool "System Controller support for RZ/G2H" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A774A1
- bool "System Controller support for RZ/G2M" if COMPILE_TEST
- select SYSC_RCAR
-
-config SYSC_R8A774B1
- bool "System Controller support for RZ/G2N" if COMPILE_TEST
- select SYSC_RCAR
-
endif # SOC_RENESAS
--
2.34.1

2023-09-15 14:40:24

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 15/17] pmdomain: tegra: Move Kconfig option to the pmdomain subsystem

The Kconfig option belongs closer to the corresponding implementation,
hence let's move it from the soc subsystem to the pmdomain subsystem.

Cc: Thierry Reding <[email protected]>
Cc: Jonathan Hunter <[email protected]>
Cc: Mikko Perttunen <[email protected]>
Cc: <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/pmdomain/Kconfig | 1 +
drivers/pmdomain/tegra/Kconfig | 6 ++++++
drivers/soc/tegra/Kconfig | 5 -----
3 files changed, 7 insertions(+), 5 deletions(-)
create mode 100644 drivers/pmdomain/tegra/Kconfig

diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index 10c3bc2e2444..98e04589bef4 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -14,5 +14,6 @@ source "drivers/pmdomain/samsung/Kconfig"
source "drivers/pmdomain/st/Kconfig"
source "drivers/pmdomain/starfive/Kconfig"
source "drivers/pmdomain/sunxi/Kconfig"
+source "drivers/pmdomain/tegra/Kconfig"

endmenu
diff --git a/drivers/pmdomain/tegra/Kconfig b/drivers/pmdomain/tegra/Kconfig
new file mode 100644
index 000000000000..13ade6d84696
--- /dev/null
+++ b/drivers/pmdomain/tegra/Kconfig
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config SOC_TEGRA_POWERGATE_BPMP
+ def_bool y
+ depends on PM_GENERIC_DOMAINS
+ depends on TEGRA_BPMP
diff --git a/drivers/soc/tegra/Kconfig b/drivers/soc/tegra/Kconfig
index 6f3098822969..f16beeabaa92 100644
--- a/drivers/soc/tegra/Kconfig
+++ b/drivers/soc/tegra/Kconfig
@@ -152,11 +152,6 @@ config SOC_TEGRA_PMC
select PM_GENERIC_DOMAINS
select REGMAP

-config SOC_TEGRA_POWERGATE_BPMP
- def_bool y
- depends on PM_GENERIC_DOMAINS
- depends on TEGRA_BPMP
-
config SOC_TEGRA20_VOLTAGE_COUPLER
bool "Voltage scaling support for Tegra20 SoCs"
depends on ARCH_TEGRA_2x_SOC || COMPILE_TEST
--
2.34.1

2023-09-15 14:41:00

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 04/17] pmdomain: apple: Move Kconfig option to the pmdomain subsystem

The Kconfig option belongs closer to the corresponding implementation,
hence let's move it from the soc subsystem to the pmdomain subsystem.

Cc: Hector Martin <[email protected]>
Cc: Sven Peter <[email protected]>
Cc: Alyssa Rosenzweig <[email protected]>
Cc: <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/pmdomain/Kconfig | 1 +
drivers/pmdomain/apple/Kconfig | 18 ++++++++++++++++++
drivers/soc/apple/Kconfig | 13 -------------
3 files changed, 19 insertions(+), 13 deletions(-)
create mode 100644 drivers/pmdomain/apple/Kconfig

diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index 03c8991ad0fd..482d9e970e14 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -3,5 +3,6 @@ menu "PM Domains"

source "drivers/pmdomain/actions/Kconfig"
source "drivers/pmdomain/amlogic/Kconfig"
+source "drivers/pmdomain/apple/Kconfig"

endmenu
diff --git a/drivers/pmdomain/apple/Kconfig b/drivers/pmdomain/apple/Kconfig
new file mode 100644
index 000000000000..12237cbcfaa9
--- /dev/null
+++ b/drivers/pmdomain/apple/Kconfig
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+if ARCH_APPLE || COMPILE_TEST
+
+config APPLE_PMGR_PWRSTATE
+ bool "Apple SoC PMGR power state control"
+ depends on PM
+ select REGMAP
+ select MFD_SYSCON
+ select PM_GENERIC_DOMAINS
+ select RESET_CONTROLLER
+ default ARCH_APPLE
+ help
+ The PMGR block in Apple SoCs provides high-level power state
+ controls for SoC devices. This driver manages them through the
+ generic power domain framework, and also provides reset support.
+
+endif
diff --git a/drivers/soc/apple/Kconfig b/drivers/soc/apple/Kconfig
index a1596fefacff..eff486a77337 100644
--- a/drivers/soc/apple/Kconfig
+++ b/drivers/soc/apple/Kconfig
@@ -4,19 +4,6 @@ if ARCH_APPLE || COMPILE_TEST

menu "Apple SoC drivers"

-config APPLE_PMGR_PWRSTATE
- bool "Apple SoC PMGR power state control"
- depends on PM
- select REGMAP
- select MFD_SYSCON
- select PM_GENERIC_DOMAINS
- select RESET_CONTROLLER
- default ARCH_APPLE
- help
- The PMGR block in Apple SoCs provides high-level power state
- controls for SoC devices. This driver manages them through the
- generic power domain framework, and also provides reset support.
-
config APPLE_RTKIT
tristate "Apple RTKit co-processor IPC protocol"
depends on MAILBOX
--
2.34.1

2023-09-15 15:18:39

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 07/17] pmdomain: mediatek: Move Kconfig options to the pmdomain subsystem

The Kconfig options belongs closer to the corresponding implementations,
hence let's move them from the soc subsystem to the pmdomain subsystem.

Cc: Matthias Brugger <[email protected]>
Cc: AngeloGioacchino Del Regno <[email protected]>
Cc: <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/pmdomain/Kconfig | 1 +
drivers/pmdomain/mediatek/Kconfig | 29 +++++++++++++++++++++++++++++
drivers/soc/mediatek/Kconfig | 23 -----------------------
3 files changed, 30 insertions(+), 23 deletions(-)
create mode 100644 drivers/pmdomain/mediatek/Kconfig

diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index e2c85f20a0c3..b1d9dc7d71e3 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -6,5 +6,6 @@ source "drivers/pmdomain/amlogic/Kconfig"
source "drivers/pmdomain/apple/Kconfig"
source "drivers/pmdomain/bcm/Kconfig"
source "drivers/pmdomain/imx/Kconfig"
+source "drivers/pmdomain/mediatek/Kconfig"

endmenu
diff --git a/drivers/pmdomain/mediatek/Kconfig b/drivers/pmdomain/mediatek/Kconfig
new file mode 100644
index 000000000000..21305c4f17fe
--- /dev/null
+++ b/drivers/pmdomain/mediatek/Kconfig
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+menu "MediaTek PM Domains"
+ depends on ARCH_MEDIATEK || COMPILE_TEST
+
+config MTK_SCPSYS
+ bool "MediaTek SCPSYS Support"
+ default ARCH_MEDIATEK
+ depends on OF
+ select REGMAP
+ select MTK_INFRACFG
+ select PM_GENERIC_DOMAINS if PM
+ help
+ Say yes here to add support for the MediaTek SCPSYS power domain
+ driver.
+
+config MTK_SCPSYS_PM_DOMAINS
+ bool "MediaTek SCPSYS generic power domain"
+ default ARCH_MEDIATEK
+ depends on PM
+ select PM_GENERIC_DOMAINS
+ select REGMAP
+ help
+ Say y here to enable power domain support.
+ In order to meet high performance and low power requirements, the System
+ Control Processor System (SCPSYS) has several power management related
+ tasks in the system.
+
+endmenu
diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
index a88cf04fc803..0810b5b0c688 100644
--- a/drivers/soc/mediatek/Kconfig
+++ b/drivers/soc/mediatek/Kconfig
@@ -49,29 +49,6 @@ config MTK_REGULATOR_COUPLER
default ARCH_MEDIATEK
depends on REGULATOR

-config MTK_SCPSYS
- bool "MediaTek SCPSYS Support"
- default ARCH_MEDIATEK
- depends on OF
- select REGMAP
- select MTK_INFRACFG
- select PM_GENERIC_DOMAINS if PM
- help
- Say yes here to add support for the MediaTek SCPSYS power domain
- driver.
-
-config MTK_SCPSYS_PM_DOMAINS
- bool "MediaTek SCPSYS generic power domain"
- default ARCH_MEDIATEK
- depends on PM
- select PM_GENERIC_DOMAINS
- select REGMAP
- help
- Say y here to enable power domain support.
- In order to meet high performance and low power requirements, the System
- Control Processor System (SCPSYS) has several power management related
- tasks in the system.
-
config MTK_MMSYS
tristate "MediaTek MMSYS Support"
default ARCH_MEDIATEK
--
2.34.1

2023-09-15 15:32:20

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 10/17] pmdomain: rockchip: Move Kconfig option to the pmdomain subsystem

The Kconfig option belongs closer to the corresponding implementation,
hence let's move it from the soc subsystem to the pmdomain subsystem.

Cc: Heiko Stuebner <[email protected]>
Cc: <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/pmdomain/Kconfig | 1 +
drivers/pmdomain/rockchip/Kconfig | 16 ++++++++++++++++
drivers/soc/rockchip/Kconfig | 12 ------------
3 files changed, 17 insertions(+), 12 deletions(-)
create mode 100644 drivers/pmdomain/rockchip/Kconfig

diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index 0a75a17f2f3a..8afe69251dd2 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -9,5 +9,6 @@ source "drivers/pmdomain/imx/Kconfig"
source "drivers/pmdomain/mediatek/Kconfig"
source "drivers/pmdomain/qcom/Kconfig"
source "drivers/pmdomain/renesas/Kconfig"
+source "drivers/pmdomain/rockchip/Kconfig"

endmenu
diff --git a/drivers/pmdomain/rockchip/Kconfig b/drivers/pmdomain/rockchip/Kconfig
new file mode 100644
index 000000000000..b0d70f1a8439
--- /dev/null
+++ b/drivers/pmdomain/rockchip/Kconfig
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0-only
+if ARCH_ROCKCHIP || COMPILE_TEST
+
+config ROCKCHIP_PM_DOMAINS
+ bool "Rockchip generic power domain"
+ depends on PM
+ select PM_GENERIC_DOMAINS
+ help
+ Say y here to enable power domain support.
+ In order to meet high performance and low power requirements, a power
+ management unit is designed or saving power when RK3288 in low power
+ mode. The RK3288 PMU is dedicated for managing the power of the whole chip.
+
+ If unsure, say N.
+
+endif
diff --git a/drivers/soc/rockchip/Kconfig b/drivers/soc/rockchip/Kconfig
index aff2f7e95237..785f60c6f3ad 100644
--- a/drivers/soc/rockchip/Kconfig
+++ b/drivers/soc/rockchip/Kconfig
@@ -22,18 +22,6 @@ config ROCKCHIP_IODOMAIN
necessary for the io domain setting of the SoC to match the
voltage supplied by the regulators.

-config ROCKCHIP_PM_DOMAINS
- bool "Rockchip generic power domain"
- depends on PM
- select PM_GENERIC_DOMAINS
- help
- Say y here to enable power domain support.
- In order to meet high performance and low power requirements, a power
- management unit is designed or saving power when RK3288 in low power
- mode. The RK3288 PMU is dedicated for managing the power of the whole chip.
-
- If unsure, say N.
-
config ROCKCHIP_DTPM
tristate "Rockchip DTPM hierarchy"
depends on DTPM && m
--
2.34.1

2023-09-15 16:39:43

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 02/17] pmdomain: actions: Move Kconfig file to the pmdomain subsystem

The Kconfig belongs closer to the corresponding implementation, hence let's
move it from the soc subsystem to the pmdomain subsystem.

Cc: "Andreas Färber" <[email protected]>
Cc: Manivannan Sadhasivam <[email protected]>
Cc: <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
MAINTAINERS | 2 +-
drivers/pmdomain/Kconfig | 2 ++
drivers/{soc => pmdomain}/actions/Kconfig | 0
drivers/soc/Kconfig | 1 -
4 files changed, 3 insertions(+), 2 deletions(-)
rename drivers/{soc => pmdomain}/actions/Kconfig (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index f1c34484c9b2..6b491ebcf790 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1788,7 +1788,7 @@ F: drivers/irqchip/irq-owl-sirq.c
F: drivers/mmc/host/owl-mmc.c
F: drivers/net/ethernet/actions/
F: drivers/pinctrl/actions/*
-F: drivers/soc/actions/
+F: drivers/pmdomain/actions/
F: include/dt-bindings/power/owl-*
F: include/dt-bindings/reset/actions,*
F: include/linux/soc/actions/
diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index ac77cf4271a7..e410c4b8071a 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -1,4 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
menu "PM Domains"

+source "drivers/pmdomain/actions/Kconfig"
+
endmenu
diff --git a/drivers/soc/actions/Kconfig b/drivers/pmdomain/actions/Kconfig
similarity index 100%
rename from drivers/soc/actions/Kconfig
rename to drivers/pmdomain/actions/Kconfig
diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig
index d21e75d69294..8b46da40f107 100644
--- a/drivers/soc/Kconfig
+++ b/drivers/soc/Kconfig
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
menu "SOC (System On Chip) specific Drivers"

-source "drivers/soc/actions/Kconfig"
source "drivers/soc/amlogic/Kconfig"
source "drivers/soc/apple/Kconfig"
source "drivers/soc/aspeed/Kconfig"
--
2.34.1

2023-09-15 17:16:46

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 06/17] pmdomain: imx: Move Kconfig options to the pmdomain subsystem

The Kconfig options belongs closer to the corresponding implementations,
hence let's move them from the soc- and firmware subsystem to the pmdomain
subsystem.

Cc: Shawn Guo <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/firmware/imx/Kconfig | 6 ------
drivers/pmdomain/Kconfig | 1 +
drivers/pmdomain/imx/Kconfig | 29 +++++++++++++++++++++++++++++
drivers/soc/imx/Kconfig | 19 -------------------
4 files changed, 30 insertions(+), 25 deletions(-)
create mode 100644 drivers/pmdomain/imx/Kconfig

diff --git a/drivers/firmware/imx/Kconfig b/drivers/firmware/imx/Kconfig
index c027d99f2a59..183613f82a11 100644
--- a/drivers/firmware/imx/Kconfig
+++ b/drivers/firmware/imx/Kconfig
@@ -22,9 +22,3 @@ config IMX_SCU

This driver manages the IPC interface between host CPU and the
SCU firmware running on M4.
-
-config IMX_SCU_PD
- bool "IMX SCU Power Domain driver"
- depends on IMX_SCU
- help
- The System Controller Firmware (SCFW) based power domain driver.
diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index ddc05d6af100..e2c85f20a0c3 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -5,5 +5,6 @@ source "drivers/pmdomain/actions/Kconfig"
source "drivers/pmdomain/amlogic/Kconfig"
source "drivers/pmdomain/apple/Kconfig"
source "drivers/pmdomain/bcm/Kconfig"
+source "drivers/pmdomain/imx/Kconfig"

endmenu
diff --git a/drivers/pmdomain/imx/Kconfig b/drivers/pmdomain/imx/Kconfig
new file mode 100644
index 000000000000..00203615c65e
--- /dev/null
+++ b/drivers/pmdomain/imx/Kconfig
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: GPL-2.0-only
+menu "i.MX PM Domains"
+
+config IMX_GPCV2_PM_DOMAINS
+ bool "i.MX GPCv2 PM domains"
+ depends on ARCH_MXC || (COMPILE_TEST && OF)
+ depends on PM
+ select PM_GENERIC_DOMAINS
+ select REGMAP_MMIO
+ default y if SOC_IMX7D
+
+config IMX8M_BLK_CTRL
+ bool
+ default SOC_IMX8M && IMX_GPCV2_PM_DOMAINS
+ depends on PM_GENERIC_DOMAINS
+ depends on COMMON_CLK
+
+config IMX9_BLK_CTRL
+ bool
+ default SOC_IMX9 && IMX_GPCV2_PM_DOMAINS
+ depends on PM_GENERIC_DOMAINS
+
+config IMX_SCU_PD
+ bool "IMX SCU Power Domain driver"
+ depends on IMX_SCU
+ help
+ The System Controller Firmware (SCFW) based power domain driver.
+
+endmenu
diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig
index 76a4593baf0a..2a90ddd20104 100644
--- a/drivers/soc/imx/Kconfig
+++ b/drivers/soc/imx/Kconfig
@@ -1,14 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
menu "i.MX SoC drivers"

-config IMX_GPCV2_PM_DOMAINS
- bool "i.MX GPCv2 PM domains"
- depends on ARCH_MXC || (COMPILE_TEST && OF)
- depends on PM
- select PM_GENERIC_DOMAINS
- select REGMAP_MMIO
- default y if SOC_IMX7D
-
config SOC_IMX8M
tristate "i.MX8M SoC family support"
depends on ARCH_MXC || COMPILE_TEST
@@ -28,15 +20,4 @@ config SOC_IMX9
help
If you say yes here, you get support for the NXP i.MX9 family

-config IMX8M_BLK_CTRL
- bool
- default SOC_IMX8M && IMX_GPCV2_PM_DOMAINS
- depends on PM_GENERIC_DOMAINS
- depends on COMMON_CLK
-
-config IMX9_BLK_CTRL
- bool
- default SOC_IMX9 && IMX_GPCV2_PM_DOMAINS
- depends on PM_GENERIC_DOMAINS
-
endmenu
--
2.34.1

2023-09-15 17:40:16

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 08/17] pmdomain: qcom: Move Kconfig options to the pmdomain subsystem

The Kconfig options belongs closer to the corresponding implementations,
hence let's move them from the soc subsystem to the pmdomain subsystem.

Cc: Bjorn Andersson <[email protected]>
Cc: Konrad Dybcio <[email protected]>
Cc: Andy Gross <[email protected]>
Cc: <[email protected]>
Acked-by: Konrad Dybcio <[email protected]>
Reviewed-by: Bjorn Andersson <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/pmdomain/Kconfig | 1 +
drivers/pmdomain/qcom/Kconfig | 41 +++++++++++++++++++++++++++++++++++
drivers/soc/qcom/Kconfig | 37 -------------------------------
3 files changed, 42 insertions(+), 37 deletions(-)
create mode 100644 drivers/pmdomain/qcom/Kconfig

diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index b1d9dc7d71e3..c91fdd40163a 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -7,5 +7,6 @@ source "drivers/pmdomain/apple/Kconfig"
source "drivers/pmdomain/bcm/Kconfig"
source "drivers/pmdomain/imx/Kconfig"
source "drivers/pmdomain/mediatek/Kconfig"
+source "drivers/pmdomain/qcom/Kconfig"

endmenu
diff --git a/drivers/pmdomain/qcom/Kconfig b/drivers/pmdomain/qcom/Kconfig
new file mode 100644
index 000000000000..3d3948eabef0
--- /dev/null
+++ b/drivers/pmdomain/qcom/Kconfig
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: GPL-2.0-only
+menu "Qualcomm PM Domains"
+
+config QCOM_CPR
+ tristate "QCOM Core Power Reduction (CPR) support"
+ depends on ARCH_QCOM && HAS_IOMEM
+ select PM_OPP
+ select REGMAP
+ help
+ Say Y here to enable support for the CPR hardware found on Qualcomm
+ SoCs like QCS404.
+
+ This driver populates CPU OPPs tables and makes adjustments to the
+ tables based on feedback from the CPR hardware. If you want to do
+ CPUfrequency scaling say Y here.
+
+ To compile this driver as a module, choose M here: the module will
+ be called qcom-cpr
+
+config QCOM_RPMHPD
+ tristate "Qualcomm RPMh Power domain driver"
+ depends on QCOM_RPMH && QCOM_COMMAND_DB
+ help
+ QCOM RPMh Power domain driver to support power-domains with
+ performance states. The driver communicates a performance state
+ value to RPMh which then translates it into corresponding voltage
+ for the voltage rail.
+
+config QCOM_RPMPD
+ tristate "Qualcomm RPM Power domain driver"
+ depends on PM && OF
+ depends on QCOM_SMD_RPM
+ select PM_GENERIC_DOMAINS
+ select PM_GENERIC_DOMAINS_OF
+ help
+ QCOM RPM Power domain driver to support power-domains with
+ performance states. The driver communicates a performance state
+ value to RPM which then translates it into corresponding voltage
+ for the voltage rail.
+
+endmenu
diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index 715348869d04..b3634e10f6f5 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -26,22 +26,6 @@ config QCOM_COMMAND_DB
resource on a RPM-hardened platform must use this database to get
SoC specific identifier and information for the shared resources.

-config QCOM_CPR
- tristate "QCOM Core Power Reduction (CPR) support"
- depends on ARCH_QCOM && HAS_IOMEM
- select PM_OPP
- select REGMAP
- help
- Say Y here to enable support for the CPR hardware found on Qualcomm
- SoCs like QCS404.
-
- This driver populates CPU OPPs tables and makes adjustments to the
- tables based on feedback from the CPR hardware. If you want to do
- CPUfrequency scaling say Y here.
-
- To compile this driver as a module, choose M here: the module will
- be called qcom-cpr
-
config QCOM_GENI_SE
tristate "QCOM GENI Serial Engine Driver"
depends on ARCH_QCOM || COMPILE_TEST
@@ -157,27 +141,6 @@ config QCOM_RPMH
of hardware components aggregate requests for these resources and
help apply the aggregated state on the resource.

-config QCOM_RPMHPD
- tristate "Qualcomm RPMh Power domain driver"
- depends on QCOM_RPMH && QCOM_COMMAND_DB
- help
- QCOM RPMh Power domain driver to support power-domains with
- performance states. The driver communicates a performance state
- value to RPMh which then translates it into corresponding voltage
- for the voltage rail.
-
-config QCOM_RPMPD
- tristate "Qualcomm RPM Power domain driver"
- depends on PM && OF
- depends on QCOM_SMD_RPM
- select PM_GENERIC_DOMAINS
- select PM_GENERIC_DOMAINS_OF
- help
- QCOM RPM Power domain driver to support power-domains with
- performance states. The driver communicates a performance state
- value to RPM which then translates it into corresponding voltage
- for the voltage rail.
-
config QCOM_SMEM
tristate "Qualcomm Shared Memory Manager (SMEM)"
depends on ARCH_QCOM || COMPILE_TEST
--
2.34.1

2023-09-15 17:46:23

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 16/17] pmdomain: ti: Move and add Kconfig options to the pmdomain subsystem

The TI_SCI_PM_DOMAINS Kconfig option belongs closer to its corresponding
implementation, hence let's move it from the soc subsystem to the pmdomain
subsystem.

While at it, let's also add a Kconfig option the omap_prm driver, rather
than using ARCH_OMAP2PLUS directly.

Cc: Nishanth Menon <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Cc: Tero Kristo <[email protected]>
Cc: Tony Lindgren <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/pmdomain/Kconfig | 1 +
drivers/pmdomain/ti/Kconfig | 22 ++++++++++++++++++++++
drivers/pmdomain/ti/Makefile | 2 +-
drivers/soc/ti/Kconfig | 12 ------------
4 files changed, 24 insertions(+), 13 deletions(-)
create mode 100644 drivers/pmdomain/ti/Kconfig

diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index 98e04589bef4..33bfec9c4f7a 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -15,5 +15,6 @@ source "drivers/pmdomain/st/Kconfig"
source "drivers/pmdomain/starfive/Kconfig"
source "drivers/pmdomain/sunxi/Kconfig"
source "drivers/pmdomain/tegra/Kconfig"
+source "drivers/pmdomain/ti/Kconfig"

endmenu
diff --git a/drivers/pmdomain/ti/Kconfig b/drivers/pmdomain/ti/Kconfig
new file mode 100644
index 000000000000..67c608bf7ed0
--- /dev/null
+++ b/drivers/pmdomain/ti/Kconfig
@@ -0,0 +1,22 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config OMAP2PLUS_PRM
+ bool
+ depends on ARCH_OMAP2PLUS
+ default ARCH_OMAP2PLUS
+
+if SOC_TI
+
+config TI_SCI_PM_DOMAINS
+ tristate "TI SCI PM Domains Driver"
+ depends on TI_SCI_PROTOCOL
+ depends on PM_GENERIC_DOMAINS
+ help
+ Generic power domain implementation for TI device implementing
+ the TI SCI protocol.
+
+ To compile this as a module, choose M here. The module will be
+ called ti_sci_pm_domains. Note this is needed early in boot before
+ rootfs may be available.
+
+endif
diff --git a/drivers/pmdomain/ti/Makefile b/drivers/pmdomain/ti/Makefile
index 69580afbb436..af6cd056c158 100644
--- a/drivers/pmdomain/ti/Makefile
+++ b/drivers/pmdomain/ti/Makefile
@@ -1,3 +1,3 @@
# SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_ARCH_OMAP2PLUS) += omap_prm.o
+obj-$(CONFIG_OMAP2PLUS_PRM) += omap_prm.o
obj-$(CONFIG_TI_SCI_PM_DOMAINS) += ti_sci_pm_domains.o
diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig
index 2cae17b65fd9..1a93001c9e36 100644
--- a/drivers/soc/ti/Kconfig
+++ b/drivers/soc/ti/Kconfig
@@ -50,18 +50,6 @@ config WKUP_M3_IPC
to communicate and use the Wakeup M3 for PM features like suspend
resume and boots it using wkup_m3_rproc driver.

-config TI_SCI_PM_DOMAINS
- tristate "TI SCI PM Domains Driver"
- depends on TI_SCI_PROTOCOL
- depends on PM_GENERIC_DOMAINS
- help
- Generic power domain implementation for TI device implementing
- the TI SCI protocol.
-
- To compile this as a module, choose M here. The module will be
- called ti_sci_pm_domains. Note this is needed early in boot before
- rootfs may be available.
-
config TI_K3_RINGACC
tristate "K3 Ring accelerator Sub System"
depends on ARCH_K3 || COMPILE_TEST
--
2.34.1

2023-09-16 03:25:28

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 03/17] pmdomain: amlogic: Move Kconfig options to the pmdomain subsystem

The Kconfig options belongs closer to the corresponding implementations,
hence let's move them from the soc subsystem to the pmdomain subsystem.

Cc: Neil Armstrong <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Jerome Brunet <[email protected]>
Cc: Martin Blumenstingl <[email protected]>
Cc: <[email protected]>
Acked-by: Neil Armstrong <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/pmdomain/Kconfig | 1 +
drivers/pmdomain/amlogic/Kconfig | 39 ++++++++++++++++++++++++++++++++
drivers/soc/amlogic/Kconfig | 35 ----------------------------
3 files changed, 40 insertions(+), 35 deletions(-)
create mode 100644 drivers/pmdomain/amlogic/Kconfig

diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index e410c4b8071a..03c8991ad0fd 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -2,5 +2,6 @@
menu "PM Domains"

source "drivers/pmdomain/actions/Kconfig"
+source "drivers/pmdomain/amlogic/Kconfig"

endmenu
diff --git a/drivers/pmdomain/amlogic/Kconfig b/drivers/pmdomain/amlogic/Kconfig
new file mode 100644
index 000000000000..2108729909b5
--- /dev/null
+++ b/drivers/pmdomain/amlogic/Kconfig
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: GPL-2.0-only
+menu "Amlogic PM Domains"
+
+config MESON_GX_PM_DOMAINS
+ tristate "Amlogic Meson GX Power Domains driver"
+ depends on ARCH_MESON || COMPILE_TEST
+ depends on PM && OF
+ default ARCH_MESON
+ select PM_GENERIC_DOMAINS
+ select PM_GENERIC_DOMAINS_OF
+ help
+ Say yes to expose Amlogic Meson GX Power Domains as
+ Generic Power Domains.
+
+config MESON_EE_PM_DOMAINS
+ tristate "Amlogic Meson Everything-Else Power Domains driver"
+ depends on ARCH_MESON || COMPILE_TEST
+ depends on PM && OF
+ default ARCH_MESON
+ select PM_GENERIC_DOMAINS
+ select PM_GENERIC_DOMAINS_OF
+ help
+ Say yes to expose Amlogic Meson Everything-Else Power Domains as
+ Generic Power Domains.
+
+config MESON_SECURE_PM_DOMAINS
+ tristate "Amlogic Meson Secure Power Domains driver"
+ depends on (ARCH_MESON || COMPILE_TEST) && MESON_SM
+ depends on PM && OF
+ depends on HAVE_ARM_SMCCC
+ default ARCH_MESON
+ select PM_GENERIC_DOMAINS
+ select PM_GENERIC_DOMAINS_OF
+ help
+ Support for the power controller on Amlogic A1/C1 series.
+ Say yes to expose Amlogic Meson Secure Power Domains as Generic
+ Power Domains.
+
+endmenu
diff --git a/drivers/soc/amlogic/Kconfig b/drivers/soc/amlogic/Kconfig
index 174a9b011461..d08e398bdad4 100644
--- a/drivers/soc/amlogic/Kconfig
+++ b/drivers/soc/amlogic/Kconfig
@@ -26,41 +26,6 @@ config MESON_GX_SOCINFO
Say yes to support decoding of Amlogic Meson GX SoC family
information about the type, package and version.

-config MESON_GX_PM_DOMAINS
- tristate "Amlogic Meson GX Power Domains driver"
- depends on ARCH_MESON || COMPILE_TEST
- depends on PM && OF
- default ARCH_MESON
- select PM_GENERIC_DOMAINS
- select PM_GENERIC_DOMAINS_OF
- help
- Say yes to expose Amlogic Meson GX Power Domains as
- Generic Power Domains.
-
-config MESON_EE_PM_DOMAINS
- tristate "Amlogic Meson Everything-Else Power Domains driver"
- depends on ARCH_MESON || COMPILE_TEST
- depends on PM && OF
- default ARCH_MESON
- select PM_GENERIC_DOMAINS
- select PM_GENERIC_DOMAINS_OF
- help
- Say yes to expose Amlogic Meson Everything-Else Power Domains as
- Generic Power Domains.
-
-config MESON_SECURE_PM_DOMAINS
- tristate "Amlogic Meson Secure Power Domains driver"
- depends on (ARCH_MESON || COMPILE_TEST) && MESON_SM
- depends on PM && OF
- depends on HAVE_ARM_SMCCC
- default ARCH_MESON
- select PM_GENERIC_DOMAINS
- select PM_GENERIC_DOMAINS_OF
- help
- Support for the power controller on Amlogic A1/C1 series.
- Say yes to expose Amlogic Meson Secure Power Domains as Generic
- Power Domains.
-
config MESON_MX_SOCINFO
bool "Amlogic Meson MX SoC Information driver"
depends on (ARM && ARCH_MESON) || COMPILE_TEST
--
2.34.1

2023-09-16 08:54:02

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 12/17] pmdomain: st: Add a Kconfig option for the ux500 power domain

We shouldn't really use the CONFIG_ARCH_U8500 option directly, but rather
have our own dedicated Kconfig option, so let's add that.

Cc: Linus Walleij <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/pmdomain/Kconfig | 1 +
drivers/pmdomain/st/Kconfig | 5 +++++
drivers/pmdomain/st/Makefile | 2 +-
3 files changed, 7 insertions(+), 1 deletion(-)
create mode 100644 drivers/pmdomain/st/Kconfig

diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index 4a411e0985c3..08f8a3aa9805 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -11,5 +11,6 @@ source "drivers/pmdomain/qcom/Kconfig"
source "drivers/pmdomain/renesas/Kconfig"
source "drivers/pmdomain/rockchip/Kconfig"
source "drivers/pmdomain/samsung/Kconfig"
+source "drivers/pmdomain/st/Kconfig"

endmenu
diff --git a/drivers/pmdomain/st/Kconfig b/drivers/pmdomain/st/Kconfig
new file mode 100644
index 000000000000..a77a70211f61
--- /dev/null
+++ b/drivers/pmdomain/st/Kconfig
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-only
+config UX500_PM_DOMAIN
+ bool "ST-Ericsson ux500 Power Domain"
+ depends on ARCH_U8500 || COMPILE_TEST
+ default ARCH_U8500
diff --git a/drivers/pmdomain/st/Makefile b/drivers/pmdomain/st/Makefile
index 8fa5f9855460..6d8b617eb834 100644
--- a/drivers/pmdomain/st/Makefile
+++ b/drivers/pmdomain/st/Makefile
@@ -1,2 +1,2 @@
# SPDX-License-Identifier: GPL-2.0-only
-obj-$(CONFIG_ARCH_U8500) += ste-ux500-pm-domain.o
+obj-$(CONFIG_UX500_PM_DOMAIN) += ste-ux500-pm-domain.o
--
2.34.1

2023-09-18 02:22:09

by Peng Fan

[permalink] [raw]
Subject: RE: [PATCH v2 06/17] pmdomain: imx: Move Kconfig options to the pmdomain subsystem

> Subject: [PATCH v2 06/17] pmdomain: imx: Move Kconfig options to the
> pmdomain subsystem
>
> The Kconfig options belongs closer to the corresponding implementations,
> hence let's move them from the soc- and firmware subsystem to the
> pmdomain subsystem.
>
> Cc: Shawn Guo <[email protected]>
> Cc: Sascha Hauer <[email protected]>
> Cc: Fabio Estevam <[email protected]>
> Cc: Peng Fan <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>
> Signed-off-by: Ulf Hansson <[email protected]>

Acked-by: Peng Fan <[email protected]>
> ---
> drivers/firmware/imx/Kconfig | 6 ------
> drivers/pmdomain/Kconfig | 1 +
> drivers/pmdomain/imx/Kconfig | 29 +++++++++++++++++++++++++++++
> drivers/soc/imx/Kconfig | 19 -------------------
> 4 files changed, 30 insertions(+), 25 deletions(-) create mode 100644
> drivers/pmdomain/imx/Kconfig
>
> diff --git a/drivers/firmware/imx/Kconfig b/drivers/firmware/imx/Kconfig
> index c027d99f2a59..183613f82a11 100644
> --- a/drivers/firmware/imx/Kconfig
> +++ b/drivers/firmware/imx/Kconfig
> @@ -22,9 +22,3 @@ config IMX_SCU
>
> This driver manages the IPC interface between host CPU and the
> SCU firmware running on M4.
> -
> -config IMX_SCU_PD
> - bool "IMX SCU Power Domain driver"
> - depends on IMX_SCU
> - help
> - The System Controller Firmware (SCFW) based power domain driver.
> diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig index
> ddc05d6af100..e2c85f20a0c3 100644
> --- a/drivers/pmdomain/Kconfig
> +++ b/drivers/pmdomain/Kconfig
> @@ -5,5 +5,6 @@ source "drivers/pmdomain/actions/Kconfig"
> source "drivers/pmdomain/amlogic/Kconfig"
> source "drivers/pmdomain/apple/Kconfig"
> source "drivers/pmdomain/bcm/Kconfig"
> +source "drivers/pmdomain/imx/Kconfig"
>
> endmenu
> diff --git a/drivers/pmdomain/imx/Kconfig b/drivers/pmdomain/imx/Kconfig
> new file mode 100644 index 000000000000..00203615c65e
> --- /dev/null
> +++ b/drivers/pmdomain/imx/Kconfig
> @@ -0,0 +1,29 @@
> +# SPDX-License-Identifier: GPL-2.0-only menu "i.MX PM Domains"
> +
> +config IMX_GPCV2_PM_DOMAINS
> + bool "i.MX GPCv2 PM domains"
> + depends on ARCH_MXC || (COMPILE_TEST && OF)
> + depends on PM
> + select PM_GENERIC_DOMAINS
> + select REGMAP_MMIO
> + default y if SOC_IMX7D
> +
> +config IMX8M_BLK_CTRL
> + bool
> + default SOC_IMX8M && IMX_GPCV2_PM_DOMAINS
> + depends on PM_GENERIC_DOMAINS
> + depends on COMMON_CLK
> +
> +config IMX9_BLK_CTRL
> + bool
> + default SOC_IMX9 && IMX_GPCV2_PM_DOMAINS
> + depends on PM_GENERIC_DOMAINS
> +
> +config IMX_SCU_PD
> + bool "IMX SCU Power Domain driver"
> + depends on IMX_SCU
> + help
> + The System Controller Firmware (SCFW) based power domain driver.
> +
> +endmenu
> diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig index
> 76a4593baf0a..2a90ddd20104 100644
> --- a/drivers/soc/imx/Kconfig
> +++ b/drivers/soc/imx/Kconfig
> @@ -1,14 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0-only menu "i.MX SoC drivers"
>
> -config IMX_GPCV2_PM_DOMAINS
> - bool "i.MX GPCv2 PM domains"
> - depends on ARCH_MXC || (COMPILE_TEST && OF)
> - depends on PM
> - select PM_GENERIC_DOMAINS
> - select REGMAP_MMIO
> - default y if SOC_IMX7D
> -
> config SOC_IMX8M
> tristate "i.MX8M SoC family support"
> depends on ARCH_MXC || COMPILE_TEST
> @@ -28,15 +20,4 @@ config SOC_IMX9
> help
> If you say yes here, you get support for the NXP i.MX9 family
>
> -config IMX8M_BLK_CTRL
> - bool
> - default SOC_IMX8M && IMX_GPCV2_PM_DOMAINS
> - depends on PM_GENERIC_DOMAINS
> - depends on COMMON_CLK
> -
> -config IMX9_BLK_CTRL
> - bool
> - default SOC_IMX9 && IMX_GPCV2_PM_DOMAINS
> - depends on PM_GENERIC_DOMAINS
> -
> endmenu
> --
> 2.34.1

2023-09-19 09:11:42

by Dhruva Gole

[permalink] [raw]
Subject: Re: [PATCH v2 16/17] pmdomain: ti: Move and add Kconfig options to the pmdomain subsystem

On Sep 15, 2023 at 11:20:02 +0200, Ulf Hansson wrote:
> The TI_SCI_PM_DOMAINS Kconfig option belongs closer to its corresponding
> implementation, hence let's move it from the soc subsystem to the pmdomain
> subsystem.
>
> While at it, let's also add a Kconfig option the omap_prm driver, rather
> than using ARCH_OMAP2PLUS directly.

OK

>
> Cc: Nishanth Menon <[email protected]>
> Cc: Santosh Shilimkar <[email protected]>
> Cc: Tero Kristo <[email protected]>
> Cc: Tony Lindgren <[email protected]>
> Signed-off-by: Ulf Hansson <[email protected]>
> ---
> drivers/pmdomain/Kconfig | 1 +
> drivers/pmdomain/ti/Kconfig | 22 ++++++++++++++++++++++
> drivers/pmdomain/ti/Makefile | 2 +-
> drivers/soc/ti/Kconfig | 12 ------------
> 4 files changed, 24 insertions(+), 13 deletions(-)
> create mode 100644 drivers/pmdomain/ti/Kconfig
>
> diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
> index 98e04589bef4..33bfec9c4f7a 100644
> --- a/drivers/pmdomain/Kconfig
> +++ b/drivers/pmdomain/Kconfig
> @@ -15,5 +15,6 @@ source "drivers/pmdomain/st/Kconfig"
> source "drivers/pmdomain/starfive/Kconfig"
> source "drivers/pmdomain/sunxi/Kconfig"
> source "drivers/pmdomain/tegra/Kconfig"
> +source "drivers/pmdomain/ti/Kconfig"
>
> endmenu
> diff --git a/drivers/pmdomain/ti/Kconfig b/drivers/pmdomain/ti/Kconfig
> new file mode 100644
> index 000000000000..67c608bf7ed0
> --- /dev/null
> +++ b/drivers/pmdomain/ti/Kconfig
> @@ -0,0 +1,22 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +
> +config OMAP2PLUS_PRM
> + bool
> + depends on ARCH_OMAP2PLUS
> + default ARCH_OMAP2PLUS
> +
> +if SOC_TI
> +
> +config TI_SCI_PM_DOMAINS
> + tristate "TI SCI PM Domains Driver"
> + depends on TI_SCI_PROTOCOL
> + depends on PM_GENERIC_DOMAINS
> + help
> + Generic power domain implementation for TI device implementing
> + the TI SCI protocol.
> +
> + To compile this as a module, choose M here. The module will be
> + called ti_sci_pm_domains. Note this is needed early in boot before
> + rootfs may be available.
> +
> +endif
> diff --git a/drivers/pmdomain/ti/Makefile b/drivers/pmdomain/ti/Makefile
> index 69580afbb436..af6cd056c158 100644
> --- a/drivers/pmdomain/ti/Makefile
> +++ b/drivers/pmdomain/ti/Makefile
> @@ -1,3 +1,3 @@
> # SPDX-License-Identifier: GPL-2.0
> -obj-$(CONFIG_ARCH_OMAP2PLUS) += omap_prm.o
> +obj-$(CONFIG_OMAP2PLUS_PRM) += omap_prm.o
> obj-$(CONFIG_TI_SCI_PM_DOMAINS) += ti_sci_pm_domains.o
> diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig
> index 2cae17b65fd9..1a93001c9e36 100644
> --- a/drivers/soc/ti/Kconfig
> +++ b/drivers/soc/ti/Kconfig
> @@ -50,18 +50,6 @@ config WKUP_M3_IPC
> to communicate and use the Wakeup M3 for PM features like suspend
> resume and boots it using wkup_m3_rproc driver.
>
> -config TI_SCI_PM_DOMAINS
> - tristate "TI SCI PM Domains Driver"
> - depends on TI_SCI_PROTOCOL
> - depends on PM_GENERIC_DOMAINS
> - help
> - Generic power domain implementation for TI device implementing
> - the TI SCI protocol.
> -
> - To compile this as a module, choose M here. The module will be
> - called ti_sci_pm_domains. Note this is needed early in boot before
> - rootfs may be available.
> -
> config TI_K3_RINGACC
> tristate "K3 Ring accelerator Sub System"
> depends on ARCH_K3 || COMPILE_TEST
> --
> 2.34.1
>

The changes are fine by me,
Reviewed-by: Dhruva Gole <[email protected]>

--
Best regards,
Dhruva Gole <[email protected]>