Merge tag 'genpd-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Aug 2023 23:37:00 +0000 (16:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Aug 2023 23:37:00 +0000 (16:37 -0700)
Pull ARM SoC generic power domain driver updates from Ulf Hansson:
 "This adds a new subsystem for generic power domain providers in
  drivers/genpd and starts moving some of the corresponding code in
  there.

  We have currently ~60 users of the genpd provider interface, which are
  sprinkled across various subsystems. To release some burden from the
  soc maintainers (Arnd Bergmann, etc) in particular, but also to gain a
  better overall view of what goes on in the area, I will help out with
  maintenance"

[ I find the "genpd" name singularly uninformative, so we'll probably
  end up moving this driver subsystem somewhere else, but that's still
  being discussed  - Linus ]

* tag 'genpd-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: (30 commits)
  genpd: ti: Use for_each_node_with_property() simplify code logic
  genpd: Explicitly include correct DT includes
  genpd: imx: scu-pd: initialize is_off according to HW state
  genpd: imx: scu-pd: Suppress bind attrs
  genpd: imx: scu-pd: do not power off console if no_console_suspend
  genpd: imx: scu-pd: add more PDs
  genpd: imx: scu-pd: enlarge PD range
  genpd: imx: relocate scu-pd under genpd
  MAINTAINERS: adjust file entry in STARFIVE JH71XX PMU CONTROLLER DRIVER
  genpd: Makefile: build imx
  genpd: move owl-sps-helper.c from drivers/soc
  soc: starfive: remove stale Makefile entry
  ARM: ux500: Move power-domain driver to the genpd dir
  ARM: ux500: Convert power-domain code into a regular platform driver
  soc: xilinx: Move power-domain driver to the genpd dir
  soc: ti: Mover power-domain drivers to the genpd dir
  soc: tegra: Move powergate-bpmp driver to the genpd dir
  soc: sunxi: Move power-domain driver to the genpd dir
  soc: starfive: Move the power-domain driver to the genpd dir
  soc: samsung: Move power-domain driver to the genpd dir
  ...

