2023-07-07 14:28:33

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH 00/18] genpd: Create a genpd directory to host genpd providers

There are currently ~60 users of the genpd provider interface, which
implementations are sprinkled across various subsystems. To help out with
maintenance and to gain a bit better control, let's create a new subsystem
(drivers/genpd) and move some of the providers from the soc directories in here.

Clearly some providers aren't really feasible to move - and that's perfectly
fine too. We don't need to keep all genpd providers together to improve the
situation, but keeping most of them would be nice, I think. At this point I
have walked through driver/soc and /arch/ - deferring others to later.

Note that, the intention is also to host a git tree (it's not been created yet,
but should be quick if this seems reasonable to everybody), to collect and to
get the patches tested/integrated through the linux-next tree. Ideally this
should release some of the burden on the soc maintainers (Arnd/Olof/etc).

Note that, going forward - it's probably best to funnel this through the soc
tree (I can send a pull request if agreed) the I can take over in the next
release cycle at v6.6-rc1 and onwards. In that case, I will of course require
acks/reviews from the current platform/soc maintainers, hence the MAINTAINERS
are also being updated as a part of $subject series.

Does this make sense?

Kind regards
Ulf Hansson


Ulf Hansson (18):
genpd: Create a new subsystem directory to host genpd providers
soc: actions: Move power-domain driver to the genpd dir
soc: amlogic: Move power-domain drivers to the genpd dir
soc: apple: Move power-domain driver to the genpd dir
soc: bcm: Move power-domain drivers to the genpd dir
soc: imx: Move power-domain drivers to the genpd dir
soc: mediatek: Move power-domain drivers to the genpd dir
soc: qcom: Move power-domain drivers to the genpd dir
soc: renesas: Move power-domain drivers to the genpd dir
soc: rockchip: Mover power-domain driver to the genpd dir
soc: samsung: Move power-domain driver to the genpd dir
soc: starfive: Move the power-domain driver to the genpd dir
soc: sunxi: Move power-domain driver to the genpd dir
soc: tegra: Move powergate-bpmp driver to the genpd dir
soc: ti: Mover power-domain drivers to the genpd dir
soc: xilinx: Move power-domain driver to the genpd dir
ARM: ux500: Convert power-domain code into a regular platform driver
ARM: ux500: Move power-domain driver to the genpd dir

MAINTAINERS | 22 ++++++++++----
arch/arm/mach-ux500/Makefile | 1 -
arch/arm/mach-ux500/cpu-db8500.c | 5 ----
arch/arm/mach-ux500/pm_domains.h | 17 -----------
drivers/Makefile | 1 +
drivers/genpd/Makefile | 16 ++++++++++
drivers/genpd/actions/Makefile | 2 ++
drivers/{soc => genpd}/actions/owl-sps.c | 0
drivers/genpd/amlogic/Makefile | 4 +++
.../{soc => genpd}/amlogic/meson-ee-pwrc.c | 0
.../amlogic/meson-gx-pwrc-vpu.c | 0
.../amlogic/meson-secure-pwrc.c | 0
drivers/genpd/apple/Makefile | 2 ++
.../apple/pmgr-pwrstate.c} | 0
drivers/genpd/bcm/Makefile | 5 ++++
.../{soc/bcm/bcm63xx => genpd/bcm}/bcm-pmb.c | 0
drivers/{soc => genpd}/bcm/bcm2835-power.c | 0
.../bcm/bcm63xx => genpd/bcm}/bcm63xx-power.c | 0
.../{soc => genpd}/bcm/raspberrypi-power.c | 0
drivers/genpd/imx/Makefile | 7 +++++
drivers/{soc => genpd}/imx/gpc.c | 0
drivers/{soc => genpd}/imx/gpcv2.c | 0
drivers/{soc => genpd}/imx/imx8m-blk-ctrl.c | 0
drivers/{soc => genpd}/imx/imx8mp-blk-ctrl.c | 0
drivers/{soc => genpd}/imx/imx93-blk-ctrl.c | 0
drivers/{soc => genpd}/imx/imx93-pd.c | 0
drivers/genpd/mediatek/Makefile | 3 ++
.../mediatek/mt6795-pm-domains.h | 0
.../mediatek/mt8167-pm-domains.h | 0
.../mediatek/mt8173-pm-domains.h | 0
.../mediatek/mt8183-pm-domains.h | 0
.../mediatek/mt8186-pm-domains.h | 0
.../mediatek/mt8188-pm-domains.h | 0
.../mediatek/mt8192-pm-domains.h | 0
.../mediatek/mt8195-pm-domains.h | 0
.../{soc => genpd}/mediatek/mtk-pm-domains.c | 0
.../{soc => genpd}/mediatek/mtk-pm-domains.h | 0
drivers/{soc => genpd}/mediatek/mtk-scpsys.c | 0
drivers/genpd/qcom/Makefile | 4 +++
drivers/{soc => genpd}/qcom/cpr.c | 0
drivers/{soc => genpd}/qcom/rpmhpd.c | 0
drivers/{soc => genpd}/qcom/rpmpd.c | 0
drivers/genpd/renesas/Makefile | 30 +++++++++++++++++++
drivers/{soc => genpd}/renesas/r8a7742-sysc.c | 0
drivers/{soc => genpd}/renesas/r8a7743-sysc.c | 0
drivers/{soc => genpd}/renesas/r8a7745-sysc.c | 0
.../{soc => genpd}/renesas/r8a77470-sysc.c | 0
.../{soc => genpd}/renesas/r8a774a1-sysc.c | 0
.../{soc => genpd}/renesas/r8a774b1-sysc.c | 0
.../{soc => genpd}/renesas/r8a774c0-sysc.c | 0
.../{soc => genpd}/renesas/r8a774e1-sysc.c | 0
drivers/{soc => genpd}/renesas/r8a7779-sysc.c | 0
drivers/{soc => genpd}/renesas/r8a7790-sysc.c | 0
drivers/{soc => genpd}/renesas/r8a7791-sysc.c | 0
drivers/{soc => genpd}/renesas/r8a7792-sysc.c | 0
drivers/{soc => genpd}/renesas/r8a7794-sysc.c | 0
drivers/{soc => genpd}/renesas/r8a7795-sysc.c | 0
drivers/{soc => genpd}/renesas/r8a7796-sysc.c | 0
.../{soc => genpd}/renesas/r8a77965-sysc.c | 0
.../{soc => genpd}/renesas/r8a77970-sysc.c | 0
.../{soc => genpd}/renesas/r8a77980-sysc.c | 0
.../{soc => genpd}/renesas/r8a77990-sysc.c | 0
.../{soc => genpd}/renesas/r8a77995-sysc.c | 0
.../{soc => genpd}/renesas/r8a779a0-sysc.c | 0
.../{soc => genpd}/renesas/r8a779f0-sysc.c | 0
.../{soc => genpd}/renesas/r8a779g0-sysc.c | 0
.../{soc => genpd}/renesas/rcar-gen4-sysc.c | 0
.../{soc => genpd}/renesas/rcar-gen4-sysc.h | 0
drivers/{soc => genpd}/renesas/rcar-sysc.c | 0
drivers/{soc => genpd}/renesas/rcar-sysc.h | 0
drivers/{soc => genpd}/renesas/rmobile-sysc.c | 0
drivers/genpd/rockchip/Makefile | 2 ++
.../rockchip/pm-domains.c} | 0
drivers/genpd/samsung/Makefile | 2 ++
.../samsung/exynos-pm-domains.c} | 0
drivers/genpd/st/Makefile | 2 ++
.../genpd/st/ste-ux500-pm-domain.c | 25 ++++++++++++----
drivers/genpd/starfive/Makefile | 2 ++
.../starfive/jh71xx-pmu.c} | 0
drivers/genpd/sunxi/Makefile | 2 ++
drivers/{soc => genpd}/sunxi/sun20i-ppu.c | 0
drivers/genpd/tegra/Makefile | 2 ++
drivers/{soc => genpd}/tegra/powergate-bpmp.c | 0
drivers/genpd/ti/Makefile | 3 ++
drivers/{soc => genpd}/ti/omap_prm.c | 0
drivers/{soc => genpd}/ti/ti_sci_pm_domains.c | 0
drivers/genpd/xilinx/Makefile | 2 ++
.../xilinx/zynqmp-pm-domains.c} | 0
drivers/soc/Makefile | 1 -
drivers/soc/actions/Makefile | 1 -
drivers/soc/amlogic/Makefile | 3 --
drivers/soc/apple/Makefile | 2 --
drivers/soc/bcm/Kconfig | 22 +++++++++++++-
drivers/soc/bcm/Makefile | 3 --
drivers/soc/bcm/bcm63xx/Kconfig | 21 -------------
drivers/soc/bcm/bcm63xx/Makefile | 3 --
drivers/soc/imx/Makefile | 7 +----
drivers/soc/mediatek/Makefile | 2 --
drivers/soc/qcom/Makefile | 3 --
drivers/soc/renesas/Makefile | 27 -----------------
drivers/soc/rockchip/Makefile | 1 -
drivers/soc/samsung/Makefile | 1 -
drivers/soc/starfive/Makefile | 3 --
drivers/soc/sunxi/Makefile | 1 -
drivers/soc/tegra/Makefile | 1 -
drivers/soc/ti/Makefile | 2 --
drivers/soc/xilinx/Makefile | 1 -
107 files changed, 150 insertions(+), 116 deletions(-)
delete mode 100644 arch/arm/mach-ux500/pm_domains.h
create mode 100644 drivers/genpd/Makefile
create mode 100644 drivers/genpd/actions/Makefile
rename drivers/{soc => genpd}/actions/owl-sps.c (100%)
create mode 100644 drivers/genpd/amlogic/Makefile
rename drivers/{soc => genpd}/amlogic/meson-ee-pwrc.c (100%)
rename drivers/{soc => genpd}/amlogic/meson-gx-pwrc-vpu.c (100%)
rename drivers/{soc => genpd}/amlogic/meson-secure-pwrc.c (100%)
create mode 100644 drivers/genpd/apple/Makefile
rename drivers/{soc/apple/apple-pmgr-pwrstate.c => genpd/apple/pmgr-pwrstate.c} (100%)
create mode 100644 drivers/genpd/bcm/Makefile
rename drivers/{soc/bcm/bcm63xx => genpd/bcm}/bcm-pmb.c (100%)
rename drivers/{soc => genpd}/bcm/bcm2835-power.c (100%)
rename drivers/{soc/bcm/bcm63xx => genpd/bcm}/bcm63xx-power.c (100%)
rename drivers/{soc => genpd}/bcm/raspberrypi-power.c (100%)
create mode 100644 drivers/genpd/imx/Makefile
rename drivers/{soc => genpd}/imx/gpc.c (100%)
rename drivers/{soc => genpd}/imx/gpcv2.c (100%)
rename drivers/{soc => genpd}/imx/imx8m-blk-ctrl.c (100%)
rename drivers/{soc => genpd}/imx/imx8mp-blk-ctrl.c (100%)
rename drivers/{soc => genpd}/imx/imx93-blk-ctrl.c (100%)
rename drivers/{soc => genpd}/imx/imx93-pd.c (100%)
create mode 100644 drivers/genpd/mediatek/Makefile
rename drivers/{soc => genpd}/mediatek/mt6795-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mt8167-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mt8173-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mt8183-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mt8186-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mt8188-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mt8192-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mt8195-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mtk-pm-domains.c (100%)
rename drivers/{soc => genpd}/mediatek/mtk-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mtk-scpsys.c (100%)
create mode 100644 drivers/genpd/qcom/Makefile
rename drivers/{soc => genpd}/qcom/cpr.c (100%)
rename drivers/{soc => genpd}/qcom/rpmhpd.c (100%)
rename drivers/{soc => genpd}/qcom/rpmpd.c (100%)
create mode 100644 drivers/genpd/renesas/Makefile
rename drivers/{soc => genpd}/renesas/r8a7742-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a7743-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a7745-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a77470-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a774a1-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a774b1-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a774c0-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a774e1-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a7779-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a7790-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a7791-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a7792-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a7794-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a7795-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a7796-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a77965-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a77970-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a77980-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a77990-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a77995-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a779a0-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a779f0-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/r8a779g0-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/rcar-gen4-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/rcar-gen4-sysc.h (100%)
rename drivers/{soc => genpd}/renesas/rcar-sysc.c (100%)
rename drivers/{soc => genpd}/renesas/rcar-sysc.h (100%)
rename drivers/{soc => genpd}/renesas/rmobile-sysc.c (100%)
create mode 100644 drivers/genpd/rockchip/Makefile
rename drivers/{soc/rockchip/pm_domains.c => genpd/rockchip/pm-domains.c} (100%)
create mode 100644 drivers/genpd/samsung/Makefile
rename drivers/{soc/samsung/pm_domains.c => genpd/samsung/exynos-pm-domains.c} (100%)
create mode 100644 drivers/genpd/st/Makefile
rename arch/arm/mach-ux500/pm_domains.c => drivers/genpd/st/ste-ux500-pm-domain.c (75%)
create mode 100644 drivers/genpd/starfive/Makefile
rename drivers/{soc/starfive/jh71xx_pmu.c => genpd/starfive/jh71xx-pmu.c} (100%)
create mode 100644 drivers/genpd/sunxi/Makefile
rename drivers/{soc => genpd}/sunxi/sun20i-ppu.c (100%)
create mode 100644 drivers/genpd/tegra/Makefile
rename drivers/{soc => genpd}/tegra/powergate-bpmp.c (100%)
create mode 100644 drivers/genpd/ti/Makefile
rename drivers/{soc => genpd}/ti/omap_prm.c (100%)
rename drivers/{soc => genpd}/ti/ti_sci_pm_domains.c (100%)
create mode 100644 drivers/genpd/xilinx/Makefile
rename drivers/{soc/xilinx/zynqmp_pm_domains.c => genpd/xilinx/zynqmp-pm-domains.c} (100%)
delete mode 100644 drivers/soc/bcm/bcm63xx/Kconfig
delete mode 100644 drivers/soc/bcm/bcm63xx/Makefile
delete mode 100644 drivers/soc/starfive/Makefile

