Commit 0c4b09cb authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'pmdomain-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm

Pull pmdomain updates from Ulf Hansson:
 "Core:
   - Move the generic PM domain and its governor to the pmdomain
     subsystem
   - Drop the unused pm_genpd_opp_to_performance_state()

  Providers:
   - Convert some providers to let the ->remove() callback return void
   - amlogic: Add support for G12A ISP power domain
   - arm: Move the SCPI power-domain driver to the pmdomain subsystem
   - arm: Move Kconfig options to the pmdomain subsystem
   - qcom: Update part number to X1E80100 for the rpmhpd"

* tag 'pmdomain-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
  PM: domains: Move genpd and its governor to the pmdomain subsystem
  PM: domains: Drop redundant header for genpd
  PM: domains: Drop the unused pm_genpd_opp_to_performance_state()
  PM: domains: fix domain_governor kernel-doc warnings
  pmdomain: xilinx/zynqmp: Convert to platform remove callback returning void
  pmdomain: qcom-cpr: Convert to platform remove callback returning void
  pmdomain: imx93-pd: Convert to platform remove callback returning void
  pmdomain: imx93-blk-ctrl: Convert to platform remove callback returning void
  pmdomain: imx8mp-blk-ctrl: Convert to platform remove callback returning void
  pmdomain: imx8m-blk-ctrl: Convert to platform remove callback returning void
  pmdomain: imx-gpcv2: Convert to platform remove callback returning void
  pmdomain: imx-gpc: Convert to platform remove callback returning void
  pmdomain: imx-pgc: Convert to platform remove callback returning void
  pmdomain: amlogic: meson-ee-pwrc: add support for G12A ISP power domain
  dt-bindings: power: meson-g12a-power: document ISP power domain
  firmware: arm_scpi: Move power-domain driver to the pmdomain dir
  pmdomain: arm_scmi: Move Kconfig options to the pmdomain subsystem
  pmdomain: qcom: rpmhpd: Update part number to X1E80100
  dt-bindings: power: rpmpd: Update part number to X1E80100
