diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2023-03-01 16:07:23 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-03-07 10:39:30 +0100 |
commit | 8e544cd9cfd66ff6062490265644d6b232c41cac (patch) | |
tree | 376b1fca4df0fd59d1bee488607584ebf47915a6 /include/pm_domain.h | |
parent | e030c62af45f70d66a3a085555b4fb80b6169791 (diff) | |
download | barebox-8e544cd9cfd66ff6062490265644d6b232c41cac.tar.gz barebox-8e544cd9cfd66ff6062490265644d6b232c41cac.tar.xz |
pm_domains: Enable explicitly when we have power-domain providers
Many SoCs provide power-domains in their device trees. In barebox
we most of the time do not have drivers for the power-domains. This
is no problem for most of the time as the necessary power domains
are either default on or enabled during early SoC init.
With multi-arch support it can happen that we compile in SoCs for
which we do not have power-domain drivers and other SoCs where we
need a power-domain driver. The example I stumbled upon is the
i.MX7 on the one hand which has a driver and OMAP on the other hand
which has power-domains described in the device tree for which
we do not have (and do not currently need) a driver.
To be able to handle both situations let's enable pm_domain support
explicitly on SoCs we know we have a driver for.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/pm_domain.h')
-rw-r--r-- | include/pm_domain.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/pm_domain.h b/include/pm_domain.h index fac7f99227..d297053531 100644 --- a/include/pm_domain.h +++ b/include/pm_domain.h @@ -23,6 +23,8 @@ typedef struct generic_pm_domain *(*genpd_xlate_t)(struct of_phandle_args *args, #ifdef CONFIG_PM_GENERIC_DOMAINS +void genpd_activate(void); + int genpd_dev_pm_attach(struct device *dev); /** @@ -58,6 +60,10 @@ void pm_genpd_print(void); #else +static inline void genpd_activate(void) +{ +} + static inline int pm_genpd_init(struct generic_pm_domain *genpd, void *gov, bool is_off) { |