--
2.34.1



2023-07-07 14:40:23

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH 10/18] soc: rockchip: Mover power-domain driver to the genpd dir

Cc: Heiko Stuebner <[email protected]>
Cc: <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/genpd/Makefile | 1 +
drivers/genpd/rockchip/Makefile | 2 ++
.../{soc/rockchip/pm_domains.c => genpd/rockchip/pm-domains.c} | 0
drivers/soc/rockchip/Makefile | 1 -
4 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 drivers/genpd/rockchip/Makefile
rename drivers/{soc/rockchip/pm_domains.c => genpd/rockchip/pm-domains.c} (100%)

diff --git a/drivers/genpd/Makefile b/drivers/genpd/Makefile
index 286598ce7620..c178421e0cbc 100644
--- a/drivers/genpd/Makefile
+++ b/drivers/genpd/Makefile
@@ -6,3 +6,4 @@ obj-y += bcm/
obj-y += mediatek/
obj-y += qcom/
obj-y += renesas/
+obj-y += rockchip/
diff --git a/drivers/genpd/rockchip/Makefile b/drivers/genpd/rockchip/Makefile
new file mode 100644
index 000000000000..8fb9d88a3492
--- /dev/null
+++ b/drivers/genpd/rockchip/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_ROCKCHIP_PM_DOMAINS) += pm-domains.o
diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/genpd/rockchip/pm-domains.c
similarity index 100%
rename from drivers/soc/rockchip/pm_domains.c
rename to drivers/genpd/rockchip/pm-domains.c
diff --git a/drivers/soc/rockchip/Makefile b/drivers/soc/rockchip/Makefile
index 05f31a4e743c..23d414433c8c 100644
--- a/drivers/soc/rockchip/Makefile
+++ b/drivers/soc/rockchip/Makefile
@@ -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
--
2.34.1


2023-07-07 14:43:18

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH 17/18] ARM: ux500: Convert power-domain code into a regular platform driver

To make the code more standalone and moveable, let's convert it into a
platform driver.

Cc: Linus Walleij <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
arch/arm/mach-ux500/cpu-db8500.c | 5 -----
arch/arm/mach-ux500/pm_domains.c | 25 ++++++++++++++++++++-----
arch/arm/mach-ux500/pm_domains.h | 17 -----------------
3 files changed, 20 insertions(+), 27 deletions(-)
delete mode 100644 arch/arm/mach-ux500/pm_domains.h

diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 7cc0dd8ed991..b1a70f203372 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -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.c b/arch/arm/mach-ux500/pm_domains.c
index 427b9ac4af6c..3d4f111ed156 100644
--- a/arch/arm/mach-ux500/pm_domains.c
+++ b/arch/arm/mach-ux500/pm_domains.c
@@ -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/arch/arm/mach-ux500/pm_domains.h b/arch/arm/mach-ux500/pm_domains.h
deleted file mode 100644
index 33c55f2c6b3c..000000000000
--- a/arch/arm/mach-ux500/pm_domains.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (C) 2014 Linaro Ltd.
- *
- * Author: Ulf Hansson <[email protected]>
- */
-
-#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
--
2.34.1


2023-07-07 14:44:44

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH 07/18] soc: mediatek: Move power-domain drivers to the genpd dir

Cc: Matthias Brugger <[email protected]>
Cc: AngeloGioacchino Del Regno <[email protected]>
Cc: <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/genpd/Makefile | 1 +
drivers/genpd/mediatek/Makefile | 3 +++
drivers/{soc => genpd}/mediatek/mt6795-pm-domains.h | 0
drivers/{soc => genpd}/mediatek/mt8167-pm-domains.h | 0
drivers/{soc => genpd}/mediatek/mt8173-pm-domains.h | 0
drivers/{soc => genpd}/mediatek/mt8183-pm-domains.h | 0
drivers/{soc => genpd}/mediatek/mt8186-pm-domains.h | 0
drivers/{soc => genpd}/mediatek/mt8188-pm-domains.h | 0
drivers/{soc => genpd}/mediatek/mt8192-pm-domains.h | 0
drivers/{soc => genpd}/mediatek/mt8195-pm-domains.h | 0
drivers/{soc => genpd}/mediatek/mtk-pm-domains.c | 0
drivers/{soc => genpd}/mediatek/mtk-pm-domains.h | 0
drivers/{soc => genpd}/mediatek/mtk-scpsys.c | 0
drivers/soc/mediatek/Makefile | 2 --
14 files changed, 4 insertions(+), 2 deletions(-)
create mode 100644 drivers/genpd/mediatek/Makefile
rename drivers/{soc => genpd}/mediatek/mt6795-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mt8167-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mt8173-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mt8183-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mt8186-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mt8188-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mt8192-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mt8195-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mtk-pm-domains.c (100%)
rename drivers/{soc => genpd}/mediatek/mtk-pm-domains.h (100%)
rename drivers/{soc => genpd}/mediatek/mtk-scpsys.c (100%)

diff --git a/drivers/genpd/Makefile b/drivers/genpd/Makefile
index 6b9e9fe907f3..1a0a56925756 100644
--- a/drivers/genpd/Makefile
+++ b/drivers/genpd/Makefile
@@ -3,3 +3,4 @@ obj-y += actions/
obj-y += amlogic/
obj-y += apple/
obj-y += bcm/
+obj-y += mediatek/
diff --git a/drivers/genpd/mediatek/Makefile b/drivers/genpd/mediatek/Makefile
new file mode 100644
index 000000000000..8cde09e654b3
--- /dev/null
+++ b/drivers/genpd/mediatek/Makefile
@@ -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
diff --git a/drivers/soc/mediatek/mt6795-pm-domains.h b/drivers/genpd/mediatek/mt6795-pm-domains.h
similarity index 100%
rename from drivers/soc/mediatek/mt6795-pm-domains.h
rename to drivers/genpd/mediatek/mt6795-pm-domains.h
diff --git a/drivers/soc/mediatek/mt8167-pm-domains.h b/drivers/genpd/mediatek/mt8167-pm-domains.h
similarity index 100%
rename from drivers/soc/mediatek/mt8167-pm-domains.h
rename to drivers/genpd/mediatek/mt8167-pm-domains.h
diff --git a/drivers/soc/mediatek/mt8173-pm-domains.h b/drivers/genpd/mediatek/mt8173-pm-domains.h
similarity index 100%
rename from drivers/soc/mediatek/mt8173-pm-domains.h
rename to drivers/genpd/mediatek/mt8173-pm-domains.h
diff --git a/drivers/soc/mediatek/mt8183-pm-domains.h b/drivers/genpd/mediatek/mt8183-pm-domains.h
similarity index 100%
rename from drivers/soc/mediatek/mt8183-pm-domains.h
rename to drivers/genpd/mediatek/mt8183-pm-domains.h
diff --git a/drivers/soc/mediatek/mt8186-pm-domains.h b/drivers/genpd/mediatek/mt8186-pm-domains.h
similarity index 100%
rename from drivers/soc/mediatek/mt8186-pm-domains.h
rename to drivers/genpd/mediatek/mt8186-pm-domains.h
diff --git a/drivers/soc/mediatek/mt8188-pm-domains.h b/drivers/genpd/mediatek/mt8188-pm-domains.h
similarity index 100%
rename from drivers/soc/mediatek/mt8188-pm-domains.h
rename to drivers/genpd/mediatek/mt8188-pm-domains.h
diff --git a/drivers/soc/mediatek/mt8192-pm-domains.h b/drivers/genpd/mediatek/mt8192-pm-domains.h
similarity index 100%
rename from drivers/soc/mediatek/mt8192-pm-domains.h
rename to drivers/genpd/mediatek/mt8192-pm-domains.h
diff --git a/drivers/soc/mediatek/mt8195-pm-domains.h b/drivers/genpd/mediatek/mt8195-pm-domains.h
similarity index 100%
rename from drivers/soc/mediatek/mt8195-pm-domains.h
rename to drivers/genpd/mediatek/mt8195-pm-domains.h
diff --git a/drivers/soc/mediatek/mtk-pm-domains.c b/drivers/genpd/mediatek/mtk-pm-domains.c
similarity index 100%
rename from drivers/soc/mediatek/mtk-pm-domains.c
rename to drivers/genpd/mediatek/mtk-pm-domains.c
diff --git a/drivers/soc/mediatek/mtk-pm-domains.h b/drivers/genpd/mediatek/mtk-pm-domains.h
similarity index 100%
rename from drivers/soc/mediatek/mtk-pm-domains.h
rename to drivers/genpd/mediatek/mtk-pm-domains.h
diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/genpd/mediatek/mtk-scpsys.c
similarity index 100%
rename from drivers/soc/mediatek/mtk-scpsys.c
rename to drivers/genpd/mediatek/mtk-scpsys.c
diff --git a/drivers/soc/mediatek/Makefile b/drivers/soc/mediatek/Makefile
index 8c0ddacbcde8..9d3ce7878c5c 100644
--- a/drivers/soc/mediatek/Makefile
+++ b/drivers/soc/mediatek/Makefile
@@ -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
--
2.34.1


2023-07-07 14:46:56

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH 05/18] soc: bcm: Move power-domain drivers to the genpd dir

While moving the drivers, we end up with a directory for bcm63xx that only
contains a Kconfig file, which seems a bit silly. Let's therefore also move
the Kconfig options into the Kconfig file a directory above, as it allows
us to drop the directory too.

Cc: Florian Fainelli <[email protected]>
Cc: Ray Jui <[email protected]>
Cc: Scott Branden <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
MAINTAINERS | 4 ++--
drivers/genpd/Makefile | 1 +
drivers/genpd/bcm/Makefile | 5 +++++
.../{soc/bcm/bcm63xx => genpd/bcm}/bcm-pmb.c | 0
drivers/{soc => genpd}/bcm/bcm2835-power.c | 0
.../bcm/bcm63xx => genpd/bcm}/bcm63xx-power.c | 0
.../{soc => genpd}/bcm/raspberrypi-power.c | 0
drivers/soc/bcm/Kconfig | 22 ++++++++++++++++++-
drivers/soc/bcm/Makefile | 3 ---
drivers/soc/bcm/bcm63xx/Kconfig | 21 ------------------
drivers/soc/bcm/bcm63xx/Makefile | 3 ---
11 files changed, 29 insertions(+), 30 deletions(-)
create mode 100644 drivers/genpd/bcm/Makefile
rename drivers/{soc/bcm/bcm63xx => genpd/bcm}/bcm-pmb.c (100%)
rename drivers/{soc => genpd}/bcm/bcm2835-power.c (100%)
rename drivers/{soc/bcm/bcm63xx => genpd/bcm}/bcm63xx-power.c (100%)
rename drivers/{soc => genpd}/bcm/raspberrypi-power.c (100%)
delete mode 100644 drivers/soc/bcm/bcm63xx/Kconfig
delete mode 100644 drivers/soc/bcm/bcm63xx/Makefile

diff --git a/MAINTAINERS b/MAINTAINERS
index 98a6847c8c3b..9fad7f6033f4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4007,7 +4007,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

@@ -4222,7 +4222,7 @@ R: Broadcom internal kernel review list <[email protected]>
L: [email protected]
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)
diff --git a/drivers/genpd/Makefile b/drivers/genpd/Makefile
index 91d4a3808981..6b9e9fe907f3 100644
--- a/drivers/genpd/Makefile
+++ b/drivers/genpd/Makefile
@@ -2,3 +2,4 @@
obj-y += actions/
obj-y += amlogic/
obj-y += apple/
+obj-y += bcm/
diff --git a/drivers/genpd/bcm/Makefile b/drivers/genpd/bcm/Makefile
new file mode 100644
index 000000000000..6bfbe4e4db13
--- /dev/null
+++ b/drivers/genpd/bcm/Makefile
@@ -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/soc/bcm/bcm63xx/bcm-pmb.c b/drivers/genpd/bcm/bcm-pmb.c
similarity index 100%
rename from drivers/soc/bcm/bcm63xx/bcm-pmb.c
rename to drivers/genpd/bcm/bcm-pmb.c
diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/genpd/bcm/bcm2835-power.c
similarity index 100%
rename from drivers/soc/bcm/bcm2835-power.c
rename to drivers/genpd/bcm/bcm2835-power.c
diff --git a/drivers/soc/bcm/bcm63xx/bcm63xx-power.c b/drivers/genpd/bcm/bcm63xx-power.c
similarity index 100%
rename from drivers/soc/bcm/bcm63xx/bcm63xx-power.c
rename to drivers/genpd/bcm/bcm63xx-power.c
diff --git a/drivers/soc/bcm/raspberrypi-power.c b/drivers/genpd/bcm/raspberrypi-power.c
similarity index 100%
rename from drivers/soc/bcm/raspberrypi-power.c
rename to drivers/genpd/bcm/raspberrypi-power.c
diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig
index 24f92a6e882a..f96906795fa6 100644
--- a/drivers/soc/bcm/Kconfig
+++ b/drivers/soc/bcm/Kconfig
@@ -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
diff --git a/drivers/soc/bcm/Makefile b/drivers/soc/bcm/Makefile
index 0f0efa28d92b..32424b1032c7 100644
--- a/drivers/soc/bcm/Makefile
+++ b/drivers/soc/bcm/Makefile
@@ -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
index 355c34482076..000000000000
--- a/drivers/soc/bcm/bcm63xx/Kconfig
+++ /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
index 557eed3d67bd..000000000000
--- a/drivers/soc/bcm/bcm63xx/Makefile
+++ /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
--
2.34.1


2023-07-07 14:50:37

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH 06/18] soc: imx: Move power-domain drivers to the genpd dir

Cc: Shawn Guo <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/genpd/imx/Makefile | 7 +++++++
drivers/{soc => genpd}/imx/gpc.c | 0
drivers/{soc => genpd}/imx/gpcv2.c | 0
drivers/{soc => genpd}/imx/imx8m-blk-ctrl.c | 0
drivers/{soc => genpd}/imx/imx8mp-blk-ctrl.c | 0
drivers/{soc => genpd}/imx/imx93-blk-ctrl.c | 0
drivers/{soc => genpd}/imx/imx93-pd.c | 0
drivers/soc/imx/Makefile | 7 +------
8 files changed, 8 insertions(+), 6 deletions(-)
create mode 100644 drivers/genpd/imx/Makefile
rename drivers/{soc => genpd}/imx/gpc.c (100%)
rename drivers/{soc => genpd}/imx/gpcv2.c (100%)
rename drivers/{soc => genpd}/imx/imx8m-blk-ctrl.c (100%)
rename drivers/{soc => genpd}/imx/imx8mp-blk-ctrl.c (100%)
rename drivers/{soc => genpd}/imx/imx93-blk-ctrl.c (100%)
rename drivers/{soc => genpd}/imx/imx93-pd.c (100%)

diff --git a/drivers/genpd/imx/Makefile b/drivers/genpd/imx/Makefile
new file mode 100644
index 000000000000..5f012717a666
--- /dev/null
+++ b/drivers/genpd/imx/Makefile
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
+obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.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
diff --git a/drivers/soc/imx/gpc.c b/drivers/genpd/imx/gpc.c
similarity index 100%
rename from drivers/soc/imx/gpc.c
rename to drivers/genpd/imx/gpc.c
diff --git a/drivers/soc/imx/gpcv2.c b/drivers/genpd/imx/gpcv2.c
similarity index 100%
rename from drivers/soc/imx/gpcv2.c
rename to drivers/genpd/imx/gpcv2.c
diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/genpd/imx/imx8m-blk-ctrl.c
similarity index 100%
rename from drivers/soc/imx/imx8m-blk-ctrl.c
rename to drivers/genpd/imx/imx8m-blk-ctrl.c
diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/genpd/imx/imx8mp-blk-ctrl.c
similarity index 100%
rename from drivers/soc/imx/imx8mp-blk-ctrl.c
rename to drivers/genpd/imx/imx8mp-blk-ctrl.c
diff --git a/drivers/soc/imx/imx93-blk-ctrl.c b/drivers/genpd/imx/imx93-blk-ctrl.c
similarity index 100%
rename from drivers/soc/imx/imx93-blk-ctrl.c
rename to drivers/genpd/imx/imx93-blk-ctrl.c
diff --git a/drivers/soc/imx/imx93-pd.c b/drivers/genpd/imx/imx93-pd.c
similarity index 100%
rename from drivers/soc/imx/imx93-pd.c
rename to drivers/genpd/imx/imx93-pd.c
diff --git a/drivers/soc/imx/Makefile b/drivers/soc/imx/Makefile
index a28c44a1f16a..3ad321ca608a 100644
--- a/drivers/soc/imx/Makefile
+++ b/drivers/soc/imx/Makefile
@@ -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
--
2.34.1


2023-07-07 14:52:28

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 06/18] soc: imx: Move power-domain drivers to the genpd dir

On Fri, 7 Jul 2023 at 16:25, Fabio Estevam <[email protected]> wrote:
>
> On Fri, Jul 7, 2023 at 11:04 AM Ulf Hansson <[email protected]> wrote:
> >
> > Cc: Shawn Guo <[email protected]>
> > Cc: Sascha Hauer <[email protected]>
> > Cc: Fabio Estevam <[email protected]>
> > Cc: <[email protected]>
> > Cc: <[email protected]>
> > Signed-off-by: Ulf Hansson <[email protected]>
>
> A commit log explaining the motivation would be helpful here.

Right. I was a bit lazy and added motivation only as part of the
commit message in patch 1/18 (and in the cover letter).

I deliberately didn't want to spam everyone with this, but you find it
at the generic linux-kernel list.

>
> With that added:
>
> Reviewed-by: Fabio Estevam <[email protected]>
>
> Thanks

Thanks!

Kind regards
Uffe

2023-07-07 15:07:21

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH 15/18] soc: ti: Mover power-domain drivers to the genpd dir