110 files changed:
MAINTAINERS
arch/arm/mach-ux500/Makefile
arch/arm/mach-ux500/cpu-db8500.c
arch/arm/mach-ux500/pm_domains.h [deleted file]
drivers/Makefile
drivers/firmware/imx/Makefile
drivers/genpd/Makefile [new file with mode: 0644]
drivers/genpd/actions/Makefile [new file with mode: 0644]
drivers/genpd/actions/owl-sps-helper.c [moved from drivers/soc/actions/owl-sps-helper.c with 100% similarity]
drivers/genpd/actions/owl-sps.c [moved from drivers/soc/actions/owl-sps.c with 100% similarity]
drivers/genpd/amlogic/Makefile [new file with mode: 0644]
drivers/genpd/amlogic/meson-ee-pwrc.c [moved from drivers/soc/amlogic/meson-ee-pwrc.c with 100% similarity]
drivers/genpd/amlogic/meson-gx-pwrc-vpu.c [moved from drivers/soc/amlogic/meson-gx-pwrc-vpu.c with 100% similarity]
drivers/genpd/amlogic/meson-secure-pwrc.c [moved from drivers/soc/amlogic/meson-secure-pwrc.c with 100% similarity]
drivers/genpd/apple/Makefile [new file with mode: 0644]
drivers/genpd/apple/pmgr-pwrstate.c [moved from drivers/soc/apple/apple-pmgr-pwrstate.c with 100% similarity]
drivers/genpd/bcm/Makefile [new file with mode: 0644]
drivers/genpd/bcm/bcm-pmb.c [moved from drivers/soc/bcm/bcm63xx/bcm-pmb.c with 100% similarity]
drivers/genpd/bcm/bcm2835-power.c [moved from drivers/soc/bcm/bcm2835-power.c with 100% similarity]
drivers/genpd/bcm/bcm63xx-power.c [moved from drivers/soc/bcm/bcm63xx/bcm63xx-power.c with 100% similarity]
drivers/genpd/bcm/raspberrypi-power.c [moved from drivers/soc/bcm/raspberrypi-power.c with 100% similarity]
drivers/genpd/imx/Makefile [new file with mode: 0644]
drivers/genpd/imx/gpc.c [moved from drivers/soc/imx/gpc.c with 100% similarity]
drivers/genpd/imx/gpcv2.c [moved from drivers/soc/imx/gpcv2.c with 100% similarity]
drivers/genpd/imx/imx8m-blk-ctrl.c [moved from drivers/soc/imx/imx8m-blk-ctrl.c with 100% similarity]
drivers/genpd/imx/imx8mp-blk-ctrl.c [moved from drivers/soc/imx/imx8mp-blk-ctrl.c with 100% similarity]
drivers/genpd/imx/imx93-blk-ctrl.c [moved from drivers/soc/imx/imx93-blk-ctrl.c with 100% similarity]
drivers/genpd/imx/imx93-pd.c [moved from drivers/soc/imx/imx93-pd.c with 100% similarity]
drivers/genpd/imx/scu-pd.c [moved from drivers/firmware/imx/scu-pd.c with 75% similarity]
drivers/genpd/mediatek/Makefile [new file with mode: 0644]
drivers/genpd/mediatek/mt6795-pm-domains.h [moved from drivers/soc/mediatek/mt6795-pm-domains.h with 100% similarity]
drivers/genpd/mediatek/mt8167-pm-domains.h [moved from drivers/soc/mediatek/mt8167-pm-domains.h with 100% similarity]
drivers/genpd/mediatek/mt8173-pm-domains.h [moved from drivers/soc/mediatek/mt8173-pm-domains.h with 100% similarity]
drivers/genpd/mediatek/mt8183-pm-domains.h [moved from drivers/soc/mediatek/mt8183-pm-domains.h with 100% similarity]
drivers/genpd/mediatek/mt8186-pm-domains.h [moved from drivers/soc/mediatek/mt8186-pm-domains.h with 100% similarity]
drivers/genpd/mediatek/mt8188-pm-domains.h [moved from drivers/soc/mediatek/mt8188-pm-domains.h with 100% similarity]
drivers/genpd/mediatek/mt8192-pm-domains.h [moved from drivers/soc/mediatek/mt8192-pm-domains.h with 100% similarity]
drivers/genpd/mediatek/mt8195-pm-domains.h [moved from drivers/soc/mediatek/mt8195-pm-domains.h with 100% similarity]
drivers/genpd/mediatek/mtk-pm-domains.c [moved from drivers/soc/mediatek/mtk-pm-domains.c with 99% similarity]
drivers/genpd/mediatek/mtk-pm-domains.h [moved from drivers/soc/mediatek/mtk-pm-domains.h with 100% similarity]
drivers/genpd/mediatek/mtk-scpsys.c [moved from drivers/soc/mediatek/mtk-scpsys.c with 99% similarity]
drivers/genpd/qcom/Makefile [new file with mode: 0644]
drivers/genpd/qcom/cpr.c [moved from drivers/soc/qcom/cpr.c with 100% similarity]
drivers/genpd/qcom/rpmhpd.c [moved from drivers/soc/qcom/rpmhpd.c with 100% similarity]
drivers/genpd/qcom/rpmpd.c [moved from drivers/soc/qcom/rpmpd.c with 100% similarity]
drivers/genpd/renesas/Makefile [new file with mode: 0644]
drivers/genpd/renesas/r8a7742-sysc.c [moved from drivers/soc/renesas/r8a7742-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a7743-sysc.c [moved from drivers/soc/renesas/r8a7743-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a7745-sysc.c [moved from drivers/soc/renesas/r8a7745-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a77470-sysc.c [moved from drivers/soc/renesas/r8a77470-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a774a1-sysc.c [moved from drivers/soc/renesas/r8a774a1-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a774b1-sysc.c [moved from drivers/soc/renesas/r8a774b1-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a774c0-sysc.c [moved from drivers/soc/renesas/r8a774c0-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a774e1-sysc.c [moved from drivers/soc/renesas/r8a774e1-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a7779-sysc.c [moved from drivers/soc/renesas/r8a7779-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a7790-sysc.c [moved from drivers/soc/renesas/r8a7790-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a7791-sysc.c [moved from drivers/soc/renesas/r8a7791-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a7792-sysc.c [moved from drivers/soc/renesas/r8a7792-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a7794-sysc.c [moved from drivers/soc/renesas/r8a7794-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a7795-sysc.c [moved from drivers/soc/renesas/r8a7795-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a7796-sysc.c [moved from drivers/soc/renesas/r8a7796-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a77965-sysc.c [moved from drivers/soc/renesas/r8a77965-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a77970-sysc.c [moved from drivers/soc/renesas/r8a77970-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a77980-sysc.c [moved from drivers/soc/renesas/r8a77980-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a77990-sysc.c [moved from drivers/soc/renesas/r8a77990-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a77995-sysc.c [moved from drivers/soc/renesas/r8a77995-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a779a0-sysc.c [moved from drivers/soc/renesas/r8a779a0-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a779f0-sysc.c [moved from drivers/soc/renesas/r8a779f0-sysc.c with 100% similarity]
drivers/genpd/renesas/r8a779g0-sysc.c [moved from drivers/soc/renesas/r8a779g0-sysc.c with 100% similarity]
drivers/genpd/renesas/rcar-gen4-sysc.c [moved from drivers/soc/renesas/rcar-gen4-sysc.c with 100% similarity]
drivers/genpd/renesas/rcar-gen4-sysc.h [moved from drivers/soc/renesas/rcar-gen4-sysc.h with 100% similarity]
drivers/genpd/renesas/rcar-sysc.c [moved from drivers/soc/renesas/rcar-sysc.c with 100% similarity]
drivers/genpd/renesas/rcar-sysc.h [moved from drivers/soc/renesas/rcar-sysc.h with 100% similarity]
drivers/genpd/renesas/rmobile-sysc.c [moved from drivers/soc/renesas/rmobile-sysc.c with 100% similarity]
drivers/genpd/rockchip/Makefile [new file with mode: 0644]
drivers/genpd/rockchip/pm-domains.c [moved from drivers/soc/rockchip/pm_domains.c with 100% similarity]
drivers/genpd/samsung/Makefile [new file with mode: 0644]
drivers/genpd/samsung/exynos-pm-domains.c [moved from drivers/soc/samsung/pm_domains.c with 100% similarity]
drivers/genpd/st/Makefile [new file with mode: 0644]
drivers/genpd/st/ste-ux500-pm-domain.c [moved from arch/arm/mach-ux500/pm_domains.c with 75% similarity]
drivers/genpd/starfive/Makefile [new file with mode: 0644]
drivers/genpd/starfive/jh71xx-pmu.c [moved from drivers/soc/starfive/jh71xx_pmu.c with 100% similarity]
drivers/genpd/sunxi/Makefile [new file with mode: 0644]
drivers/genpd/sunxi/sun20i-ppu.c [moved from drivers/soc/sunxi/sun20i-ppu.c with 99% similarity]
drivers/genpd/tegra/Makefile [new file with mode: 0644]
drivers/genpd/tegra/powergate-bpmp.c [moved from drivers/soc/tegra/powergate-bpmp.c with 100% similarity]
drivers/genpd/ti/Makefile [new file with mode: 0644]
drivers/genpd/ti/omap_prm.c [moved from drivers/soc/ti/omap_prm.c with 100% similarity]
drivers/genpd/ti/ti_sci_pm_domains.c [moved from drivers/soc/ti/ti_sci_pm_domains.c with 97% similarity]
drivers/genpd/xilinx/Makefile [new file with mode: 0644]
drivers/genpd/xilinx/zynqmp-pm-domains.c [moved from drivers/soc/xilinx/zynqmp_pm_domains.c with 100% similarity]
drivers/soc/Makefile
drivers/soc/actions/Makefile [deleted file]
drivers/soc/amlogic/Makefile
drivers/soc/apple/Makefile
drivers/soc/bcm/Kconfig
drivers/soc/bcm/Makefile
drivers/soc/bcm/bcm63xx/Kconfig [deleted file]
drivers/soc/bcm/bcm63xx/Makefile [deleted file]
drivers/soc/imx/Makefile
drivers/soc/mediatek/Makefile
drivers/soc/qcom/Makefile
drivers/soc/renesas/Makefile
drivers/soc/rockchip/Makefile
drivers/soc/samsung/Makefile
drivers/soc/starfive/Makefile [deleted file]
drivers/soc/sunxi/Makefile
drivers/soc/tegra/Makefile
drivers/soc/ti/Makefile
drivers/soc/xilinx/Makefile

index 116177e..2ef597f 100644 (file)
@@ -1855,6 +1855,7 @@ F:        Documentation/devicetree/bindings/phy/amlogic*
 F:     arch/arm/boot/dts/amlogic/
 F:     arch/arm/mach-meson/
 F:     arch/arm64/boot/dts/amlogic/
+F:     drivers/genpd/amlogic/
 F:     drivers/mmc/host/meson*
 F:     drivers/phy/amlogic/
 F:     drivers/pinctrl/meson/
@@ -1917,6 +1918,7 @@ F:        drivers/bluetooth/hci_bcm4377.c
 F:     drivers/clk/clk-apple-nco.c
 F:     drivers/cpufreq/apple-soc-cpufreq.c
 F:     drivers/dma/apple-admac.c
+F:     drivers/genpd/apple/
 F:     drivers/i2c/busses/i2c-pasemi-core.c
 F:     drivers/i2c/busses/i2c-pasemi-platform.c
 F:     drivers/iommu/apple-dart.c
@@ -2433,6 +2435,7 @@ F:        arch/arm/mach-ux500/
 F:     drivers/clk/clk-nomadik.c
 F:     drivers/clocksource/clksrc-dbx500-prcmu.c
 F:     drivers/dma/ste_dma40*
+F:     drivers/genpd/st/ste-ux500-pm-domain.c
 F:     drivers/hwspinlock/u8500_hsem.c
 F:     drivers/i2c/busses/i2c-nomadik.c
 F:     drivers/iio/adc/ab8500-gpadc.c
@@ -2605,6 +2608,7 @@ F:        arch/arm/include/debug/renesas-scif.S
 F:     arch/arm/mach-shmobile/
 F:     arch/arm64/boot/dts/renesas/
 F:     arch/riscv/boot/dts/renesas/
+F:     drivers/genpd/renesas/
 F:     drivers/soc/renesas/
 F:     include/linux/soc/renesas/
 K:     \brenesas,
@@ -4032,7 +4036,7 @@ F:        arch/mips/kernel/*bmips*
 F:     drivers/irqchip/irq-bcm63*
 F:     drivers/irqchip/irq-bcm7*
 F:     drivers/irqchip/irq-brcmstb*
-F:     drivers/soc/bcm/bcm63xx
+F:     drivers/genpd/bcm/bcm63xx-power.c
 F:     include/linux/bcm963xx_nvram.h
 F:     include/linux/bcm963xx_tag.h
 
@@ -4254,7 +4258,7 @@ R:        Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
 L:     linux-pm@vger.kernel.org
 S:     Maintained
 T:     git https://github.com/broadcom/stblinux.git
-F:     drivers/soc/bcm/bcm63xx/bcm-pmb.c
+F:     drivers/genpd/bcm/bcm-pmb.c
 F:     include/dt-bindings/soc/bcm-pmb.h
 
 BROADCOM SPECIFIC AMBA DRIVER (BCMA)
@@ -8712,6 +8716,13 @@ F:       Documentation/devicetree/bindings/power/power?domain*
 F:     drivers/base/power/domain*.c
 F:     include/linux/pm_domain.h
 
+GENERIC PM DOMAIN PROVIDERS
+M:     Ulf Hansson <ulf.hansson@linaro.org>
+L:     linux-pm@vger.kernel.org
+S:     Supported
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git
+F:     drivers/genpd/
+
 GENERIC RESISTIVE TOUCHSCREEN ADC DRIVER
 M:     Eugen Hristev <eugen.hristev@microchip.com>
 L:     linux-input@vger.kernel.org
@@ -17611,7 +17622,7 @@ L:      linux-pm@vger.kernel.org
 L:     linux-arm-msm@vger.kernel.org
 S:     Maintained
 F:     Documentation/devicetree/bindings/power/avs/qcom,cpr.yaml
-F:     drivers/soc/qcom/cpr.c
+F:     drivers/genpd/qcom/cpr.c
 
 QUALCOMM CPUFREQ DRIVER MSM8996/APQ8096
 M:     Ilia Lin <ilia.lin@kernel.org>
@@ -20394,7 +20405,7 @@ STARFIVE JH71XX PMU CONTROLLER DRIVER
 M:     Walker Chen <walker.chen@starfivetech.com>
 S:     Supported
 F:     Documentation/devicetree/bindings/power/starfive*
-F:     drivers/soc/starfive/jh71xx_pmu.c
+F:     drivers/genpd/starfive/jh71xx-pmu.c
 F:     include/dt-bindings/power/starfive,jh7110-pmu.h
 
 STARFIVE SOC DRIVERS
@@ -21210,7 +21221,7 @@ F:      drivers/irqchip/irq-ti-sci-inta.c
 F:     drivers/irqchip/irq-ti-sci-intr.c
 F:     drivers/reset/reset-ti-sci.c
 F:     drivers/soc/ti/ti_sci_inta_msi.c
-F:     drivers/soc/ti/ti_sci_pm_domains.c
+F:     drivers/genpd/ti/ti_sci_pm_domains.c
 F:     include/dt-bindings/soc/ti,sci_pm_domain.h
 F:     include/linux/soc/ti/ti_sci_inta_msi.h
 F:     include/linux/soc/ti/ti_sci_protocol.h
@@ -21444,6 +21455,7 @@ L:      linux-kernel@vger.kernel.org
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:     Maintained
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
+F:     drivers/genpd/ti/omap_prm.c
 F:     drivers/soc/ti/*
 
 TI LM49xxx FAMILY ASoC CODEC DRIVERS
index 5e90324..270e567 100644 (file)
@@ -6,4 +6,3 @@
 obj-y                          := pm.o
 obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o
 obj-$(CONFIG_SMP)              += platsmp.o
-obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
index 7cc0dd8..b1a70f2 100644 (file)
@@ -26,8 +26,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 
-#include "pm_domains.h"
-
 static int __init ux500_l2x0_unlock(void)
 {
        int i;
@@ -115,9 +113,6 @@ static const struct of_device_id u8500_local_bus_nodes[] = {
 
 static void __init u8500_init_machine(void)
 {
-       /* Initialize ux500 power domains */
-       ux500_pm_domains_init();
-
        of_platform_populate(NULL, u8500_local_bus_nodes,
                             NULL, NULL);
 }
diff --git a/arch/arm/mach-ux500/pm_domains.h b/arch/arm/mach-ux500/pm_domains.h
deleted file mode 100644 (file)
index 33c55f2..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (C) 2014 Linaro Ltd.
- *
- * Author: Ulf Hansson <ulf.hansson@linaro.org>
- */
-
-#ifndef __MACH_UX500_PM_DOMAINS_H
-#define __MACH_UX500_PM_DOMAINS_H
-
-#ifdef CONFIG_PM_GENERIC_DOMAINS
-extern int __init ux500_pm_domains_init(void);
-#else
-static inline int ux500_pm_domains_init(void) { return 0; }
-#endif
-
-#endif
index a7459e7..0957f63 100644 (file)
@@ -45,6 +45,7 @@ obj-$(CONFIG_DMADEVICES)      += dma/
 
 # SOC specific infrastructure drivers.
 obj-y                          += soc/
+obj-$(CONFIG_PM_GENERIC_DOMAINS)       += genpd/
 
 obj-y                          += virtio/
 obj-$(CONFIG_VDPA)             += vdpa/
index b76acba..8f9f04a 100644 (file)
@@ -1,4 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_IMX_DSP)          += imx-dsp.o
 obj-$(CONFIG_IMX_SCU)          += imx-scu.o misc.o imx-scu-irq.o rm.o imx-scu-soc.o
-obj-$(CONFIG_IMX_SCU_PD)       += scu-pd.o
diff --git a/drivers/genpd/Makefile b/drivers/genpd/Makefile
new file mode 100644 (file)
index 0000000..6667536
--- /dev/null
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-y                                  += actions/
+obj-y                                  += amlogic/
+obj-y                                  += apple/
+obj-y                                  += bcm/
+obj-y                                  += imx/
+obj-y                                  += mediatek/
+obj-y                                  += qcom/
+obj-y                                  += renesas/
+obj-y                                  += rockchip/
+obj-y                                  += samsung/
+obj-y                                  += st/
+obj-y                                  += starfive/
+obj-y                                  += sunxi/
+obj-y                                  += tegra/
+obj-y                                  += ti/
+obj-y                                  += xilinx/
diff --git a/drivers/genpd/actions/Makefile b/drivers/genpd/actions/Makefile
new file mode 100644 (file)
index 0000000..7e8aa47
--- /dev/null
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0+
+obj-$(CONFIG_OWL_PM_DOMAINS_HELPER)    += owl-sps-helper.o
+obj-$(CONFIG_OWL_PM_DOMAINS)           += owl-sps.o
diff --git a/drivers/genpd/amlogic/Makefile b/drivers/genpd/amlogic/Makefile
new file mode 100644 (file)
index 0000000..3d58abd
--- /dev/null
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_MESON_GX_PM_DOMAINS) += meson-gx-pwrc-vpu.o
+obj-$(CONFIG_MESON_EE_PM_DOMAINS) += meson-ee-pwrc.o
+obj-$(CONFIG_MESON_SECURE_PM_DOMAINS) += meson-secure-pwrc.o
diff --git a/drivers/genpd/apple/Makefile b/drivers/genpd/apple/Makefile
new file mode 100644 (file)
index 0000000..53665af
--- /dev/null
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_APPLE_PMGR_PWRSTATE)      += pmgr-pwrstate.o
diff --git a/drivers/genpd/bcm/Makefile b/drivers/genpd/bcm/Makefile
new file mode 100644 (file)
index 0000000..6bfbe4e
--- /dev/null
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_BCM_PMB)                  += bcm-pmb.o
+obj-$(CONFIG_BCM2835_POWER)            += bcm2835-power.o
+obj-$(CONFIG_BCM63XX_POWER)            += bcm63xx-power.o
+obj-$(CONFIG_RASPBERRYPI_POWER)                += raspberrypi-power.o
diff --git a/drivers/genpd/imx/Makefile b/drivers/genpd/imx/Makefile
new file mode 100644 (file)
index 0000000..52d2629
--- /dev/null
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
+obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o
+obj-$(CONFIG_IMX_SCU_PD) += scu-pd.o
+obj-$(CONFIG_IMX8M_BLK_CTRL) += imx8m-blk-ctrl.o
+obj-$(CONFIG_IMX8M_BLK_CTRL) += imx8mp-blk-ctrl.o
+obj-$(CONFIG_SOC_IMX9) += imx93-pd.o
+obj-$(CONFIG_IMX9_BLK_CTRL) += imx93-blk-ctrl.o
similarity index 75%
rename from drivers/firmware/imx/scu-pd.c
rename to drivers/genpd/imx/scu-pd.c
index 84b6734..2f693b6 100644 (file)
@@ -52,6 +52,7 @@
  */
 
 #include <dt-bindings/firmware/imx/rsrc.h>
+#include <linux/console.h>
 #include <linux/firmware/imx/sci.h>
 #include <linux/firmware/imx/svc/rm.h>
 #include <linux/io.h>
@@ -71,6 +72,22 @@ struct imx_sc_msg_req_set_resource_power_mode {
        u8 mode;
 } __packed __aligned(4);
 
+struct req_get_resource_mode {
+       u16 resource;
+};
+
+struct resp_get_resource_mode {
+       u8 mode;
+};
+
+struct imx_sc_msg_req_get_resource_power_mode {
+       struct imx_sc_rpc_msg hdr;
+       union {
+               struct req_get_resource_mode req;
+               struct resp_get_resource_mode resp;
+       } data;
+} __packed __aligned(4);
+
 #define IMX_SCU_PD_NAME_SIZE 20
 struct imx_sc_pm_domain {
        struct generic_pm_domain pd;
@@ -95,6 +112,14 @@ struct imx_sc_pd_soc {
 
 static int imx_con_rsrc;
 
+/* Align with the IMX_SC_PM_PW_MODE_[OFF,STBY,LP,ON] macros */
+static const char * const imx_sc_pm_mode[] = {
+       "IMX_SC_PM_PW_MODE_OFF",
+       "IMX_SC_PM_PW_MODE_STBY",
+       "IMX_SC_PM_PW_MODE_LP",
+       "IMX_SC_PM_PW_MODE_ON"
+};
+
 static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = {
        /* LSIO SS */
        { "pwm", IMX_SC_R_PWM_0, 8, true, 0 },
@@ -121,12 +146,16 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = {
        { "audio-pll1", IMX_SC_R_AUDIO_PLL_1, 1, false, 0 },
        { "audio-clk-0", IMX_SC_R_AUDIO_CLK_0, 1, false, 0 },
        { "audio-clk-1", IMX_SC_R_AUDIO_CLK_1, 1, false, 0 },
-       { "dma0-ch", IMX_SC_R_DMA_0_CH0, 16, true, 0 },
+       { "mclk-out-0", IMX_SC_R_MCLK_OUT_0, 1, false, 0 },
+       { "mclk-out-1", IMX_SC_R_MCLK_OUT_1, 1, false, 0 },
+       { "dma0-ch", IMX_SC_R_DMA_0_CH0, 32, true, 0 },
        { "dma1-ch", IMX_SC_R_DMA_1_CH0, 16, true, 0 },
-       { "dma2-ch", IMX_SC_R_DMA_2_CH0, 5, true, 0 },
+       { "dma2-ch", IMX_SC_R_DMA_2_CH0, 32, true, 0 },
+       { "dma3-ch", IMX_SC_R_DMA_3_CH0, 32, true, 0 },
        { "asrc0", IMX_SC_R_ASRC_0, 1, false, 0 },
        { "asrc1", IMX_SC_R_ASRC_1, 1, false, 0 },
        { "esai0", IMX_SC_R_ESAI_0, 1, false, 0 },
+       { "esai1", IMX_SC_R_ESAI_1, 1, false, 0 },
        { "spdif0", IMX_SC_R_SPDIF_0, 1, false, 0 },
        { "spdif1", IMX_SC_R_SPDIF_1, 1, false, 0 },
        { "sai", IMX_SC_R_SAI_0, 3, true, 0 },
@@ -143,11 +172,13 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = {
        /* DMA SS */
        { "can", IMX_SC_R_CAN_0, 3, true, 0 },
        { "ftm", IMX_SC_R_FTM_0, 2, true, 0 },
-       { "lpi2c", IMX_SC_R_I2C_0, 4, true, 0 },
+       { "lpi2c", IMX_SC_R_I2C_0, 5, true, 0 },
        { "adc", IMX_SC_R_ADC_0, 2, true, 0 },
        { "lcd", IMX_SC_R_LCD_0, 1, true, 0 },
+       { "lcd-pll", IMX_SC_R_ELCDIF_PLL, 1, true, 0 },
        { "lcd0-pwm", IMX_SC_R_LCD_0_PWM_0, 1, true, 0 },
-       { "lpuart", IMX_SC_R_UART_0, 4, true, 0 },
+       { "lpuart", IMX_SC_R_UART_0, 5, true, 0 },
+       { "sim", IMX_SC_R_EMVSIM_0, 2, true, 0 },
        { "lpspi", IMX_SC_R_SPI_0, 4, true, 0 },
        { "irqstr_dsp", IMX_SC_R_IRQSTR_DSP, 1, false, 0 },
 
@@ -163,10 +194,15 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = {
 
        /* GPU SS */
        { "gpu0-pid", IMX_SC_R_GPU_0_PID0, 4, true, 0 },
+       { "gpu1-pid", IMX_SC_R_GPU_1_PID0, 4, true, 0 },
+
 
        /* HSIO SS */
+       { "pcie-a", IMX_SC_R_PCIE_A, 1, false, 0 },
+       { "serdes-0", IMX_SC_R_SERDES_0, 1, false, 0 },
        { "pcie-b", IMX_SC_R_PCIE_B, 1, false, 0 },
        { "serdes-1", IMX_SC_R_SERDES_1, 1, false, 0 },
+       { "sata-0", IMX_SC_R_SATA_0, 1, false, 0 },
        { "hsio-gpio", IMX_SC_R_HSIO_GPIO, 1, false, 0 },
 
        /* MIPI SS */
@@ -186,11 +222,20 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = {
        { "lvds1-pwm", IMX_SC_R_LVDS_1_PWM_0, 1, false, 0 },
        { "lvds1-lpi2c", IMX_SC_R_LVDS_1_I2C_0, 2, true, 0 },
 
+       { "mipi1", IMX_SC_R_MIPI_1, 1, 0 },
+       { "mipi1-pwm0", IMX_SC_R_MIPI_1_PWM_0, 1, 0 },
+       { "mipi1-i2c", IMX_SC_R_MIPI_1_I2C_0, 2, 1 },
+       { "lvds1", IMX_SC_R_LVDS_1, 1, 0 },
+
        /* DC SS */
        { "dc0", IMX_SC_R_DC_0, 1, false, 0 },
        { "dc0-pll", IMX_SC_R_DC_0_PLL_0, 2, true, 0 },
        { "dc0-video", IMX_SC_R_DC_0_VIDEO0, 2, true, 0 },
 
+       { "dc1", IMX_SC_R_DC_1, 1, false, 0 },
+       { "dc1-pll", IMX_SC_R_DC_1_PLL_0, 2, true, 0 },
+       { "dc1-video", IMX_SC_R_DC_1_VIDEO0, 2, true, 0 },
+
        /* CM40 SS */
        { "cm40-i2c", IMX_SC_R_M4_0_I2C, 1, false, 0 },
        { "cm40-intmux", IMX_SC_R_M4_0_INTMUX, 1, false, 0 },
@@ -205,11 +250,56 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = {
        { "cm41-mu-a1", IMX_SC_R_M4_1_MU_1A, 1, false, 0},
        { "cm41-lpuart", IMX_SC_R_M4_1_UART, 1, false, 0},
 
+       /* CM41 SS */
+       { "cm41_i2c", IMX_SC_R_M4_1_I2C, 1, false, 0 },
+       { "cm41_intmux", IMX_SC_R_M4_1_INTMUX, 1, false, 0 },
+
+       /* DB SS */
+       { "perf", IMX_SC_R_PERF, 1, false, 0},
+
        /* IMAGE SS */
        { "img-jpegdec-mp", IMX_SC_R_MJPEG_DEC_MP, 1, false, 0 },
        { "img-jpegdec-s0", IMX_SC_R_MJPEG_DEC_S0, 4, true, 0 },
        { "img-jpegenc-mp", IMX_SC_R_MJPEG_ENC_MP, 1, false, 0 },
        { "img-jpegenc-s0", IMX_SC_R_MJPEG_ENC_S0, 4, true, 0 },
+
+       /* SECO SS */
+       { "seco_mu", IMX_SC_R_SECO_MU_2, 3, true, 2},
+
+       /* V2X SS */
+       { "v2x_mu", IMX_SC_R_V2X_MU_0, 2, true, 0},
+       { "v2x_mu", IMX_SC_R_V2X_MU_2, 1, true, 2},
+       { "v2x_mu", IMX_SC_R_V2X_MU_3, 2, true, 3},
+       { "img-pdma", IMX_SC_R_ISI_CH0, 8, true, 0 },
+       { "img-csi0", IMX_SC_R_CSI_0, 1, false, 0 },
+       { "img-csi0-i2c0", IMX_SC_R_CSI_0_I2C_0, 1, false, 0 },
+       { "img-csi0-pwm0", IMX_SC_R_CSI_0_PWM_0, 1, false, 0 },
+       { "img-csi1", IMX_SC_R_CSI_1, 1, false, 0 },
+       { "img-csi1-i2c0", IMX_SC_R_CSI_1_I2C_0, 1, false, 0 },
+       { "img-csi1-pwm0", IMX_SC_R_CSI_1_PWM_0, 1, false, 0 },
+       { "img-parallel", IMX_SC_R_PI_0, 1, false, 0 },
+       { "img-parallel-i2c0", IMX_SC_R_PI_0_I2C_0, 1, false, 0 },
+       { "img-parallel-pwm0", IMX_SC_R_PI_0_PWM_0, 2, true, 0 },
+       { "img-parallel-pll", IMX_SC_R_PI_0_PLL, 1, false, 0 },
+
+       /* HDMI TX SS */
+       { "hdmi-tx", IMX_SC_R_HDMI, 1, false, 0},
+       { "hdmi-tx-i2s", IMX_SC_R_HDMI_I2S, 1, false, 0},
+       { "hdmi-tx-i2c0", IMX_SC_R_HDMI_I2C_0, 1, false, 0},
+       { "hdmi-tx-pll0", IMX_SC_R_HDMI_PLL_0, 1, false, 0},
+       { "hdmi-tx-pll1", IMX_SC_R_HDMI_PLL_1, 1, false, 0},
+
+       /* HDMI RX SS */
+       { "hdmi-rx", IMX_SC_R_HDMI_RX, 1, false, 0},
+       { "hdmi-rx-pwm", IMX_SC_R_HDMI_RX_PWM_0, 1, false, 0},
+       { "hdmi-rx-i2c0", IMX_SC_R_HDMI_RX_I2C_0, 1, false, 0},
+       { "hdmi-rx-bypass", IMX_SC_R_HDMI_RX_BYPASS, 1, false, 0},
+
+       /* SECURITY SS */
+       { "sec-jr", IMX_SC_R_CAAM_JR2, 2, true, 2},
+
+       /* BOARD SS */
+       { "board", IMX_SC_R_BOARD_R0, 8, true, 0},
 };
 
 static const struct imx_sc_pd_soc imx8qxp_scu_pd = {
@@ -242,6 +332,27 @@ static void imx_sc_pd_get_console_rsrc(void)
        imx_con_rsrc = specs.args[0];
 }
 
+static int imx_sc_get_pd_power(struct device *dev, u32 rsrc)
+{
+       struct imx_sc_msg_req_get_resource_power_mode msg;
+       struct imx_sc_rpc_msg *hdr = &msg.hdr;
+       int ret;
+
+       hdr->ver = IMX_SC_RPC_VERSION;
+       hdr->svc = IMX_SC_RPC_SVC_PM;
+       hdr->func = IMX_SC_PM_FUNC_GET_RESOURCE_POWER_MODE;
+       hdr->size = 2;
+
+       msg.data.req.resource = rsrc;
+
+       ret = imx_scu_call_rpc(pm_ipc_handle, &msg, true);
+       if (ret)
+               dev_err(dev, "failed to get power resource %d mode, ret %d\n",
+                       rsrc, ret);
+
+       return msg.data.resp.mode;
+}
+
 static int imx_sc_pd_power(struct generic_pm_domain *domain, bool power_on)
 {
        struct imx_sc_msg_req_set_resource_power_mode msg;
@@ -259,6 +370,10 @@ static int imx_sc_pd_power(struct generic_pm_domain *domain, bool power_on)
        msg.resource = pd->rsrc;
        msg.mode = power_on ? IMX_SC_PM_PW_MODE_ON : IMX_SC_PM_PW_MODE_LP;
 
+       /* keep uart console power on for no_console_suspend */
+       if (imx_con_rsrc == pd->rsrc && !console_suspend_enabled && !power_on)
+               return -EBUSY;
+
        ret = imx_scu_call_rpc(pm_ipc_handle, &msg, true);
        if (ret)
                dev_err(&domain->dev, "failed to power %s resource %d ret %d\n",
@@ -302,8 +417,8 @@ imx_scu_add_pm_domain(struct device *dev, int idx,
                      const struct imx_sc_pd_range *pd_ranges)
 {
        struct imx_sc_pm_domain *sc_pd;
-       bool is_off = true;
-       int ret;
+       bool is_off;
+       int mode, ret;
 
        if (!imx_sc_rm_is_resource_owned(pm_ipc_handle, pd_ranges->rsrc + idx))
                return NULL;
@@ -324,10 +439,16 @@ imx_scu_add_pm_domain(struct device *dev, int idx,
                         "%s", pd_ranges->name);
 
        sc_pd->pd.name = sc_pd->name;
-       if (imx_con_rsrc == sc_pd->rsrc) {
+       if (imx_con_rsrc == sc_pd->rsrc)
                sc_pd->pd.flags = GENPD_FLAG_RPM_ALWAYS_ON;
+
+       mode = imx_sc_get_pd_power(dev, pd_ranges->rsrc + idx);
+       if (mode == IMX_SC_PM_PW_MODE_ON)
                is_off = false;
-       }
+       else
+               is_off = true;
+
+       dev_dbg(dev, "%s : %s\n", sc_pd->name, imx_sc_pm_mode[mode]);
 
        if (sc_pd->rsrc >= IMX_SC_R_LAST) {
                dev_warn(dev, "invalid pd %s rsrc id %d found",
@@ -418,6 +539,7 @@ static struct platform_driver imx_sc_pd_driver = {
        .driver = {
                .name = "imx-scu-pd",
                .of_match_table = imx_sc_pd_match,
+               .suppress_bind_attrs = true,
        },
        .probe = imx_sc_pd_probe,
 };
diff --git a/drivers/genpd/mediatek/Makefile b/drivers/genpd/mediatek/Makefile
new file mode 100644 (file)
index 0000000..8cde09e
--- /dev/null
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_MTK_SCPSYS)               += mtk-scpsys.o
+obj-$(CONFIG_MTK_SCPSYS_PM_DOMAINS)    += mtk-pm-domains.o
similarity index 99%
rename from drivers/soc/mediatek/mtk-pm-domains.c
rename to drivers/genpd/mediatek/mtk-pm-domains.c
index 354249c..ee96280 100644 (file)
@@ -8,8 +8,8 @@
 #include <linux/io.h>
 #include <linux/iopoll.h>
 #include <linux/mfd/syscon.h>
+#include <linux/of.h>
 #include <linux/of_clk.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/pm_domain.h>
 #include <linux/regmap.h>
similarity index 99%
rename from drivers/soc/mediatek/mtk-scpsys.c
rename to drivers/genpd/mediatek/mtk-scpsys.c
index 7a66888..b374d01 100644 (file)
@@ -7,7 +7,7 @@
 #include <linux/io.h>
 #include <linux/iopoll.h>
 #include <linux/mfd/syscon.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_domain.h>
 #include <linux/regulator/consumer.h>
diff --git a/drivers/genpd/qcom/Makefile b/drivers/genpd/qcom/Makefile
new file mode 100644 (file)
index 0000000..403dfc5
--- /dev/null
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_QCOM_CPR)         += cpr.o
+obj-$(CONFIG_QCOM_RPMPD)       += rpmpd.o
+obj-$(CONFIG_QCOM_RPMHPD)      += rpmhpd.o
diff --git a/drivers/genpd/renesas/Makefile b/drivers/genpd/renesas/Makefile
new file mode 100644 (file)
index 0000000..e306e39
--- /dev/null
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: GPL-2.0
+# SoC
+obj-$(CONFIG_SYSC_R8A7742)     += r8a7742-sysc.o
+obj-$(CONFIG_SYSC_R8A7743)     += r8a7743-sysc.o
+obj-$(CONFIG_SYSC_R8A7745)     += r8a7745-sysc.o
+obj-$(CONFIG_SYSC_R8A77470)    += r8a77470-sysc.o
+obj-$(CONFIG_SYSC_R8A774A1)    += r8a774a1-sysc.o
+obj-$(CONFIG_SYSC_R8A774B1)    += r8a774b1-sysc.o
+obj-$(CONFIG_SYSC_R8A774C0)    += r8a774c0-sysc.o
+obj-$(CONFIG_SYSC_R8A774E1)    += r8a774e1-sysc.o
+obj-$(CONFIG_SYSC_R8A7779)     += r8a7779-sysc.o
+obj-$(CONFIG_SYSC_R8A7790)     += r8a7790-sysc.o
+obj-$(CONFIG_SYSC_R8A7791)     += r8a7791-sysc.o
+obj-$(CONFIG_SYSC_R8A7792)     += r8a7792-sysc.o
+obj-$(CONFIG_SYSC_R8A7794)     += r8a7794-sysc.o
+obj-$(CONFIG_SYSC_R8A7795)     += r8a7795-sysc.o
+obj-$(CONFIG_SYSC_R8A77960)    += r8a7796-sysc.o
+obj-$(CONFIG_SYSC_R8A77961)    += r8a7796-sysc.o
+obj-$(CONFIG_SYSC_R8A77965)    += r8a77965-sysc.o
+obj-$(CONFIG_SYSC_R8A77970)    += r8a77970-sysc.o
+obj-$(CONFIG_SYSC_R8A77980)    += r8a77980-sysc.o
+obj-$(CONFIG_SYSC_R8A77990)    += r8a77990-sysc.o
+obj-$(CONFIG_SYSC_R8A77995)    += r8a77995-sysc.o
+obj-$(CONFIG_SYSC_R8A779A0)    += r8a779a0-sysc.o
+obj-$(CONFIG_SYSC_R8A779F0)    += r8a779f0-sysc.o
+obj-$(CONFIG_SYSC_R8A779G0)    += r8a779g0-sysc.o
+# Family
+obj-$(CONFIG_SYSC_RCAR)                += rcar-sysc.o
+obj-$(CONFIG_SYSC_RCAR_GEN4)   += rcar-gen4-sysc.o
+obj-$(CONFIG_SYSC_RMOBILE)     += rmobile-sysc.o
diff --git a/drivers/genpd/rockchip/Makefile b/drivers/genpd/rockchip/Makefile
new file mode 100644 (file)
index 0000000..8fb9d88
--- /dev/null
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_ROCKCHIP_PM_DOMAINS)      += pm-domains.o
diff --git a/drivers/genpd/samsung/Makefile b/drivers/genpd/samsung/Makefile
new file mode 100644 (file)
index 0000000..397aa59
--- /dev/null
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_EXYNOS_PM_DOMAINS)                += exynos-pm-domains.o
diff --git a/drivers/genpd/st/Makefile b/drivers/genpd/st/Makefile
new file mode 100644 (file)
index 0000000..8fa5f98
--- /dev/null
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_ARCH_U8500)               += ste-ux500-pm-domain.o
similarity index 75%
rename from arch/arm/mach-ux500/pm_domains.c
rename to drivers/genpd/st/ste-ux500-pm-domain.c
index 427b9ac..3d4f111 100644 (file)
@@ -6,6 +6,9 @@
  *
  * Implements PM domains using the generic PM domain for ux500.
  */
+#include <linux/device.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
 #include <linux/printk.h>
 #include <linux/slab.h>
 #include <linux/err.h>
@@ -13,7 +16,6 @@
 #include <linux/pm_domain.h>
 
 #include <dt-bindings/arm/ux500_pm_domains.h>
-#include "pm_domains.h"
 
 static int pd_power_off(struct generic_pm_domain *domain)
 {
@@ -49,18 +51,17 @@ static struct generic_pm_domain *ux500_pm_domains[NR_DOMAINS] = {
        [DOMAIN_VAPE] = &ux500_pm_domain_vape,
 };
 
-static const struct of_device_id ux500_pm_domain_matches[] __initconst = {
+static const struct of_device_id ux500_pm_domain_matches[] = {
        { .compatible = "stericsson,ux500-pm-domains", },
        { },
 };
 
-int __init ux500_pm_domains_init(void)
+static int ux500_pm_domains_probe(struct platform_device *pdev)
 {
-       struct device_node *np;
+       struct device_node *np = pdev->dev.of_node;
        struct genpd_onecell_data *genpd_data;
        int i;
 
-       np = of_find_matching_node(NULL, ux500_pm_domain_matches);
        if (!np)
                return -ENODEV;
 
@@ -77,3 +78,17 @@ int __init ux500_pm_domains_init(void)
        of_genpd_add_provider_onecell(np, genpd_data);
        return 0;
 }
+
+static struct platform_driver ux500_pm_domains_driver = {
+       .probe  = ux500_pm_domains_probe,
+       .driver = {
+               .name = "ux500_pm_domains",
+               .of_match_table = ux500_pm_domain_matches,
+       },
+};
+
+static int __init ux500_pm_domains_init(void)
+{
+       return platform_driver_register(&ux500_pm_domains_driver);
+}
+arch_initcall(ux500_pm_domains_init);
diff --git a/drivers/genpd/starfive/Makefile b/drivers/genpd/starfive/Makefile
new file mode 100644 (file)
index 0000000..975bba2
--- /dev/null
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_JH71XX_PMU)               += jh71xx-pmu.o
diff --git a/drivers/genpd/sunxi/Makefile b/drivers/genpd/sunxi/Makefile
new file mode 100644 (file)
index 0000000..ec1d7a2
--- /dev/null
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_SUN20I_PPU)               += sun20i-ppu.o
similarity index 99%
rename from drivers/soc/sunxi/sun20i-ppu.c
rename to drivers/genpd/sunxi/sun20i-ppu.c
index 98cb41d..8700f9d 100644 (file)
@@ -5,7 +5,7 @@
 #include <linux/io.h>
 #include <linux/iopoll.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_domain.h>
 #include <linux/reset.h>
diff --git a/drivers/genpd/tegra/Makefile b/drivers/genpd/tegra/Makefile
new file mode 100644 (file)
index 0000000..ec8acfd
--- /dev/null
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_SOC_TEGRA_POWERGATE_BPMP) += powergate-bpmp.o
diff --git a/drivers/genpd/ti/Makefile b/drivers/genpd/ti/Makefile
new file mode 100644 (file)
index 0000000..69580af
--- /dev/null
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_ARCH_OMAP2PLUS)           += omap_prm.o
+obj-$(CONFIG_TI_SCI_PM_DOMAINS)                += ti_sci_pm_domains.o
similarity index 97%
rename from drivers/soc/ti/ti_sci_pm_domains.c
rename to drivers/genpd/ti/ti_sci_pm_domains.c
index a33ec7e..3464510 100644 (file)
@@ -119,7 +119,7 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
        struct ti_sci_genpd_provider *pd_provider;
        struct ti_sci_pm_domain *pd;
-       struct device_node *np = NULL;
+       struct device_node *np;
        struct of_phandle_args args;
        int ret;
        u32 max_id = 0;
@@ -138,11 +138,7 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
        INIT_LIST_HEAD(&pd_provider->pd_list);
 
        /* Find highest device ID used for power domains */
-       while (1) {
-               np = of_find_node_with_property(np, "power-domains");
-               if (!np)
-                       break;
-
+       for_each_node_with_property(np, "power-domains") {
                index = 0;
 
                while (1) {
diff --git a/drivers/genpd/xilinx/Makefile b/drivers/genpd/xilinx/Makefile
new file mode 100644 (file)
index 0000000..a706ab6
--- /dev/null
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_ZYNQMP_PM_DOMAINS)                += zynqmp-pm-domains.o
index 3b0f9fb..708eaad 100644 (file)
@@ -3,7 +3,6 @@
 # Makefile for the Linux Kernel SOC specific device drivers.
 #
 
-obj-$(CONFIG_ARCH_ACTIONS)     += actions/
 obj-y                          += apple/
 obj-y                          += aspeed/
 obj-$(CONFIG_ARCH_AT91)                += atmel/
@@ -29,7 +28,6 @@ obj-y                         += renesas/
 obj-y                          += rockchip/
 obj-$(CONFIG_SOC_SAMSUNG)      += samsung/
 obj-y                          += sifive/
-obj-$(CONFIG_SOC_STARFIVE)     += starfive/
 obj-y                          += sunxi/
 obj-$(CONFIG_ARCH_TEGRA)       += tegra/
 obj-y                          += ti/
diff --git a/drivers/soc/actions/Makefile b/drivers/soc/actions/Makefile
deleted file mode 100644 (file)
index 4db9e7b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-
-obj-$(CONFIG_OWL_PM_DOMAINS_HELPER) += owl-sps-helper.o
-obj-$(CONFIG_OWL_PM_DOMAINS) += owl-sps.o
index 7b8c5d3..c25f835 100644 (file)
@@ -2,7 +2,4 @@
 obj-$(CONFIG_MESON_CANVAS) += meson-canvas.o
 obj-$(CONFIG_MESON_CLK_MEASURE) += meson-clk-measure.o
 obj-$(CONFIG_MESON_GX_SOCINFO) += meson-gx-socinfo.o
-obj-$(CONFIG_MESON_GX_PM_DOMAINS) += meson-gx-pwrc-vpu.o
 obj-$(CONFIG_MESON_MX_SOCINFO) += meson-mx-socinfo.o
-obj-$(CONFIG_MESON_EE_PM_DOMAINS) += meson-ee-pwrc.o
-obj-$(CONFIG_MESON_SECURE_PM_DOMAINS) += meson-secure-pwrc.o
index e293770..b241e6a 100644 (file)
@@ -1,6 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
-obj-$(CONFIG_APPLE_PMGR_PWRSTATE)      += apple-pmgr-pwrstate.o
-
 obj-$(CONFIG_APPLE_RTKIT) += apple-rtkit.o
 apple-rtkit-y = rtkit.o rtkit-crashlog.o
 
index 24f92a6..f969067 100644 (file)
@@ -42,7 +42,27 @@ config SOC_BRCMSTB
 
          If unsure, say N.
 
-source "drivers/soc/bcm/bcm63xx/Kconfig"
+config BCM_PMB
+       bool "Broadcom PMB (Power Management Bus) driver"
+       depends on ARCH_BCMBCA || (COMPILE_TEST && OF)
+       default ARCH_BCMBCA
+       select PM_GENERIC_DOMAINS if PM
+       help
+         This enables support for the Broadcom's PMB (Power Management Bus) that
+         is used for disabling and enabling SoC devices.
+
+if SOC_BCM63XX
+
+config BCM63XX_POWER
+       bool "BCM63xx power domain driver"
+       depends on BMIPS_GENERIC || (COMPILE_TEST && OF)
+       select PM_GENERIC_DOMAINS if PM
+       help
+         This enables support for the BCM63xx power domains controller on
+         BCM6318, BCM6328, BCM6362 and BCM63268 SoCs.
+
+endif # SOC_BCM63XX
+
 source "drivers/soc/bcm/brcmstb/Kconfig"
 
 endmenu
index 0f0efa2..32424b1 100644 (file)
@@ -1,5 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-obj-$(CONFIG_BCM2835_POWER)    += bcm2835-power.o
-obj-$(CONFIG_RASPBERRYPI_POWER)        += raspberrypi-power.o
-obj-y                          += bcm63xx/
 obj-$(CONFIG_SOC_BRCMSTB)      += brcmstb/
diff --git a/drivers/soc/bcm/bcm63xx/Kconfig b/drivers/soc/bcm/bcm63xx/Kconfig
deleted file mode 100644 (file)
index 355c344..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-if SOC_BCM63XX
-
-config BCM63XX_POWER
-       bool "BCM63xx power domain driver"
-       depends on BMIPS_GENERIC || (COMPILE_TEST && OF)
-       select PM_GENERIC_DOMAINS if PM
-       help
-         This enables support for the BCM63xx power domains controller on
-         BCM6318, BCM6328, BCM6362 and BCM63268 SoCs.
-
-endif # SOC_BCM63XX
-
-config BCM_PMB
-       bool "Broadcom PMB (Power Management Bus) driver"
-       depends on ARCH_BCMBCA || (COMPILE_TEST && OF)
-       default ARCH_BCMBCA
-       select PM_GENERIC_DOMAINS if PM
-       help
-         This enables support for the Broadcom's PMB (Power Management Bus) that
-         is used for disabling and enabling SoC devices.
diff --git a/drivers/soc/bcm/bcm63xx/Makefile b/drivers/soc/bcm/bcm63xx/Makefile
deleted file mode 100644 (file)
index 557eed3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-obj-$(CONFIG_BCM63XX_POWER) += bcm63xx-power.o
-obj-$(CONFIG_BCM_PMB)          += bcm-pmb.o
index a28c44a..3ad321c 100644 (file)
@@ -2,10 +2,5 @@
 ifeq ($(CONFIG_ARM),y)
 obj-$(CONFIG_ARCH_MXC) += soc-imx.o
 endif
-obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
-obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o
 obj-$(CONFIG_SOC_IMX8M) += soc-imx8m.o
-obj-$(CONFIG_IMX8M_BLK_CTRL) += imx8m-blk-ctrl.o
-obj-$(CONFIG_IMX8M_BLK_CTRL) += imx8mp-blk-ctrl.o
-obj-$(CONFIG_SOC_IMX9) += imx93-src.o imx93-pd.o
-obj-$(CONFIG_IMX9_BLK_CTRL) += imx93-blk-ctrl.o
+obj-$(CONFIG_SOC_IMX9) += imx93-src.o
index 8c0ddac..9d3ce78 100644 (file)
@@ -4,8 +4,6 @@ obj-$(CONFIG_MTK_DEVAPC) += mtk-devapc.o
 obj-$(CONFIG_MTK_INFRACFG) += mtk-infracfg.o
 obj-$(CONFIG_MTK_PMIC_WRAP) += mtk-pmic-wrap.o
 obj-$(CONFIG_MTK_REGULATOR_COUPLER) += mtk-regulator-coupler.o
-obj-$(CONFIG_MTK_SCPSYS) += mtk-scpsys.o
-obj-$(CONFIG_MTK_SCPSYS_PM_DOMAINS) += mtk-pm-domains.o
 obj-$(CONFIG_MTK_MMSYS) += mtk-mmsys.o
 obj-$(CONFIG_MTK_MMSYS) += mtk-mutex.o
 obj-$(CONFIG_MTK_SVS) += mtk-svs.o
index 99114c7..f548a71 100644 (file)
@@ -3,7 +3,6 @@ CFLAGS_rpmh-rsc.o := -I$(src)
 obj-$(CONFIG_QCOM_AOSS_QMP) += qcom_aoss.o
 obj-$(CONFIG_QCOM_GENI_SE) +=  qcom-geni-se.o
 obj-$(CONFIG_QCOM_COMMAND_DB) += cmd-db.o
-obj-$(CONFIG_QCOM_CPR)         += cpr.o
 obj-$(CONFIG_QCOM_GSBI)        +=      qcom_gsbi.o
 obj-$(CONFIG_QCOM_MDT_LOADER)  += mdt_loader.o
 obj-$(CONFIG_QCOM_OCMEM)       += ocmem.o
@@ -29,8 +28,6 @@ obj-$(CONFIG_QCOM_STATS)      += qcom_stats.o
 obj-$(CONFIG_QCOM_WCNSS_CTRL) += wcnss_ctrl.o
 obj-$(CONFIG_QCOM_APR) += apr.o
 obj-$(CONFIG_QCOM_LLCC) += llcc-qcom.o
-obj-$(CONFIG_QCOM_RPMHPD) += rpmhpd.o
-obj-$(CONFIG_QCOM_RPMPD) += rpmpd.o
 obj-$(CONFIG_QCOM_KRYO_L2_ACCESSORS) +=        kryo-l2-accessors.o
 obj-$(CONFIG_QCOM_ICC_BWMON)   += icc-bwmon.o
 qcom_ice-objs                  += ice.o
index 6e4e77b..734f8f8 100644 (file)
@@ -3,30 +3,6 @@
 obj-$(CONFIG_SOC_RENESAS)      += renesas-soc.o
 
 # SoC
-obj-$(CONFIG_SYSC_R8A7742)     += r8a7742-sysc.o
-obj-$(CONFIG_SYSC_R8A7743)     += r8a7743-sysc.o
-obj-$(CONFIG_SYSC_R8A7745)     += r8a7745-sysc.o
-obj-$(CONFIG_SYSC_R8A77470)    += r8a77470-sysc.o
-obj-$(CONFIG_SYSC_R8A774A1)    += r8a774a1-sysc.o
-obj-$(CONFIG_SYSC_R8A774B1)    += r8a774b1-sysc.o
-obj-$(CONFIG_SYSC_R8A774C0)    += r8a774c0-sysc.o
-obj-$(CONFIG_SYSC_R8A774E1)    += r8a774e1-sysc.o
-obj-$(CONFIG_SYSC_R8A7779)     += r8a7779-sysc.o
-obj-$(CONFIG_SYSC_R8A7790)     += r8a7790-sysc.o
-obj-$(CONFIG_SYSC_R8A7791)     += r8a7791-sysc.o
-obj-$(CONFIG_SYSC_R8A7792)     += r8a7792-sysc.o
-obj-$(CONFIG_SYSC_R8A7794)     += r8a7794-sysc.o
-obj-$(CONFIG_SYSC_R8A7795)     += r8a7795-sysc.o
-obj-$(CONFIG_SYSC_R8A77960)    += r8a7796-sysc.o
-obj-$(CONFIG_SYSC_R8A77961)    += r8a7796-sysc.o
-obj-$(CONFIG_SYSC_R8A77965)    += r8a77965-sysc.o
-obj-$(CONFIG_SYSC_R8A77970)    += r8a77970-sysc.o
-obj-$(CONFIG_SYSC_R8A77980)    += r8a77980-sysc.o
-obj-$(CONFIG_SYSC_R8A77990)    += r8a77990-sysc.o
-obj-$(CONFIG_SYSC_R8A77995)    += r8a77995-sysc.o
-obj-$(CONFIG_SYSC_R8A779A0)    += r8a779a0-sysc.o
-obj-$(CONFIG_SYSC_R8A779F0)    += r8a779f0-sysc.o
-obj-$(CONFIG_SYSC_R8A779G0)    += r8a779g0-sysc.o
 ifdef CONFIG_SMP
 obj-$(CONFIG_ARCH_R9A06G032)   += r9a06g032-smp.o
 endif
@@ -34,6 +10,3 @@ endif
 # Family
 obj-$(CONFIG_PWC_RZV2M)                += pwc-rzv2m.o
 obj-$(CONFIG_RST_RCAR)         += rcar-rst.o
-obj-$(CONFIG_SYSC_RCAR)                += rcar-sysc.o
-obj-$(CONFIG_SYSC_RCAR_GEN4)   += rcar-gen4-sysc.o
-obj-$(CONFIG_SYSC_RMOBILE)     += rmobile-sysc.o
index 05f31a4..23d4144 100644 (file)
@@ -4,5 +4,4 @@
 #
 obj-$(CONFIG_ROCKCHIP_GRF) += grf.o
 obj-$(CONFIG_ROCKCHIP_IODOMAIN) += io-domain.o
-obj-$(CONFIG_ROCKCHIP_PM_DOMAINS) += pm_domains.o
 obj-$(CONFIG_ROCKCHIP_DTPM) += dtpm.o
index d35270f..248a33d 100644 (file)
@@ -10,7 +10,6 @@ obj-$(CONFIG_EXYNOS_PMU)      += exynos-pmu.o
 
 obj-$(CONFIG_EXYNOS_PMU_ARM_DRIVERS)   += exynos3250-pmu.o exynos4-pmu.o \
                                        exynos5250-pmu.o exynos5420-pmu.o
-obj-$(CONFIG_EXYNOS_PM_DOMAINS) += pm_domains.o
 obj-$(CONFIG_EXYNOS_REGULATOR_COUPLER) += exynos-regulator-coupler.o
 
 obj-$(CONFIG_SAMSUNG_PM_CHECK) += s3c-pm-check.o
diff --git a/drivers/soc/starfive/Makefile b/drivers/soc/starfive/Makefile
deleted file mode 100644 (file)
index 13b589d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-
-obj-$(CONFIG_JH71XX_PMU)       += jh71xx_pmu.o
index 90ff2eb..5491595 100644 (file)
@@ -1,4 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-$(CONFIG_SUNXI_MBUS) +=    sunxi_mbus.o
 obj-$(CONFIG_SUNXI_SRAM) +=    sunxi_sram.o
-obj-$(CONFIG_SUN20I_PPU) +=    sun20i-ppu.o
index d722f51..0105961 100644 (file)
@@ -5,7 +5,6 @@ obj-y += cbb/
 obj-y += common.o
 obj-$(CONFIG_SOC_TEGRA_FLOWCTRL) += flowctrl.o
 obj-$(CONFIG_SOC_TEGRA_PMC) += pmc.o
-obj-$(CONFIG_SOC_TEGRA_POWERGATE_BPMP) += powergate-bpmp.o
 obj-$(CONFIG_SOC_TEGRA20_VOLTAGE_COUPLER) += regulators-tegra20.o
 obj-$(CONFIG_SOC_TEGRA30_VOLTAGE_COUPLER) += regulators-tegra30.o
 obj-$(CONFIG_ARCH_TEGRA_186_SOC) += ari-tegra186.o
index cc3c972..cb800a7 100644 (file)
@@ -6,9 +6,7 @@ obj-$(CONFIG_KEYSTONE_NAVIGATOR_QMSS)   += knav_qmss.o
 knav_qmss-y := knav_qmss_queue.o knav_qmss_acc.o
 obj-$(CONFIG_KEYSTONE_NAVIGATOR_DMA)   += knav_dma.o
 obj-$(CONFIG_AMX3_PM)                  += pm33xx.o
-obj-$(CONFIG_ARCH_OMAP2PLUS)           += omap_prm.o
 obj-$(CONFIG_WKUP_M3_IPC)              += wkup_m3_ipc.o
-obj-$(CONFIG_TI_SCI_PM_DOMAINS)                += ti_sci_pm_domains.o
 obj-$(CONFIG_TI_SCI_INTA_MSI_DOMAIN)   += ti_sci_inta_msi.o
 obj-$(CONFIG_TI_K3_RINGACC)            += k3-ringacc.o
 obj-$(CONFIG_TI_K3_SOCINFO)            += k3-socinfo.o
index 41e585b..33d9439 100644 (file)
@@ -1,4 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_ZYNQMP_POWER)     += zynqmp_power.o
-obj-$(CONFIG_ZYNQMP_PM_DOMAINS) += zynqmp_pm_domains.o
 obj-$(CONFIG_XLNX_EVENT_MANAGER)       += xlnx_event_manager.o