summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2024-10-14 08:14:46 -0600
committerTom Rini <[email protected]>2024-10-14 08:14:46 -0600
commitc676fc371073c5e3cc7fcc0c48035fa3addf36c5 (patch)
tree1e6a40dedc8dc190e4b44b0d361062b1f6551fff /drivers/power
parente87c5dfbaa8e13d1168b502c5264f070a8b38d90 (diff)
parent315cad97a5ae09b1b975fff2413ce785b3b8592a (diff)
Merge tag 'u-boot-amlogic-next-20241014' of https://source.denx.de/u-boot/custodians/u-boot-amlogic
- Add Libre Computer boards into proper libre-computer board directory - Add new Boards: - Libre Computer aml-s905d3-cc - Libre Computer aml-a311d-cc - Add capsule update to libretech-ac and the new boards since they have an onboard SPI nor flash - Fix HDMI support after sync to v6.11 and regulator enable from Marek - Fix khadas-vim3 android config for android-mainline kernel - Disable meson64 boot targets when configs are not eavailable
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/domain/meson-ee-pwrc.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/power/domain/meson-ee-pwrc.c b/drivers/power/domain/meson-ee-pwrc.c
index 20e9f32b381..4d9f3bba644 100644
--- a/drivers/power/domain/meson-ee-pwrc.c
+++ b/drivers/power/domain/meson-ee-pwrc.c
@@ -60,6 +60,7 @@ struct meson_ee_pwrc_domain_desc {
unsigned int mem_pd_count;
struct meson_ee_pwrc_mem_domain *mem_pd;
bool (*get_power)(struct power_domain *power_domain);
+ bool enabled;
};
struct meson_ee_pwrc_domain_data {
@@ -306,6 +307,8 @@ static int meson_ee_pwrc_off(struct power_domain *power_domain)
clk_disable_bulk(&priv->clks);
}
+ pwrc_domain->enabled = false;
+
return 0;
}
@@ -317,6 +320,9 @@ static int meson_ee_pwrc_on(struct power_domain *power_domain)
pwrc_domain = &priv->data->domains[power_domain->id];
+ if (pwrc_domain->enabled)
+ return 0;
+
if (pwrc_domain->top_pd)
regmap_update_bits(priv->regmap_ao,
pwrc_domain->top_pd->sleep_reg,
@@ -347,8 +353,13 @@ static int meson_ee_pwrc_on(struct power_domain *power_domain)
return ret;
}
- if (pwrc_domain->clk_names_count)
- return clk_enable_bulk(&priv->clks);
+ if (pwrc_domain->clk_names_count) {
+ ret = clk_enable_bulk(&priv->clks);
+ if (ret)
+ return ret;
+ }
+
+ pwrc_domain->enabled = true;
return 0;
}