Merge tag 'genpd-v6.5-rc1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh...
authorNeil Armstrong <neil.armstrong@linaro.org>
Mon, 31 Jul 2023 09:53:09 +0000 (11:53 +0200)
committerNeil Armstrong <neil.armstrong@linaro.org>
Mon, 31 Jul 2023 09:53:09 +0000 (11:53 +0200)
Create the new genpd subsystem and start moving 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, this creates a new subsystem
(drivers/genpd) and moves some of the soc/platform specific providers in
here.

1  2 
drivers/genpd/amlogic/meson-secure-pwrc.c

@@@ -11,7 -11,6 +11,7 @@@
  #include <linux/platform_device.h>
  #include <linux/pm_domain.h>
  #include <dt-bindings/power/meson-a1-power.h>
 +#include <dt-bindings/power/amlogic,c3-pwrc.h>
  #include <dt-bindings/power/meson-s4-power.h>
  #include <linux/arm-smccc.h>
  #include <linux/firmware/meson/meson_sm.h>
@@@ -121,22 -120,6 +121,22 @@@ static struct meson_secure_pwrc_domain_
        SEC_PD(RSA,     0),
  };
  
 +static struct meson_secure_pwrc_domain_desc c3_pwrc_domains[] = {
 +      SEC_PD(C3_NNA,  0),
 +      SEC_PD(C3_AUDIO,        GENPD_FLAG_ALWAYS_ON),
 +      SEC_PD(C3_SDIOA,        GENPD_FLAG_ALWAYS_ON),
 +      SEC_PD(C3_EMMC, GENPD_FLAG_ALWAYS_ON),
 +      SEC_PD(C3_USB_COMB, GENPD_FLAG_ALWAYS_ON),
 +      SEC_PD(C3_SDCARD,       GENPD_FLAG_ALWAYS_ON),
 +      SEC_PD(C3_ETH,  GENPD_FLAG_ALWAYS_ON),
 +      SEC_PD(C3_GE2D, GENPD_FLAG_ALWAYS_ON),
 +      SEC_PD(C3_CVE,  GENPD_FLAG_ALWAYS_ON),
 +      SEC_PD(C3_GDC_WRAP,     GENPD_FLAG_ALWAYS_ON),
 +      SEC_PD(C3_ISP_TOP,              GENPD_FLAG_ALWAYS_ON),
 +      SEC_PD(C3_MIPI_ISP_WRAP, GENPD_FLAG_ALWAYS_ON),
 +      SEC_PD(C3_VCODEC,       0),
 +};
 +
  static struct meson_secure_pwrc_domain_desc s4_pwrc_domains[] = {
        SEC_PD(S4_DOS_HEVC,     0),
        SEC_PD(S4_DOS_VDEC,     0),
@@@ -196,7 -179,7 +196,7 @@@ static int meson_secure_pwrc_probe(stru
        for (i = 0 ; i < match->count ; ++i) {
                struct meson_secure_pwrc_domain *dom = &pwrc->domains[i];
  
 -              if (!match->domains[i].index)
 +              if (!match->domains[i].name)
                        continue;
  
                dom->pwrc = pwrc;
@@@ -219,11 -202,6 +219,11 @@@ static struct meson_secure_pwrc_domain_
        .count = ARRAY_SIZE(a1_pwrc_domains),
  };
  
 +static struct meson_secure_pwrc_domain_data amlogic_secure_c3_pwrc_data = {
 +      .domains = c3_pwrc_domains,
 +      .count = ARRAY_SIZE(c3_pwrc_domains),
 +};
 +
  static struct meson_secure_pwrc_domain_data meson_secure_s4_pwrc_data = {
        .domains = s4_pwrc_domains,
        .count = ARRAY_SIZE(s4_pwrc_domains),
@@@ -235,10 -213,6 +235,10 @@@ static const struct of_device_id meson_
                .data = &meson_secure_a1_pwrc_data,
        },
        {
 +              .compatible = "amlogic,c3-pwrc",
 +              .data = &amlogic_secure_c3_pwrc_data,
 +      },
 +      {
                .compatible = "amlogic,meson-s4-pwrc",
                .data = &meson_secure_s4_pwrc_data,
        },