Cc: Nishanth Menon <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Cc: Tero Kristo <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
MAINTAINERS | 3 ++-
drivers/genpd/Makefile | 1 +
drivers/genpd/ti/Makefile | 3 +++
drivers/{soc => genpd}/ti/omap_prm.c | 0
drivers/{soc => genpd}/ti/ti_sci_pm_domains.c | 0
drivers/soc/ti/Makefile | 2 --
6 files changed, 6 insertions(+), 3 deletions(-)
create mode 100644 drivers/genpd/ti/Makefile
rename drivers/{soc => genpd}/ti/omap_prm.c (100%)
rename drivers/{soc => genpd}/ti/ti_sci_pm_domains.c (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 9e580df3e5db..3cf16ffac892 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21101,7 +21101,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
@@ -21335,6 +21335,7 @@ L: [email protected]
L: [email protected] (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
diff --git a/drivers/genpd/Makefile b/drivers/genpd/Makefile
index e6f34d82e6a8..193892189f0d 100644
--- a/drivers/genpd/Makefile
+++ b/drivers/genpd/Makefile
@@ -11,3 +11,4 @@ obj-y += samsung/
obj-y += starfive/
obj-y += sunxi/
obj-y += tegra/
+obj-y += ti/
diff --git a/drivers/genpd/ti/Makefile b/drivers/genpd/ti/Makefile
new file mode 100644
index 000000000000..69580afbb436
--- /dev/null
+++ b/drivers/genpd/ti/Makefile
@@ -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
diff --git a/drivers/soc/ti/omap_prm.c b/drivers/genpd/ti/omap_prm.c
similarity index 100%
rename from drivers/soc/ti/omap_prm.c
rename to drivers/genpd/ti/omap_prm.c
diff --git a/drivers/soc/ti/ti_sci_pm_domains.c b/drivers/genpd/ti/ti_sci_pm_domains.c
similarity index 100%
rename from drivers/soc/ti/ti_sci_pm_domains.c
rename to drivers/genpd/ti/ti_sci_pm_domains.c
diff --git a/drivers/soc/ti/Makefile b/drivers/soc/ti/Makefile
index cc3c972fad2e..cb800a745e66 100644
--- a/drivers/soc/ti/Makefile
+++ b/drivers/soc/ti/Makefile
@@ -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
--
2.34.1


2023-07-07 15:08:43

by Fabio Estevam

[permalink] [raw]
Subject: Re: [PATCH 06/18] soc: imx: Move power-domain drivers to the genpd dir

On Fri, Jul 7, 2023 at 11:04 AM Ulf Hansson <[email protected]> wrote:
>
> Cc: Shawn Guo <[email protected]>
> Cc: Sascha Hauer <[email protected]>
> Cc: Fabio Estevam <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>
> Signed-off-by: Ulf Hansson <[email protected]>

A commit log explaining the motivation would be helpful here.

With that added:

Reviewed-by: Fabio Estevam <[email protected]>

Thanks

2023-07-07 15:11:58

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 07/18] soc: mediatek: Move power-domain drivers to the genpd dir



On 07/07/2023 16:04, Ulf Hansson wrote:
> Cc: Matthias Brugger <[email protected]>
> Cc: AngeloGioacchino Del Regno <[email protected]>
> Cc: <[email protected]>
> Signed-off-by: Ulf Hansson <[email protected]>

We are missing a complete commit message here, is that intentional?
It would also need a patch against the maintainers file.

Apart from that patch looks good.

Regards,
Matthias

> ---
> drivers/genpd/Makefile | 1 +
> drivers/genpd/mediatek/Makefile | 3 +++
> drivers/{soc => genpd}/mediatek/mt6795-pm-domains.h | 0
> drivers/{soc => genpd}/mediatek/mt8167-pm-domains.h | 0
> drivers/{soc => genpd}/mediatek/mt8173-pm-domains.h | 0
> drivers/{soc => genpd}/mediatek/mt8183-pm-domains.h | 0
> drivers/{soc => genpd}/mediatek/mt8186-pm-domains.h | 0
> drivers/{soc => genpd}/mediatek/mt8188-pm-domains.h | 0
> drivers/{soc => genpd}/mediatek/mt8192-pm-domains.h | 0
> drivers/{soc => genpd}/mediatek/mt8195-pm-domains.h | 0
> drivers/{soc => genpd}/mediatek/mtk-pm-domains.c | 0
> drivers/{soc => genpd}/mediatek/mtk-pm-domains.h | 0
> drivers/{soc => genpd}/mediatek/mtk-scpsys.c | 0
> drivers/soc/mediatek/Makefile | 2 --
> 14 files changed, 4 insertions(+), 2 deletions(-)
> create mode 100644 drivers/genpd/mediatek/Makefile
> rename drivers/{soc => genpd}/mediatek/mt6795-pm-domains.h (100%)
> rename drivers/{soc => genpd}/mediatek/mt8167-pm-domains.h (100%)
> rename drivers/{soc => genpd}/mediatek/mt8173-pm-domains.h (100%)
> rename drivers/{soc => genpd}/mediatek/mt8183-pm-domains.h (100%)
> rename drivers/{soc => genpd}/mediatek/mt8186-pm-domains.h (100%)
> rename drivers/{soc => genpd}/mediatek/mt8188-pm-domains.h (100%)
> rename drivers/{soc => genpd}/mediatek/mt8192-pm-domains.h (100%)
> rename drivers/{soc => genpd}/mediatek/mt8195-pm-domains.h (100%)
> rename drivers/{soc => genpd}/mediatek/mtk-pm-domains.c (100%)
> rename drivers/{soc => genpd}/mediatek/mtk-pm-domains.h (100%)
> rename drivers/{soc => genpd}/mediatek/mtk-scpsys.c (100%)
>
> diff --git a/drivers/genpd/Makefile b/drivers/genpd/Makefile
> index 6b9e9fe907f3..1a0a56925756 100644
> --- a/drivers/genpd/Makefile
> +++ b/drivers/genpd/Makefile
> @@ -3,3 +3,4 @@ obj-y += actions/
> obj-y += amlogic/
> obj-y += apple/
> obj-y += bcm/
> +obj-y += mediatek/
> diff --git a/drivers/genpd/mediatek/Makefile b/drivers/genpd/mediatek/Makefile
> new file mode 100644
> index 000000000000..8cde09e654b3
> --- /dev/null
> +++ b/drivers/genpd/mediatek/Makefile
> @@ -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
> diff --git a/drivers/soc/mediatek/mt6795-pm-domains.h b/drivers/genpd/mediatek/mt6795-pm-domains.h
> similarity index 100%
> rename from drivers/soc/mediatek/mt6795-pm-domains.h
> rename to drivers/genpd/mediatek/mt6795-pm-domains.h
> diff --git a/drivers/soc/mediatek/mt8167-pm-domains.h b/drivers/genpd/mediatek/mt8167-pm-domains.h
> similarity index 100%
> rename from drivers/soc/mediatek/mt8167-pm-domains.h
> rename to drivers/genpd/mediatek/mt8167-pm-domains.h
> diff --git a/drivers/soc/mediatek/mt8173-pm-domains.h b/drivers/genpd/mediatek/mt8173-pm-domains.h
> similarity index 100%
> rename from drivers/soc/mediatek/mt8173-pm-domains.h
> rename to drivers/genpd/mediatek/mt8173-pm-domains.h
> diff --git a/drivers/soc/mediatek/mt8183-pm-domains.h b/drivers/genpd/mediatek/mt8183-pm-domains.h
> similarity index 100%
> rename from drivers/soc/mediatek/mt8183-pm-domains.h
> rename to drivers/genpd/mediatek/mt8183-pm-domains.h
> diff --git a/drivers/soc/mediatek/mt8186-pm-domains.h b/drivers/genpd/mediatek/mt8186-pm-domains.h
> similarity index 100%
> rename from drivers/soc/mediatek/mt8186-pm-domains.h
> rename to drivers/genpd/mediatek/mt8186-pm-domains.h
> diff --git a/drivers/soc/mediatek/mt8188-pm-domains.h b/drivers/genpd/mediatek/mt8188-pm-domains.h
> similarity index 100%
> rename from drivers/soc/mediatek/mt8188-pm-domains.h
> rename to drivers/genpd/mediatek/mt8188-pm-domains.h
> diff --git a/drivers/soc/mediatek/mt8192-pm-domains.h b/drivers/genpd/mediatek/mt8192-pm-domains.h
> similarity index 100%
> rename from drivers/soc/mediatek/mt8192-pm-domains.h
> rename to drivers/genpd/mediatek/mt8192-pm-domains.h
> diff --git a/drivers/soc/mediatek/mt8195-pm-domains.h b/drivers/genpd/mediatek/mt8195-pm-domains.h
> similarity index 100%
> rename from drivers/soc/mediatek/mt8195-pm-domains.h
> rename to drivers/genpd/mediatek/mt8195-pm-domains.h
> diff --git a/drivers/soc/mediatek/mtk-pm-domains.c b/drivers/genpd/mediatek/mtk-pm-domains.c
> similarity index 100%
> rename from drivers/soc/mediatek/mtk-pm-domains.c
> rename to drivers/genpd/mediatek/mtk-pm-domains.c
> diff --git a/drivers/soc/mediatek/mtk-pm-domains.h b/drivers/genpd/mediatek/mtk-pm-domains.h
> similarity index 100%
> rename from drivers/soc/mediatek/mtk-pm-domains.h
> rename to drivers/genpd/mediatek/mtk-pm-domains.h
> diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/genpd/mediatek/mtk-scpsys.c
> similarity index 100%
> rename from drivers/soc/mediatek/mtk-scpsys.c
> rename to drivers/genpd/mediatek/mtk-scpsys.c
> diff --git a/drivers/soc/mediatek/Makefile b/drivers/soc/mediatek/Makefile
> index 8c0ddacbcde8..9d3ce7878c5c 100644
> --- a/drivers/soc/mediatek/Makefile
> +++ b/drivers/soc/mediatek/Makefile
> @@ -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

2023-07-07 15:15:19

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH 14/18] soc: tegra: Move powergate-bpmp driver to the genpd dir

Let's moves the powergate-bpmp driver, while we leave the pmc driver in the
soc directory. To move the latter, we first need to split it up in a few
pieces so the genpd parts can be moved alone.

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/genpd/Makefile | 1 +
drivers/genpd/tegra/Makefile | 2 ++
drivers/{soc => genpd}/tegra/powergate-bpmp.c | 0
drivers/soc/tegra/Makefile | 1 -
4 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 drivers/genpd/tegra/Makefile
rename drivers/{soc => genpd}/tegra/powergate-bpmp.c (100%)

diff --git a/drivers/genpd/Makefile b/drivers/genpd/Makefile
index 76f2a411e6bc..e6f34d82e6a8 100644
--- a/drivers/genpd/Makefile
+++ b/drivers/genpd/Makefile
@@ -10,3 +10,4 @@ obj-y += rockchip/
obj-y += samsung/
obj-y += starfive/
obj-y += sunxi/
+obj-y += tegra/
diff --git a/drivers/genpd/tegra/Makefile b/drivers/genpd/tegra/Makefile
new file mode 100644
index 000000000000..ec8acfd2c77c
--- /dev/null
+++ b/drivers/genpd/tegra/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_SOC_TEGRA_POWERGATE_BPMP) += powergate-bpmp.o
diff --git a/drivers/soc/tegra/powergate-bpmp.c b/drivers/genpd/tegra/powergate-bpmp.c
similarity index 100%
rename from drivers/soc/tegra/powergate-bpmp.c
rename to drivers/genpd/tegra/powergate-bpmp.c
diff --git a/drivers/soc/tegra/Makefile b/drivers/soc/tegra/Makefile
index d722f512dc9d..01059619e764 100644
--- a/drivers/soc/tegra/Makefile
+++ b/drivers/soc/tegra/Makefile
@@ -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
--
2.34.1


2023-07-07 15:18:50

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 07/18] soc: mediatek: Move power-domain drivers to the genpd dir

On Fri, 7 Jul 2023 at 16:45, Matthias Brugger <[email protected]> wrote:
>
>
>
> On 07/07/2023 16:04, Ulf Hansson wrote:
> > Cc: Matthias Brugger <[email protected]>
> > Cc: AngeloGioacchino Del Regno <[email protected]>
> > Cc: <[email protected]>
> > Signed-off-by: Ulf Hansson <[email protected]>
>
> We are missing a complete commit message here, is that intentional?

I was lazy and added the motivations behind this in patch 1. I will
re-spin and fix this.

> It would also need a patch against the maintainers file.

You already have this in the Mediatek SoC section. But I can add the
genpd directory too, to make it explicit if you prefer that?

N: mtk
N: mt[2678]
K: mediatek


>
> Apart from that patch looks good.
>
> Regards,
> Matthias

Thanks!

Kind regards
Uffe

>
> > ---
> > drivers/genpd/Makefile | 1 +
> > drivers/genpd/mediatek/Makefile | 3 +++
> > drivers/{soc => genpd}/mediatek/mt6795-pm-domains.h | 0
> > drivers/{soc => genpd}/mediatek/mt8167-pm-domains.h | 0
> > drivers/{soc => genpd}/mediatek/mt8173-pm-domains.h | 0
> > drivers/{soc => genpd}/mediatek/mt8183-pm-domains.h | 0
> > drivers/{soc => genpd}/mediatek/mt8186-pm-domains.h | 0
> > drivers/{soc => genpd}/mediatek/mt8188-pm-domains.h | 0
> > drivers/{soc => genpd}/mediatek/mt8192-pm-domains.h | 0
> > drivers/{soc => genpd}/mediatek/mt8195-pm-domains.h | 0
> > drivers/{soc => genpd}/mediatek/mtk-pm-domains.c | 0
> > drivers/{soc => genpd}/mediatek/mtk-pm-domains.h | 0
> > drivers/{soc => genpd}/mediatek/mtk-scpsys.c | 0
> > drivers/soc/mediatek/Makefile | 2 --
> > 14 files changed, 4 insertions(+), 2 deletions(-)
> > create mode 100644 drivers/genpd/mediatek/Makefile
> > rename drivers/{soc => genpd}/mediatek/mt6795-pm-domains.h (100%)
> > rename drivers/{soc => genpd}/mediatek/mt8167-pm-domains.h (100%)
> > rename drivers/{soc => genpd}/mediatek/mt8173-pm-domains.h (100%)
> > rename drivers/{soc => genpd}/mediatek/mt8183-pm-domains.h (100%)
> > rename drivers/{soc => genpd}/mediatek/mt8186-pm-domains.h (100%)
> > rename drivers/{soc => genpd}/mediatek/mt8188-pm-domains.h (100%)
> > rename drivers/{soc => genpd}/mediatek/mt8192-pm-domains.h (100%)
> > rename drivers/{soc => genpd}/mediatek/mt8195-pm-domains.h (100%)
> > rename drivers/{soc => genpd}/mediatek/mtk-pm-domains.c (100%)
> > rename drivers/{soc => genpd}/mediatek/mtk-pm-domains.h (100%)
> > rename drivers/{soc => genpd}/mediatek/mtk-scpsys.c (100%)
> >
> > diff --git a/drivers/genpd/Makefile b/drivers/genpd/Makefile
> > index 6b9e9fe907f3..1a0a56925756 100644
> > --- a/drivers/genpd/Makefile
> > +++ b/drivers/genpd/Makefile
> > @@ -3,3 +3,4 @@ obj-y += actions/
> > obj-y += amlogic/
> > obj-y += apple/
> > obj-y += bcm/
> > +obj-y += mediatek/
> > diff --git a/drivers/genpd/mediatek/Makefile b/drivers/genpd/mediatek/Makefile
> > new file mode 100644
> > index 000000000000..8cde09e654b3
> > --- /dev/null
> > +++ b/drivers/genpd/mediatek/Makefile
> > @@ -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
> > diff --git a/drivers/soc/mediatek/mt6795-pm-domains.h b/drivers/genpd/mediatek/mt6795-pm-domains.h
> > similarity index 100%
> > rename from drivers/soc/mediatek/mt6795-pm-domains.h
> > rename to drivers/genpd/mediatek/mt6795-pm-domains.h
> > diff --git a/drivers/soc/mediatek/mt8167-pm-domains.h b/drivers/genpd/mediatek/mt8167-pm-domains.h
> > similarity index 100%
> > rename from drivers/soc/mediatek/mt8167-pm-domains.h
> > rename to drivers/genpd/mediatek/mt8167-pm-domains.h
> > diff --git a/drivers/soc/mediatek/mt8173-pm-domains.h b/drivers/genpd/mediatek/mt8173-pm-domains.h
> > similarity index 100%
> > rename from drivers/soc/mediatek/mt8173-pm-domains.h
> > rename to drivers/genpd/mediatek/mt8173-pm-domains.h
> > diff --git a/drivers/soc/mediatek/mt8183-pm-domains.h b/drivers/genpd/mediatek/mt8183-pm-domains.h
> > similarity index 100%
> > rename from drivers/soc/mediatek/mt8183-pm-domains.h
> > rename to drivers/genpd/mediatek/mt8183-pm-domains.h
> > diff --git a/drivers/soc/mediatek/mt8186-pm-domains.h b/drivers/genpd/mediatek/mt8186-pm-domains.h
> > similarity index 100%
> > rename from drivers/soc/mediatek/mt8186-pm-domains.h
> > rename to drivers/genpd/mediatek/mt8186-pm-domains.h
> > diff --git a/drivers/soc/mediatek/mt8188-pm-domains.h b/drivers/genpd/mediatek/mt8188-pm-domains.h
> > similarity index 100%
> > rename from drivers/soc/mediatek/mt8188-pm-domains.h
> > rename to drivers/genpd/mediatek/mt8188-pm-domains.h
> > diff --git a/drivers/soc/mediatek/mt8192-pm-domains.h b/drivers/genpd/mediatek/mt8192-pm-domains.h
> > similarity index 100%
> > rename from drivers/soc/mediatek/mt8192-pm-domains.h
> > rename to drivers/genpd/mediatek/mt8192-pm-domains.h
> > diff --git a/drivers/soc/mediatek/mt8195-pm-domains.h b/drivers/genpd/mediatek/mt8195-pm-domains.h
> > similarity index 100%
> > rename from drivers/soc/mediatek/mt8195-pm-domains.h
> > rename to drivers/genpd/mediatek/mt8195-pm-domains.h
> > diff --git a/drivers/soc/mediatek/mtk-pm-domains.c b/drivers/genpd/mediatek/mtk-pm-domains.c
> > similarity index 100%
> > rename from drivers/soc/mediatek/mtk-pm-domains.c
> > rename to drivers/genpd/mediatek/mtk-pm-domains.c
> > diff --git a/drivers/soc/mediatek/mtk-pm-domains.h b/drivers/genpd/mediatek/mtk-pm-domains.h
> > similarity index 100%
> > rename from drivers/soc/mediatek/mtk-pm-domains.h
> > rename to drivers/genpd/mediatek/mtk-pm-domains.h
> > diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/genpd/mediatek/mtk-scpsys.c
> > similarity index 100%
> > rename from drivers/soc/mediatek/mtk-scpsys.c
> > rename to drivers/genpd/mediatek/mtk-scpsys.c
> > diff --git a/drivers/soc/mediatek/Makefile b/drivers/soc/mediatek/Makefile
> > index 8c0ddacbcde8..9d3ce7878c5c 100644
> > --- a/drivers/soc/mediatek/Makefile
> > +++ b/drivers/soc/mediatek/Makefile
> > @@ -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