parents bf9ca811 d6948c13
...@@ -39,7 +39,6 @@ properties: ...@@ -39,7 +39,6 @@ properties:
- qcom,sc7280-rpmhpd - qcom,sc7280-rpmhpd
- qcom,sc8180x-rpmhpd - qcom,sc8180x-rpmhpd
- qcom,sc8280xp-rpmhpd - qcom,sc8280xp-rpmhpd
- qcom,sc8380xp-rpmhpd
- qcom,sdm660-rpmpd - qcom,sdm660-rpmpd
- qcom,sdm670-rpmhpd - qcom,sdm670-rpmhpd
- qcom,sdm845-rpmhpd - qcom,sdm845-rpmhpd
...@@ -57,6 +56,7 @@ properties: ...@@ -57,6 +56,7 @@ properties:
- qcom,sm8450-rpmhpd - qcom,sm8450-rpmhpd
- qcom,sm8550-rpmhpd - qcom,sm8550-rpmhpd
- qcom,sm8650-rpmhpd - qcom,sm8650-rpmhpd
- qcom,x1e80100-rpmhpd
- items: - items:
- enum: - enum:
- qcom,msm8937-rpmpd - qcom,msm8937-rpmpd
......
...@@ -8875,21 +8875,13 @@ F: Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.yaml ...@@ -8875,21 +8875,13 @@ F: Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.yaml
F: drivers/i2c/muxes/i2c-demux-pinctrl.c F: drivers/i2c/muxes/i2c-demux-pinctrl.c
GENERIC PM DOMAINS GENERIC PM DOMAINS
M: "Rafael J. Wysocki" <rafael@kernel.org>
M: Kevin Hilman <khilman@kernel.org>
M: Ulf Hansson <ulf.hansson@linaro.org> M: Ulf Hansson <ulf.hansson@linaro.org>
L: linux-pm@vger.kernel.org L: linux-pm@vger.kernel.org
S: Supported S: Supported
F: Documentation/devicetree/bindings/power/power?domain* 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 T: git git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git
F: drivers/pmdomain/ F: drivers/pmdomain/
F: include/linux/pm_domain.h
GENERIC RADIX TREE GENERIC RADIX TREE
M: Kent Overstreet <kent.overstreet@linux.dev> M: Kent Overstreet <kent.overstreet@linux.dev>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
obj-$(CONFIG_PM) += sysfs.o generic_ops.o common.o qos.o runtime.o wakeirq.o obj-$(CONFIG_PM) += sysfs.o generic_ops.o common.o qos.o runtime.o wakeirq.o
obj-$(CONFIG_PM_SLEEP) += main.o wakeup.o wakeup_stats.o obj-$(CONFIG_PM_SLEEP) += main.o wakeup.o wakeup_stats.o
obj-$(CONFIG_PM_TRACE_RTC) += trace.o obj-$(CONFIG_PM_TRACE_RTC) += trace.o
obj-$(CONFIG_PM_GENERIC_DOMAINS) += domain.o domain_governor.o
obj-$(CONFIG_HAVE_CLK) += clock_ops.o obj-$(CONFIG_HAVE_CLK) += clock_ops.o
obj-$(CONFIG_PM_QOS_KUNIT_TEST) += qos-test.o obj-$(CONFIG_PM_QOS_KUNIT_TEST) += qos-test.o
......
...@@ -28,15 +28,6 @@ config ARM_SCPI_PROTOCOL ...@@ -28,15 +28,6 @@ config ARM_SCPI_PROTOCOL
This protocol library provides interface for all the client drivers This protocol library provides interface for all the client drivers
making use of the features offered by the SCP. making use of the features offered by the SCP.
config ARM_SCPI_POWER_DOMAIN
tristate "SCPI power domain driver"
depends on ARM_SCPI_PROTOCOL || (COMPILE_TEST && OF)
default y
select PM_GENERIC_DOMAINS if PM
help
This enables support for the SCPI power domains which can be
enabled or disabled via the SCP firmware
config ARM_SDE_INTERFACE config ARM_SDE_INTERFACE
bool "ARM Software Delegated Exception Interface (SDEI)" bool "ARM Software Delegated Exception Interface (SDEI)"
depends on ARM64 depends on ARM64
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# Makefile for the linux kernel. # Makefile for the linux kernel.
# #
obj-$(CONFIG_ARM_SCPI_PROTOCOL) += arm_scpi.o obj-$(CONFIG_ARM_SCPI_PROTOCOL) += arm_scpi.o
obj-$(CONFIG_ARM_SCPI_POWER_DOMAIN) += scpi_pm_domain.o
obj-$(CONFIG_ARM_SDE_INTERFACE) += arm_sdei.o obj-$(CONFIG_ARM_SDE_INTERFACE) += arm_sdei.o
obj-$(CONFIG_DMI) += dmi_scan.o obj-$(CONFIG_DMI) += dmi_scan.o
obj-$(CONFIG_DMI_SYSFS) += dmi-sysfs.o obj-$(CONFIG_DMI_SYSFS) += dmi-sysfs.o
......
...@@ -168,31 +168,6 @@ config ARM_SCMI_TRANSPORT_VIRTIO_ATOMIC_ENABLE ...@@ -168,31 +168,6 @@ config ARM_SCMI_TRANSPORT_VIRTIO_ATOMIC_ENABLE
endif #ARM_SCMI_PROTOCOL endif #ARM_SCMI_PROTOCOL
config ARM_SCMI_POWER_DOMAIN
tristate "SCMI power domain driver"
depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
default y
select PM_GENERIC_DOMAINS if PM
help
This enables support for the SCMI power domains which can be
enabled or disabled via the SCP firmware
This driver can also be built as a module. If so, the module
will be called scmi_pm_domain. Note this may needed early in boot
before rootfs may be available.
config ARM_SCMI_PERF_DOMAIN
tristate "SCMI performance domain driver"
depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
default y
select PM_GENERIC_DOMAINS if PM
help
This enables support for the SCMI performance domains which can be
enabled or disabled via the SCP firmware.
This driver can also be built as a module. If so, the module will be
called scmi_perf_domain.
config ARM_SCMI_POWER_CONTROL config ARM_SCMI_POWER_CONTROL
tristate "SCMI system power control driver" tristate "SCMI system power control driver"
depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF) depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
......
...@@ -4,6 +4,7 @@ menu "PM Domains" ...@@ -4,6 +4,7 @@ menu "PM Domains"
source "drivers/pmdomain/actions/Kconfig" source "drivers/pmdomain/actions/Kconfig"
source "drivers/pmdomain/amlogic/Kconfig" source "drivers/pmdomain/amlogic/Kconfig"
source "drivers/pmdomain/apple/Kconfig" source "drivers/pmdomain/apple/Kconfig"
source "drivers/pmdomain/arm/Kconfig"
source "drivers/pmdomain/bcm/Kconfig" source "drivers/pmdomain/bcm/Kconfig"
source "drivers/pmdomain/imx/Kconfig" source "drivers/pmdomain/imx/Kconfig"
source "drivers/pmdomain/mediatek/Kconfig" source "drivers/pmdomain/mediatek/Kconfig"
......
...@@ -16,3 +16,4 @@ obj-y += sunxi/ ...@@ -16,3 +16,4 @@ obj-y += sunxi/
obj-y += tegra/ obj-y += tegra/
obj-y += ti/ obj-y += ti/
obj-y += xilinx/ obj-y += xilinx/
obj-y += core.o governor.o
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
#define G12A_HHI_NANOQ_MEM_PD_REG0 (0x43 << 2) #define G12A_HHI_NANOQ_MEM_PD_REG0 (0x43 << 2)
#define G12A_HHI_NANOQ_MEM_PD_REG1 (0x44 << 2) #define G12A_HHI_NANOQ_MEM_PD_REG1 (0x44 << 2)
#define G12A_HHI_ISP_MEM_PD_REG0 (0x45 << 2)
#define G12A_HHI_ISP_MEM_PD_REG1 (0x46 << 2)
struct meson_ee_pwrc; struct meson_ee_pwrc;
struct meson_ee_pwrc_domain; struct meson_ee_pwrc_domain;
...@@ -115,6 +117,13 @@ static struct meson_ee_pwrc_top_domain g12a_pwrc_nna = { ...@@ -115,6 +117,13 @@ static struct meson_ee_pwrc_top_domain g12a_pwrc_nna = {
.iso_mask = BIT(16) | BIT(17), .iso_mask = BIT(16) | BIT(17),
}; };
static struct meson_ee_pwrc_top_domain g12a_pwrc_isp = {
.sleep_reg = GX_AO_RTI_GEN_PWR_SLEEP0,
.sleep_mask = BIT(18) | BIT(19),
.iso_reg = GX_AO_RTI_GEN_PWR_ISO0,
.iso_mask = BIT(18) | BIT(19),
};
/* Memory PD Domains */ /* Memory PD Domains */
#define VPU_MEMPD(__reg) \ #define VPU_MEMPD(__reg) \
...@@ -231,6 +240,11 @@ static struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_nna[] = { ...@@ -231,6 +240,11 @@ static struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_nna[] = {
{ G12A_HHI_NANOQ_MEM_PD_REG1, GENMASK(31, 0) }, { G12A_HHI_NANOQ_MEM_PD_REG1, GENMASK(31, 0) },
}; };
static struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_isp[] = {
{ G12A_HHI_ISP_MEM_PD_REG0, GENMASK(31, 0) },
{ G12A_HHI_ISP_MEM_PD_REG1, GENMASK(31, 0) },
};
#define VPU_PD(__name, __top_pd, __mem, __is_pwr_off, __resets, __clks) \ #define VPU_PD(__name, __top_pd, __mem, __is_pwr_off, __resets, __clks) \
{ \ { \
.name = __name, \ .name = __name, \
...@@ -269,6 +283,8 @@ static struct meson_ee_pwrc_domain_desc g12a_pwrc_domains[] = { ...@@ -269,6 +283,8 @@ static struct meson_ee_pwrc_domain_desc g12a_pwrc_domains[] = {
[PWRC_G12A_ETH_ID] = MEM_PD("ETH", meson_pwrc_mem_eth), [PWRC_G12A_ETH_ID] = MEM_PD("ETH", meson_pwrc_mem_eth),
[PWRC_G12A_NNA_ID] = TOP_PD("NNA", &g12a_pwrc_nna, g12a_pwrc_mem_nna, [PWRC_G12A_NNA_ID] = TOP_PD("NNA", &g12a_pwrc_nna, g12a_pwrc_mem_nna,
pwrc_ee_is_powered_off), pwrc_ee_is_powered_off),
[PWRC_G12A_ISP_ID] = TOP_PD("ISP", &g12a_pwrc_isp, g12a_pwrc_mem_isp,
pwrc_ee_is_powered_off),
}; };
static struct meson_ee_pwrc_domain_desc gxbb_pwrc_domains[] = { static struct meson_ee_pwrc_domain_desc gxbb_pwrc_domains[] = {
......
# SPDX-License-Identifier: GPL-2.0-only
config ARM_SCMI_PERF_DOMAIN
tristate "SCMI performance domain driver"
depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
default y
select PM_GENERIC_DOMAINS if PM
help
This enables support for the SCMI performance domains which can be
enabled or disabled via the SCP firmware.
This driver can also be built as a module. If so, the module will be
called scmi_perf_domain.
config ARM_SCMI_POWER_DOMAIN
tristate "SCMI power domain driver"
depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
default y
select PM_GENERIC_DOMAINS if PM
help
This enables support for the SCMI power domains which can be
enabled or disabled via the SCP firmware
This driver can also be built as a module. If so, the module
will be called scmi_pm_domain. Note this may needed early in boot
before rootfs may be available.
config ARM_SCPI_POWER_DOMAIN
tristate "SCPI power domain driver"
depends on ARM_SCPI_PROTOCOL || (COMPILE_TEST && OF)
default y
select PM_GENERIC_DOMAINS if PM
help
This enables support for the SCPI power domains which can be
enabled or disabled via the SCP firmware
This driver can also be built as a module. If so, the module will be
called scpi_pm_domain.
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
obj-$(CONFIG_ARM_SCMI_PERF_DOMAIN) += scmi_perf_domain.o obj-$(CONFIG_ARM_SCMI_PERF_DOMAIN) += scmi_perf_domain.o
obj-$(CONFIG_ARM_SCMI_POWER_DOMAIN) += scmi_pm_domain.o obj-$(CONFIG_ARM_SCMI_POWER_DOMAIN) += scmi_pm_domain.o
obj-$(CONFIG_ARM_SCPI_POWER_DOMAIN) += scpi_pm_domain.o
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
#include <linux/cpu.h> #include <linux/cpu.h>
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include "power.h"
#define GENPD_RETRY_MAX_MS 250 /* Approximate */ #define GENPD_RETRY_MAX_MS 250 /* Approximate */
#define GENPD_DEV_CALLBACK(genpd, type, callback, dev) \ #define GENPD_DEV_CALLBACK(genpd, type, callback, dev) \
...@@ -3042,38 +3040,6 @@ int of_genpd_parse_idle_states(struct device_node *dn, ...@@ -3042,38 +3040,6 @@ int of_genpd_parse_idle_states(struct device_node *dn,
} }
EXPORT_SYMBOL_GPL(of_genpd_parse_idle_states); EXPORT_SYMBOL_GPL(of_genpd_parse_idle_states);
/**
* pm_genpd_opp_to_performance_state - Gets performance state of the genpd from its OPP node.
*
* @genpd_dev: Genpd's device for which the performance-state needs to be found.
* @opp: struct dev_pm_opp of the OPP for which we need to find performance
* state.
*
* Returns performance state encoded in the OPP of the genpd. This calls
* platform specific genpd->opp_to_performance_state() callback to translate
* power domain OPP to performance state.
*
* Returns performance state on success and 0 on failure.
*/
unsigned int pm_genpd_opp_to_performance_state(struct device *genpd_dev,
struct dev_pm_opp *opp)
{
struct generic_pm_domain *genpd = NULL;
int state;
genpd = container_of(genpd_dev, struct generic_pm_domain, dev);
if (unlikely(!genpd->opp_to_performance_state))
return 0;
genpd_lock(genpd);
state = genpd->opp_to_performance_state(genpd, opp);
genpd_unlock(genpd);
return state;
}
EXPORT_SYMBOL_GPL(pm_genpd_opp_to_performance_state);
static int __init genpd_bus_init(void) static int __init genpd_bus_init(void)
{ {
return bus_register(&genpd_bus_type); return bus_register(&genpd_bus_type);
......
...@@ -49,6 +49,8 @@ static int dev_update_qos_constraint(struct device *dev, void *data) ...@@ -49,6 +49,8 @@ static int dev_update_qos_constraint(struct device *dev, void *data)
/** /**
* default_suspend_ok - Default PM domain governor routine to suspend devices. * default_suspend_ok - Default PM domain governor routine to suspend devices.
* @dev: Device to check. * @dev: Device to check.
*
* Returns: true if OK to suspend, false if not OK to suspend
*/ */
static bool default_suspend_ok(struct device *dev) static bool default_suspend_ok(struct device *dev)
{ {
...@@ -261,6 +263,8 @@ static bool __default_power_down_ok(struct dev_pm_domain *pd, ...@@ -261,6 +263,8 @@ static bool __default_power_down_ok(struct dev_pm_domain *pd,
* @now: current ktime. * @now: current ktime.
* *
* This routine must be executed under the PM domain's lock. * This routine must be executed under the PM domain's lock.
*
* Returns: true if OK to power down, false if not OK to power down
*/ */
static bool _default_power_down_ok(struct dev_pm_domain *pd, ktime_t now) static bool _default_power_down_ok(struct dev_pm_domain *pd, ktime_t now)
{ {
...@@ -406,8 +410,8 @@ struct dev_power_governor simple_qos_governor = { ...@@ -406,8 +410,8 @@ struct dev_power_governor simple_qos_governor = {
.power_down_ok = default_power_down_ok, .power_down_ok = default_power_down_ok,
}; };
/** /*
* pm_genpd_gov_always_on - A governor implementing an always-on policy * pm_domain_always_on_gov - A governor implementing an always-on policy
*/ */
struct dev_power_governor pm_domain_always_on_gov = { struct dev_power_governor pm_domain_always_on_gov = {
.suspend_ok = default_suspend_ok, .suspend_ok = default_suspend_ok,
......
...@@ -212,7 +212,7 @@ static int imx_pgc_power_domain_probe(struct platform_device *pdev) ...@@ -212,7 +212,7 @@ static int imx_pgc_power_domain_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int imx_pgc_power_domain_remove(struct platform_device *pdev) static void imx_pgc_power_domain_remove(struct platform_device *pdev)
{ {
struct imx_pm_domain *domain = pdev->dev.platform_data; struct imx_pm_domain *domain = pdev->dev.platform_data;
...@@ -221,8 +221,6 @@ static int imx_pgc_power_domain_remove(struct platform_device *pdev) ...@@ -221,8 +221,6 @@ static int imx_pgc_power_domain_remove(struct platform_device *pdev)
pm_genpd_remove(&domain->base); pm_genpd_remove(&domain->base);
imx_pgc_put_clocks(domain); imx_pgc_put_clocks(domain);
} }
return 0;
} }
static const struct platform_device_id imx_pgc_power_domain_id[] = { static const struct platform_device_id imx_pgc_power_domain_id[] = {
...@@ -235,7 +233,7 @@ static struct platform_driver imx_pgc_power_domain_driver = { ...@@ -235,7 +233,7 @@ static struct platform_driver imx_pgc_power_domain_driver = {
.name = "imx-pgc-pd", .name = "imx-pgc-pd",
}, },
.probe = imx_pgc_power_domain_probe, .probe = imx_pgc_power_domain_probe,
.remove = imx_pgc_power_domain_remove, .remove_new = imx_pgc_power_domain_remove,
.id_table = imx_pgc_power_domain_id, .id_table = imx_pgc_power_domain_id,
}; };
builtin_platform_driver(imx_pgc_power_domain_driver) builtin_platform_driver(imx_pgc_power_domain_driver)
...@@ -511,7 +509,7 @@ static int imx_gpc_probe(struct platform_device *pdev) ...@@ -511,7 +509,7 @@ static int imx_gpc_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int imx_gpc_remove(struct platform_device *pdev) static void imx_gpc_remove(struct platform_device *pdev)
{ {
struct device_node *pgc_node; struct device_node *pgc_node;
int ret; int ret;
...@@ -521,7 +519,7 @@ static int imx_gpc_remove(struct platform_device *pdev) ...@@ -521,7 +519,7 @@ static int imx_gpc_remove(struct platform_device *pdev)
/* bail out if DT too old and doesn't provide the necessary info */ /* bail out if DT too old and doesn't provide the necessary info */
if (!of_property_read_bool(pdev->dev.of_node, "#power-domain-cells") && if (!of_property_read_bool(pdev->dev.of_node, "#power-domain-cells") &&
!pgc_node) !pgc_node)
return 0; return;
/* /*
* If the old DT binding is used the toplevel driver needs to * If the old DT binding is used the toplevel driver needs to
...@@ -531,16 +529,20 @@ static int imx_gpc_remove(struct platform_device *pdev) ...@@ -531,16 +529,20 @@ static int imx_gpc_remove(struct platform_device *pdev)
of_genpd_del_provider(pdev->dev.of_node); of_genpd_del_provider(pdev->dev.of_node);
ret = pm_genpd_remove(&imx_gpc_domains[GPC_PGC_DOMAIN_PU].base); ret = pm_genpd_remove(&imx_gpc_domains[GPC_PGC_DOMAIN_PU].base);
if (ret) if (ret) {
return ret; dev_err(&pdev->dev, "Failed to remove PU power domain (%pe)\n",
ERR_PTR(ret));
return;
}
imx_pgc_put_clocks(&imx_gpc_domains[GPC_PGC_DOMAIN_PU]); imx_pgc_put_clocks(&imx_gpc_domains[GPC_PGC_DOMAIN_PU]);
ret = pm_genpd_remove(&imx_gpc_domains[GPC_PGC_DOMAIN_ARM].base); ret = pm_genpd_remove(&imx_gpc_domains[GPC_PGC_DOMAIN_ARM].base);
if (ret) if (ret) {
return ret; dev_err(&pdev->dev, "Failed to remove ARM power domain (%pe)\n",
ERR_PTR(ret));
return;
}
} }
return 0;
} }
static struct platform_driver imx_gpc_driver = { static struct platform_driver imx_gpc_driver = {
...@@ -549,6 +551,6 @@ static struct platform_driver imx_gpc_driver = { ...@@ -549,6 +551,6 @@ static struct platform_driver imx_gpc_driver = {
.of_match_table = imx_gpc_dt_ids, .of_match_table = imx_gpc_dt_ids,
}, },
.probe = imx_gpc_probe, .probe = imx_gpc_probe,
.remove = imx_gpc_remove, .remove_new = imx_gpc_remove,
}; };
builtin_platform_driver(imx_gpc_driver) builtin_platform_driver(imx_gpc_driver)
...@@ -1373,7 +1373,7 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) ...@@ -1373,7 +1373,7 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int imx_pgc_domain_remove(struct platform_device *pdev) static void imx_pgc_domain_remove(struct platform_device *pdev)
{ {
struct imx_pgc_domain *domain = pdev->dev.platform_data; struct imx_pgc_domain *domain = pdev->dev.platform_data;
...@@ -1385,8 +1385,6 @@ static int imx_pgc_domain_remove(struct platform_device *pdev) ...@@ -1385,8 +1385,6 @@ static int imx_pgc_domain_remove(struct platform_device *pdev)
domain->bits.map, 0); domain->bits.map, 0);
pm_runtime_disable(domain->dev); pm_runtime_disable(domain->dev);
return 0;
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
...@@ -1430,7 +1428,7 @@ static struct platform_driver imx_pgc_domain_driver = { ...@@ -1430,7 +1428,7 @@ static struct platform_driver imx_pgc_domain_driver = {
.pm = &imx_pgc_domain_pm_ops, .pm = &imx_pgc_domain_pm_ops,
}, },
.probe = imx_pgc_domain_probe, .probe = imx_pgc_domain_probe,
.remove = imx_pgc_domain_remove, .remove_new = imx_pgc_domain_remove,
.id_table = imx_pgc_domain_id, .id_table = imx_pgc_domain_id,
}; };
builtin_platform_driver(imx_pgc_domain_driver) builtin_platform_driver(imx_pgc_domain_driver)
......
...@@ -330,7 +330,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) ...@@ -330,7 +330,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int imx8m_blk_ctrl_remove(struct platform_device *pdev) static void imx8m_blk_ctrl_remove(struct platform_device *pdev)
{ {
struct imx8m_blk_ctrl *bc = dev_get_drvdata(&pdev->dev); struct imx8m_blk_ctrl *bc = dev_get_drvdata(&pdev->dev);
int i; int i;
...@@ -347,8 +347,6 @@ static int imx8m_blk_ctrl_remove(struct platform_device *pdev) ...@@ -347,8 +347,6 @@ static int imx8m_blk_ctrl_remove(struct platform_device *pdev)
dev_pm_genpd_remove_notifier(bc->bus_power_dev); dev_pm_genpd_remove_notifier(bc->bus_power_dev);
dev_pm_domain_detach(bc->bus_power_dev, true); dev_pm_domain_detach(bc->bus_power_dev, true);
return 0;
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
...@@ -888,7 +886,7 @@ MODULE_DEVICE_TABLE(of, imx8m_blk_ctrl_of_match); ...@@ -888,7 +886,7 @@ MODULE_DEVICE_TABLE(of, imx8m_blk_ctrl_of_match);
static struct platform_driver imx8m_blk_ctrl_driver = { static struct platform_driver imx8m_blk_ctrl_driver = {
.probe = imx8m_blk_ctrl_probe, .probe = imx8m_blk_ctrl_probe,
.remove = imx8m_blk_ctrl_remove, .remove_new = imx8m_blk_ctrl_remove,
.driver = { .driver = {
.name = "imx8m-blk-ctrl", .name = "imx8m-blk-ctrl",
.pm = &imx8m_blk_ctrl_pm_ops, .pm = &imx8m_blk_ctrl_pm_ops,
......
...@@ -760,7 +760,7 @@ static int imx8mp_blk_ctrl_probe(struct platform_device *pdev) ...@@ -760,7 +760,7 @@ static int imx8mp_blk_ctrl_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int imx8mp_blk_ctrl_remove(struct platform_device *pdev) static void imx8mp_blk_ctrl_remove(struct platform_device *pdev)
{ {
struct imx8mp_blk_ctrl *bc = dev_get_drvdata(&pdev->dev); struct imx8mp_blk_ctrl *bc = dev_get_drvdata(&pdev->dev);
int i; int i;
...@@ -777,8 +777,6 @@ static int imx8mp_blk_ctrl_remove(struct platform_device *pdev) ...@@ -777,8 +777,6 @@ static int imx8mp_blk_ctrl_remove(struct platform_device *pdev)
dev_pm_genpd_remove_notifier(bc->bus_power_dev); dev_pm_genpd_remove_notifier(bc->bus_power_dev);
dev_pm_domain_detach(bc->bus_power_dev, true); dev_pm_domain_detach(bc->bus_power_dev, true);
return 0;
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
...@@ -856,7 +854,7 @@ MODULE_DEVICE_TABLE(of, imx8mp_blk_ctrl_of_match); ...@@ -856,7 +854,7 @@ MODULE_DEVICE_TABLE(of, imx8mp_blk_ctrl_of_match);
static struct platform_driver imx8mp_blk_ctrl_driver = { static struct platform_driver imx8mp_blk_ctrl_driver = {
.probe = imx8mp_blk_ctrl_probe, .probe = imx8mp_blk_ctrl_probe,
.remove = imx8mp_blk_ctrl_remove, .remove_new = imx8mp_blk_ctrl_remove,
.driver = { .driver = {
.name = "imx8mp-blk-ctrl", .name = "imx8mp-blk-ctrl",
.pm = &imx8mp_blk_ctrl_pm_ops, .pm = &imx8mp_blk_ctrl_pm_ops,
......
...@@ -306,7 +306,7 @@ static int imx93_blk_ctrl_probe(struct platform_device *pdev) ...@@ -306,7 +306,7 @@ static int imx93_blk_ctrl_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int imx93_blk_ctrl_remove(struct platform_device *pdev) static void imx93_blk_ctrl_remove(struct platform_device *pdev)
{ {
struct imx93_blk_ctrl *bc = dev_get_drvdata(&pdev->dev); struct imx93_blk_ctrl *bc = dev_get_drvdata(&pdev->dev);
int i; int i;
...@@ -318,8 +318,6 @@ static int imx93_blk_ctrl_remove(struct platform_device *pdev) ...@@ -318,8 +318,6 @@ static int imx93_blk_ctrl_remove(struct platform_device *pdev)
pm_genpd_remove(&domain->genpd); pm_genpd_remove(&domain->genpd);
} }
return 0;
} }
static const struct imx93_blk_ctrl_domain_data imx93_media_blk_ctl_domain_data[] = { static const struct imx93_blk_ctrl_domain_data imx93_media_blk_ctl_domain_data[] = {
...@@ -438,7 +436,7 @@ MODULE_DEVICE_TABLE(of, imx93_blk_ctrl_of_match); ...@@ -438,7 +436,7 @@ MODULE_DEVICE_TABLE(of, imx93_blk_ctrl_of_match);
static struct platform_driver imx93_blk_ctrl_driver = { static struct platform_driver imx93_blk_ctrl_driver = {
.probe = imx93_blk_ctrl_probe, .probe = imx93_blk_ctrl_probe,
.remove = imx93_blk_ctrl_remove, .remove_new = imx93_blk_ctrl_remove,
.driver = { .driver = {
.name = "imx93-blk-ctrl", .name = "imx93-blk-ctrl",
.of_match_table = imx93_blk_ctrl_of_match, .of_match_table = imx93_blk_ctrl_of_match,
......
...@@ -83,7 +83,7 @@ static int imx93_pd_off(struct generic_pm_domain *genpd) ...@@ -83,7 +83,7 @@ static int imx93_pd_off(struct generic_pm_domain *genpd)
return 0; return 0;
}; };
static int imx93_pd_remove(struct platform_device *pdev) static void imx93_pd_remove(struct platform_device *pdev)
{ {
struct imx93_power_domain *domain = platform_get_drvdata(pdev); struct imx93_power_domain *domain = platform_get_drvdata(pdev);
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
...@@ -94,8 +94,6 @@ static int imx93_pd_remove(struct platform_device *pdev) ...@@ -94,8 +94,6 @@ static int imx93_pd_remove(struct platform_device *pdev)
of_genpd_del_provider(np); of_genpd_del_provider(np);
pm_genpd_remove(&domain->genpd); pm_genpd_remove(&domain->genpd);
return 0;
} }
static int imx93_pd_probe(struct platform_device *pdev) static int imx93_pd_probe(struct platform_device *pdev)
...@@ -167,7 +165,7 @@ static struct platform_driver imx93_power_domain_driver = { ...@@ -167,7 +165,7 @@ static struct platform_driver imx93_power_domain_driver = {
.of_match_table = imx93_pd_ids, .of_match_table = imx93_pd_ids,
}, },
.probe = imx93_pd_probe, .probe = imx93_pd_probe,
.remove = imx93_pd_remove, .remove_new = imx93_pd_remove,
}; };
module_platform_driver(imx93_power_domain_driver); module_platform_driver(imx93_power_domain_driver);
......
...@@ -1712,7 +1712,7 @@ static int cpr_probe(struct platform_device *pdev) ...@@ -1712,7 +1712,7 @@ static int cpr_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int cpr_remove(struct platform_device *pdev) static void cpr_remove(struct platform_device *pdev)
{ {
struct cpr_drv *drv = platform_get_drvdata(pdev); struct cpr_drv *drv = platform_get_drvdata(pdev);
...@@ -1725,8 +1725,6 @@ static int cpr_remove(struct platform_device *pdev) ...@@ -1725,8 +1725,6 @@ static int cpr_remove(struct platform_device *pdev)
pm_genpd_remove(&drv->pd); pm_genpd_remove(&drv->pd);
debugfs_remove_recursive(drv->debugfs); debugfs_remove_recursive(drv->debugfs);
return 0;
} }
static const struct of_device_id cpr_match_table[] = { static const struct of_device_id cpr_match_table[] = {
...@@ -1737,7 +1735,7 @@ MODULE_DEVICE_TABLE(of, cpr_match_table); ...@@ -1737,7 +1735,7 @@ MODULE_DEVICE_TABLE(of, cpr_match_table);
static struct platform_driver cpr_driver = { static struct platform_driver cpr_driver = {
.probe = cpr_probe, .probe = cpr_probe,
.remove = cpr_remove, .remove_new = cpr_remove,
.driver = { .driver = {
.name = "qcom-cpr", .name = "qcom-cpr",
.of_match_table = cpr_match_table, .of_match_table = cpr_match_table,
......
...@@ -598,8 +598,8 @@ static const struct rpmhpd_desc sc8280xp_desc = { ...@@ -598,8 +598,8 @@ static const struct rpmhpd_desc sc8280xp_desc = {
.num_pds = ARRAY_SIZE(sc8280xp_rpmhpds), .num_pds = ARRAY_SIZE(sc8280xp_rpmhpds),
}; };
/* SC8380xp RPMH powerdomains */ /* X1E80100 RPMH powerdomains */
static struct rpmhpd *sc8380xp_rpmhpds[] = { static struct rpmhpd *x1e80100_rpmhpds[] = {
[RPMHPD_CX] = &cx, [RPMHPD_CX] = &cx,
[RPMHPD_CX_AO] = &cx_ao, [RPMHPD_CX_AO] = &cx_ao,
[RPMHPD_EBI] = &ebi, [RPMHPD_EBI] = &ebi,
...@@ -615,9 +615,9 @@ static struct rpmhpd *sc8380xp_rpmhpds[] = { ...@@ -615,9 +615,9 @@ static struct rpmhpd *sc8380xp_rpmhpds[] = {
[RPMHPD_GMXC] = &gmxc, [RPMHPD_GMXC] = &gmxc,
}; };
static const struct rpmhpd_desc sc8380xp_desc = { static const struct rpmhpd_desc x1e80100_desc = {
.rpmhpds = sc8380xp_rpmhpds, .rpmhpds = x1e80100_rpmhpds,
.num_pds = ARRAY_SIZE(sc8380xp_rpmhpds), .num_pds = ARRAY_SIZE(x1e80100_rpmhpds),
}; };
static const struct of_device_id rpmhpd_match_table[] = { static const struct of_device_id rpmhpd_match_table[] = {
...@@ -629,7 +629,6 @@ static const struct of_device_id rpmhpd_match_table[] = { ...@@ -629,7 +629,6 @@ static const struct of_device_id rpmhpd_match_table[] = {
{ .compatible = "qcom,sc7280-rpmhpd", .data = &sc7280_desc }, { .compatible = "qcom,sc7280-rpmhpd", .data = &sc7280_desc },
{ .compatible = "qcom,sc8180x-rpmhpd", .data = &sc8180x_desc }, { .compatible = "qcom,sc8180x-rpmhpd", .data = &sc8180x_desc },
{ .compatible = "qcom,sc8280xp-rpmhpd", .data = &sc8280xp_desc }, { .compatible = "qcom,sc8280xp-rpmhpd", .data = &sc8280xp_desc },
{ .compatible = "qcom,sc8380xp-rpmhpd", .data = &sc8380xp_desc },
{ .compatible = "qcom,sdm670-rpmhpd", .data = &sdm670_desc }, { .compatible = "qcom,sdm670-rpmhpd", .data = &sdm670_desc },
{ .compatible = "qcom,sdm845-rpmhpd", .data = &sdm845_desc }, { .compatible = "qcom,sdm845-rpmhpd", .data = &sdm845_desc },
{ .compatible = "qcom,sdx55-rpmhpd", .data = &sdx55_desc}, { .compatible = "qcom,sdx55-rpmhpd", .data = &sdx55_desc},
...@@ -643,6 +642,7 @@ static const struct of_device_id rpmhpd_match_table[] = { ...@@ -643,6 +642,7 @@ static const struct of_device_id rpmhpd_match_table[] = {
{ .compatible = "qcom,sm8450-rpmhpd", .data = &sm8450_desc }, { .compatible = "qcom,sm8450-rpmhpd", .data = &sm8450_desc },
{ .compatible = "qcom,sm8550-rpmhpd", .data = &sm8550_desc }, { .compatible = "qcom,sm8550-rpmhpd", .data = &sm8550_desc },
{ .compatible = "qcom,sm8650-rpmhpd", .data = &sm8650_desc }, { .compatible = "qcom,sm8650-rpmhpd", .data = &sm8650_desc },
{ .compatible = "qcom,x1e80100-rpmhpd", .data = &x1e80100_desc },
{ } { }
}; };
MODULE_DEVICE_TABLE(of, rpmhpd_match_table); MODULE_DEVICE_TABLE(of, rpmhpd_match_table);
......
...@@ -293,11 +293,9 @@ static int zynqmp_gpd_probe(struct platform_device *pdev) ...@@ -293,11 +293,9 @@ static int zynqmp_gpd_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int zynqmp_gpd_remove(struct platform_device *pdev) static void zynqmp_gpd_remove(struct platform_device *pdev)
{ {
of_genpd_del_provider(pdev->dev.parent->of_node); of_genpd_del_provider(pdev->dev.parent->of_node);
return 0;
} }
static void zynqmp_gpd_sync_state(struct device *dev) static void zynqmp_gpd_sync_state(struct device *dev)
...@@ -315,7 +313,7 @@ static struct platform_driver zynqmp_power_domain_driver = { ...@@ -315,7 +313,7 @@ static struct platform_driver zynqmp_power_domain_driver = {
.sync_state = zynqmp_gpd_sync_state, .sync_state = zynqmp_gpd_sync_state,
}, },
.probe = zynqmp_gpd_probe, .probe = zynqmp_gpd_probe,
.remove = zynqmp_gpd_remove, .remove_new = zynqmp_gpd_remove,
}; };
module_platform_driver(zynqmp_power_domain_driver); module_platform_driver(zynqmp_power_domain_driver);
......
...@@ -10,5 +10,6 @@ ...@@ -10,5 +10,6 @@
#define PWRC_G12A_VPU_ID 0 #define PWRC_G12A_VPU_ID 0
#define PWRC_G12A_ETH_ID 1 #define PWRC_G12A_ETH_ID 1
#define PWRC_G12A_NNA_ID 2 #define PWRC_G12A_NNA_ID 2
#define PWRC_G12A_ISP_ID 3
#endif #endif
...@@ -118,7 +118,6 @@ struct genpd_power_state { ...@@ -118,7 +118,6 @@ struct genpd_power_state {
}; };
struct genpd_lock_ops; struct genpd_lock_ops;
struct dev_pm_opp;
struct opp_table; struct opp_table;
struct generic_pm_domain { struct generic_pm_domain {
...@@ -146,8 +145,6 @@ struct generic_pm_domain { ...@@ -146,8 +145,6 @@ struct generic_pm_domain {
int (*power_on)(struct generic_pm_domain *domain); int (*power_on)(struct generic_pm_domain *domain);
struct raw_notifier_head power_notifiers; /* Power on/off notifiers */ struct raw_notifier_head power_notifiers; /* Power on/off notifiers */
struct opp_table *opp_table; /* OPP table of the genpd */ struct opp_table *opp_table; /* OPP table of the genpd */
unsigned int (*opp_to_performance_state)(struct generic_pm_domain *genpd,
struct dev_pm_opp *opp);
int (*set_performance_state)(struct generic_pm_domain *genpd, int (*set_performance_state)(struct generic_pm_domain *genpd,
unsigned int state); unsigned int state);
struct gpd_dev_ops dev_ops; struct gpd_dev_ops dev_ops;
...@@ -348,8 +345,6 @@ int of_genpd_remove_subdomain(struct of_phandle_args *parent_spec, ...@@ -348,8 +345,6 @@ int of_genpd_remove_subdomain(struct of_phandle_args *parent_spec,
struct generic_pm_domain *of_genpd_remove_last(struct device_node *np); struct generic_pm_domain *of_genpd_remove_last(struct device_node *np);
int of_genpd_parse_idle_states(struct device_node *dn, int of_genpd_parse_idle_states(struct device_node *dn,
struct genpd_power_state **states, int *n); struct genpd_power_state **states, int *n);
unsigned int pm_genpd_opp_to_performance_state(struct device *genpd_dev,
struct dev_pm_opp *opp);
int genpd_dev_pm_attach(struct device *dev); int genpd_dev_pm_attach(struct device *dev);
struct device *genpd_dev_pm_attach_by_id(struct device *dev, struct device *genpd_dev_pm_attach_by_id(struct device *dev,
...@@ -395,13 +390,6 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn, ...@@ -395,13 +390,6 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn,
return -ENODEV; return -ENODEV;
} }
static inline unsigned int
pm_genpd_opp_to_performance_state(struct device *genpd_dev,
struct dev_pm_opp *opp)
{
return 0;
}
static inline int genpd_dev_pm_attach(struct device *dev) static inline int genpd_dev_pm_attach(struct device *dev)
{ {
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment