pmdomain: Merge branch fixes into next

Merge the pmdomain fixes for v6.18-rc[n] into the next branch, to allow
them to get tested together with the new changes that are targeted for
v6.19.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Ulf Hansson 2025-11-24 11:14:36 +01:00
commit 1f67707faf
2 changed files with 16 additions and 3 deletions

View File

@ -984,6 +984,18 @@ static void scpsys_domain_cleanup(struct scpsys *scpsys)
} }
} }
static struct device_node *scpsys_get_legacy_regmap(struct device_node *np, const char *pn)
{
struct device_node *local_node;
for_each_child_of_node(np, local_node) {
if (of_property_present(local_node, pn))
return local_node;
}
return NULL;
}
static int scpsys_get_bus_protection_legacy(struct device *dev, struct scpsys *scpsys) static int scpsys_get_bus_protection_legacy(struct device *dev, struct scpsys *scpsys)
{ {
const u8 bp_blocks[3] = { const u8 bp_blocks[3] = {
@ -1005,7 +1017,7 @@ static int scpsys_get_bus_protection_legacy(struct device *dev, struct scpsys *s
* this makes it then possible to allocate the array of bus_prot * this makes it then possible to allocate the array of bus_prot
* regmaps and convert all to the new style handling. * regmaps and convert all to the new style handling.
*/ */
node = of_find_node_with_property(np, "mediatek,infracfg"); node = scpsys_get_legacy_regmap(np, "mediatek,infracfg");
if (node) { if (node) {
regmap[0] = syscon_regmap_lookup_by_phandle(node, "mediatek,infracfg"); regmap[0] = syscon_regmap_lookup_by_phandle(node, "mediatek,infracfg");
of_node_put(node); of_node_put(node);
@ -1018,7 +1030,7 @@ static int scpsys_get_bus_protection_legacy(struct device *dev, struct scpsys *s
regmap[0] = NULL; regmap[0] = NULL;
} }
node = of_find_node_with_property(np, "mediatek,smi"); node = scpsys_get_legacy_regmap(np, "mediatek,smi");
if (node) { if (node) {
smi_np = of_parse_phandle(node, "mediatek,smi", 0); smi_np = of_parse_phandle(node, "mediatek,smi", 0);
of_node_put(node); of_node_put(node);
@ -1036,7 +1048,7 @@ static int scpsys_get_bus_protection_legacy(struct device *dev, struct scpsys *s
regmap[1] = NULL; regmap[1] = NULL;
} }
node = of_find_node_with_property(np, "mediatek,infracfg-nao"); node = scpsys_get_legacy_regmap(np, "mediatek,infracfg-nao");
if (node) { if (node) {
regmap[2] = syscon_regmap_lookup_by_phandle(node, "mediatek,infracfg-nao"); regmap[2] = syscon_regmap_lookup_by_phandle(node, "mediatek,infracfg-nao");
num_regmaps++; num_regmaps++;

View File

@ -184,6 +184,7 @@ tegra_powergate_add(struct tegra_bpmp *bpmp,
powergate->genpd.name = kstrdup(info->name, GFP_KERNEL); powergate->genpd.name = kstrdup(info->name, GFP_KERNEL);
powergate->genpd.power_on = tegra_powergate_power_on; powergate->genpd.power_on = tegra_powergate_power_on;
powergate->genpd.power_off = tegra_powergate_power_off; powergate->genpd.power_off = tegra_powergate_power_off;
powergate->genpd.flags = GENPD_FLAG_NO_STAY_ON;
err = pm_genpd_init(&powergate->genpd, NULL, off); err = pm_genpd_init(&powergate->genpd, NULL, off);
if (err < 0) { if (err < 0) {