2023-07-07 15:18:59

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH 10/18] soc: rockchip: Mover power-domain driver to the genpd dir

Am Freitag, 7. Juli 2023, 16:04:26 CEST schrieb Ulf Hansson:
> Cc: Heiko Stuebner <[email protected]>
> Cc: <[email protected]>
> Signed-off-by: Ulf Hansson <[email protected]>

I guess this is part of a bigger series moving these things around, so
Acked-by: Heiko Stuebner <[email protected]>

> ---
> drivers/genpd/Makefile | 1 +
> drivers/genpd/rockchip/Makefile | 2 ++
> .../{soc/rockchip/pm_domains.c => genpd/rockchip/pm-domains.c} | 0
> drivers/soc/rockchip/Makefile | 1 -
> 4 files changed, 3 insertions(+), 1 deletion(-)
> create mode 100644 drivers/genpd/rockchip/Makefile
> rename drivers/{soc/rockchip/pm_domains.c => genpd/rockchip/pm-domains.c} (100%)
>
> diff --git a/drivers/genpd/Makefile b/drivers/genpd/Makefile
> index 286598ce7620..c178421e0cbc 100644
> --- a/drivers/genpd/Makefile
> +++ b/drivers/genpd/Makefile
> @@ -6,3 +6,4 @@ obj-y += bcm/
> obj-y += mediatek/
> obj-y += qcom/
> obj-y += renesas/
> +obj-y += rockchip/
> diff --git a/drivers/genpd/rockchip/Makefile b/drivers/genpd/rockchip/Makefile
> new file mode 100644
> index 000000000000..8fb9d88a3492
> --- /dev/null
> +++ b/drivers/genpd/rockchip/Makefile
> @@ -0,0 +1,2 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +obj-$(CONFIG_ROCKCHIP_PM_DOMAINS) += pm-domains.o
> diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/genpd/rockchip/pm-domains.c
> similarity index 100%
> rename from drivers/soc/rockchip/pm_domains.c
> rename to drivers/genpd/rockchip/pm-domains.c
> diff --git a/drivers/soc/rockchip/Makefile b/drivers/soc/rockchip/Makefile
> index 05f31a4e743c..23d414433c8c 100644
> --- a/drivers/soc/rockchip/Makefile
> +++ b/drivers/soc/rockchip/Makefile
> @@ -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
>





2023-07-07 18:10:26

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH 15/18] soc: ti: Mover power-domain drivers to the genpd dir

On 16:04-20230707, Ulf Hansson wrote:
> Cc: Nishanth Menon <[email protected]>
> Cc: Santosh Shilimkar <[email protected]>
> Cc: Tero Kristo <[email protected]>
> Signed-off-by: Ulf Hansson <[email protected]>
> ---
> MAINTAINERS | 3 ++-
> drivers/genpd/Makefile | 1 +
> drivers/genpd/ti/Makefile | 3 +++
> drivers/{soc => genpd}/ti/omap_prm.c | 0
> drivers/{soc => genpd}/ti/ti_sci_pm_domains.c | 0
> drivers/soc/ti/Makefile | 2 --
> 6 files changed, 6 insertions(+), 3 deletions(-)
> create mode 100644 drivers/genpd/ti/Makefile
> rename drivers/{soc => genpd}/ti/omap_prm.c (100%)
> rename drivers/{soc => genpd}/ti/ti_sci_pm_domains.c (100%)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 9e580df3e5db..3cf16ffac892 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -21101,7 +21101,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
> @@ -21335,6 +21335,7 @@ L: [email protected]
> L: [email protected] (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

Probably the wrong place for this as omap_prm is'nt a keystone navigator
driver set. Maybe Tony has a suggestion?

> F: drivers/soc/ti/*
>
> TI LM49xxx FAMILY ASoC CODEC DRIVERS
> diff --git a/drivers/genpd/Makefile b/drivers/genpd/Makefile
> index e6f34d82e6a8..193892189f0d 100644
> --- a/drivers/genpd/Makefile
> +++ b/drivers/genpd/Makefile
> @@ -11,3 +11,4 @@ obj-y += samsung/
> obj-y += starfive/
> obj-y += sunxi/
> obj-y += tegra/
> +obj-y += ti/
> diff --git a/drivers/genpd/ti/Makefile b/drivers/genpd/ti/Makefile
> new file mode 100644
> index 000000000000..69580afbb436
> --- /dev/null
> +++ b/drivers/genpd/ti/Makefile
> @@ -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
> diff --git a/drivers/soc/ti/omap_prm.c b/drivers/genpd/ti/omap_prm.c
> similarity index 100%
> rename from drivers/soc/ti/omap_prm.c
> rename to drivers/genpd/ti/omap_prm.c
> diff --git a/drivers/soc/ti/ti_sci_pm_domains.c b/drivers/genpd/ti/ti_sci_pm_domains.c
> similarity index 100%
> rename from drivers/soc/ti/ti_sci_pm_domains.c
> rename to drivers/genpd/ti/ti_sci_pm_domains.c
> diff --git a/drivers/soc/ti/Makefile b/drivers/soc/ti/Makefile
> index cc3c972fad2e..cb800a745e66 100644
> --- a/drivers/soc/ti/Makefile
> +++ b/drivers/soc/ti/Makefile
> @@ -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
> --
> 2.34.1
>

--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D

2023-07-10 13:23:15

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 14/18] soc: tegra: Move powergate-bpmp driver to the genpd dir

On Fri, Jul 07, 2023 at 04:04:30PM +0200, Ulf Hansson wrote:
> Let's moves the powergate-bpmp driver, while we leave the pmc driver in the
> soc directory. To move the latter, we first need to split it up in a few
> pieces so the genpd parts can be moved alone.
>
> 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/genpd/Makefile | 1 +
> drivers/genpd/tegra/Makefile | 2 ++
> drivers/{soc => genpd}/tegra/powergate-bpmp.c | 0
> drivers/soc/tegra/Makefile | 1 -
> 4 files changed, 3 insertions(+), 1 deletion(-)
> create mode 100644 drivers/genpd/tegra/Makefile
> rename drivers/{soc => genpd}/tegra/powergate-bpmp.c (100%)

Fine with me:

Acked-by: Thierry Reding <[email protected]>


Attachments:
(No filename) (968.00 B)
signature.asc (849.00 B)
Download all attachments

2023-07-11 09:40:23

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 15/18] soc: ti: Mover power-domain drivers to the genpd dir

On Fri, 7 Jul 2023 at 19:50, Nishanth Menon <[email protected]> wrote:
>
> On 16:04-20230707, Ulf Hansson wrote:
> > Cc: Nishanth Menon <[email protected]>
> > Cc: Santosh Shilimkar <[email protected]>
> > Cc: Tero Kristo <[email protected]>
> > Signed-off-by: Ulf Hansson <[email protected]>
> > ---
> > MAINTAINERS | 3 ++-
> > drivers/genpd/Makefile | 1 +
> > drivers/genpd/ti/Makefile | 3 +++
> > drivers/{soc => genpd}/ti/omap_prm.c | 0
> > drivers/{soc => genpd}/ti/ti_sci_pm_domains.c | 0
> > drivers/soc/ti/Makefile | 2 --
> > 6 files changed, 6 insertions(+), 3 deletions(-)
> > create mode 100644 drivers/genpd/ti/Makefile
> > rename drivers/{soc => genpd}/ti/omap_prm.c (100%)
> > rename drivers/{soc => genpd}/ti/ti_sci_pm_domains.c (100%)
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 9e580df3e5db..3cf16ffac892 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -21101,7 +21101,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
> > @@ -21335,6 +21335,7 @@ L: [email protected]
> > L: [email protected] (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
>
> Probably the wrong place for this as omap_prm is'nt a keystone navigator
> driver set. Maybe Tony has a suggestion?

I guess we could add it to the OMAP2+ section then?

In any case, I suggest we consider that as a separate patch on top, as
I am just obeying to the existing pattern that the get_maintainers
script provides.

Kind regards
Uffe

>
> > F: drivers/soc/ti/*
> >
> > TI LM49xxx FAMILY ASoC CODEC DRIVERS
> > diff --git a/drivers/genpd/Makefile b/drivers/genpd/Makefile
> > index e6f34d82e6a8..193892189f0d 100644
> > --- a/drivers/genpd/Makefile
> > +++ b/drivers/genpd/Makefile
> > @@ -11,3 +11,4 @@ obj-y += samsung/
> > obj-y += starfive/
> > obj-y += sunxi/
> > obj-y += tegra/
> > +obj-y += ti/
> > diff --git a/drivers/genpd/ti/Makefile b/drivers/genpd/ti/Makefile
> > new file mode 100644
> > index 000000000000..69580afbb436
> > --- /dev/null
> > +++ b/drivers/genpd/ti/Makefile
> > @@ -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
> > diff --git a/drivers/soc/ti/omap_prm.c b/drivers/genpd/ti/omap_prm.c
> > similarity index 100%
> > rename from drivers/soc/ti/omap_prm.c
> > rename to drivers/genpd/ti/omap_prm.c
> > diff --git a/drivers/soc/ti/ti_sci_pm_domains.c b/drivers/genpd/ti/ti_sci_pm_domains.c
> > similarity index 100%
> > rename from drivers/soc/ti/ti_sci_pm_domains.c
> > rename to drivers/genpd/ti/ti_sci_pm_domains.c
> > diff --git a/drivers/soc/ti/Makefile b/drivers/soc/ti/Makefile
> > index cc3c972fad2e..cb800a745e66 100644
> > --- a/drivers/soc/ti/Makefile
> > +++ b/drivers/soc/ti/Makefile
> > @@ -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
> > --
> > 2.34.1
> >
>
> --
> Regards,
> Nishanth Menon
> Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D

2023-07-11 13:16:29

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH 15/18] soc: ti: Mover power-domain drivers to the genpd dir

On 11:16-20230711, Ulf Hansson wrote:
> On Fri, 7 Jul 2023 at 19:50, Nishanth Menon <[email protected]> wrote:
> >
> > On 16:04-20230707, Ulf Hansson wrote:
> > > Cc: Nishanth Menon <[email protected]>
> > > Cc: Santosh Shilimkar <[email protected]>
> > > Cc: Tero Kristo <[email protected]>
> > > Signed-off-by: Ulf Hansson <[email protected]>
> > > ---
> > > MAINTAINERS | 3 ++-
> > > drivers/genpd/Makefile | 1 +
> > > drivers/genpd/ti/Makefile | 3 +++
> > > drivers/{soc => genpd}/ti/omap_prm.c | 0
> > > drivers/{soc => genpd}/ti/ti_sci_pm_domains.c | 0
> > > drivers/soc/ti/Makefile | 2 --
> > > 6 files changed, 6 insertions(+), 3 deletions(-)
> > > create mode 100644 drivers/genpd/ti/Makefile
> > > rename drivers/{soc => genpd}/ti/omap_prm.c (100%)
> > > rename drivers/{soc => genpd}/ti/ti_sci_pm_domains.c (100%)
> > >
> > > diff --git a/MAINTAINERS b/MAINTAINERS
> > > index 9e580df3e5db..3cf16ffac892 100644
> > > --- a/MAINTAINERS
> > > +++ b/MAINTAINERS
> > > @@ -21101,7 +21101,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
> > > @@ -21335,6 +21335,7 @@ L: [email protected]
> > > L: [email protected] (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
> >
> > Probably the wrong place for this as omap_prm is'nt a keystone navigator
> > driver set. Maybe Tony has a suggestion?
>
> I guess we could add it to the OMAP2+ section then?

That would be my suggestion.

>
> In any case, I suggest we consider that as a separate patch on top, as
> I am just obeying to the existing pattern that the get_maintainers
> script provides.
>

OK. otherwise, this looks good to me.

Reviewed-by: Nishanth Menon <[email protected]>
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D

2023-07-14 08:06:58

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 15/18] soc: ti: Mover power-domain drivers to the genpd dir

* Nishanth Menon <[email protected]> [230711 12:49]:
> On 11:16-20230711, Ulf Hansson wrote:
> > On Fri, 7 Jul 2023 at 19:50, Nishanth Menon <[email protected]> wrote:
> > >
> > > On 16:04-20230707, Ulf Hansson wrote:
> > > > Cc: Nishanth Menon <[email protected]>
> > > > Cc: Santosh Shilimkar <[email protected]>
> > > > Cc: Tero Kristo <[email protected]>
> > > > Signed-off-by: Ulf Hansson <[email protected]>
> > > > ---
> > > > MAINTAINERS | 3 ++-
> > > > drivers/genpd/Makefile | 1 +
> > > > drivers/genpd/ti/Makefile | 3 +++
> > > > drivers/{soc => genpd}/ti/omap_prm.c | 0
> > > > drivers/{soc => genpd}/ti/ti_sci_pm_domains.c | 0
> > > > drivers/soc/ti/Makefile | 2 --
> > > > 6 files changed, 6 insertions(+), 3 deletions(-)
> > > > create mode 100644 drivers/genpd/ti/Makefile
> > > > rename drivers/{soc => genpd}/ti/omap_prm.c (100%)
> > > > rename drivers/{soc => genpd}/ti/ti_sci_pm_domains.c (100%)
> > > >
> > > > diff --git a/MAINTAINERS b/MAINTAINERS
> > > > index 9e580df3e5db..3cf16ffac892 100644
> > > > --- a/MAINTAINERS
> > > > +++ b/MAINTAINERS
> > > > @@ -21101,7 +21101,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
> > > > @@ -21335,6 +21335,7 @@ L: [email protected]
> > > > L: [email protected] (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
> > >
> > > Probably the wrong place for this as omap_prm is'nt a keystone navigator
> > > driver set. Maybe Tony has a suggestion?
> >
> > I guess we could add it to the OMAP2+ section then?
>
> That would be my suggestion.

Makes sense to me too.

Regards,

Tony

2023-07-18 07:10:35

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 06/18] soc: imx: Move power-domain drivers to the genpd dir

On Fri, Jul 07, 2023 at 04:04:22PM +0200, Ulf Hansson wrote:
> Cc: Shawn Guo <[email protected]>
> Cc: Sascha Hauer <[email protected]>
> Cc: Fabio Estevam <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>
> Signed-off-by: Ulf Hansson <[email protected]>
> ---
> drivers/genpd/imx/Makefile | 7 +++++++
> drivers/{soc => genpd}/imx/gpc.c | 0
> drivers/{soc => genpd}/imx/gpcv2.c | 0
> drivers/{soc => genpd}/imx/imx8m-blk-ctrl.c | 0
> drivers/{soc => genpd}/imx/imx8mp-blk-ctrl.c | 0
> drivers/{soc => genpd}/imx/imx93-blk-ctrl.c | 0
> drivers/{soc => genpd}/imx/imx93-pd.c | 0
> drivers/soc/imx/Makefile | 7 +------
> 8 files changed, 8 insertions(+), 6 deletions(-)
> create mode 100644 drivers/genpd/imx/Makefile
> rename drivers/{soc => genpd}/imx/gpc.c (100%)
> rename drivers/{soc => genpd}/imx/gpcv2.c (100%)
> rename drivers/{soc => genpd}/imx/imx8m-blk-ctrl.c (100%)
> rename drivers/{soc => genpd}/imx/imx8mp-blk-ctrl.c (100%)
> rename drivers/{soc => genpd}/imx/imx93-blk-ctrl.c (100%)
> rename drivers/{soc => genpd}/imx/imx93-pd.c (100%)

Acked-by: Shawn Guo <[email protected]>