diff options
| author | Ulf Hansson <ulfh@kernel.org> | 2026-09-23 14:13:30 +0200 |
|---|---|---|
| committer | Ulf Hansson <ulfh@kernel.org> | 2026-09-23 14:13:30 +0200 |
| commit | c533c3cbbc4609084464d9749c0c5b5e3824de00 (patch) | |
| tree | fd1068a899651c79642e1d9e048601d1fbcf7b55 /drivers/pmdomain | |
| parent | 38f9175fc8bd6228768ed3903a1f67d9e902de05 (diff) | |
| parent | 51c2db3ef0cb89a49ab7f47a40efd5d5b074ce8d (diff) | |
| download | linux-next-c533c3cbbc4609084464d9749c0c5b5e3824de00.tar.gz linux-next-c533c3cbbc4609084464d9749c0c5b5e3824de00.zip | |
pmdomain: Merge branch fixes into next
Merge the pmdomain fixes for v7.3-rc[n] into the next branch, to allow
them to get tested together with the pmdomain changes that are targeted
for the next release.
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
Diffstat (limited to 'drivers/pmdomain')
| -rw-r--r-- | drivers/pmdomain/imx/imx8m-blk-ctrl.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/pmdomain/imx/imx8m-blk-ctrl.c b/drivers/pmdomain/imx/imx8m-blk-ctrl.c index fe083b1e7251..14fb969bba28 100644 --- a/drivers/pmdomain/imx/imx8m-blk-ctrl.c +++ b/drivers/pmdomain/imx/imx8m-blk-ctrl.c @@ -15,6 +15,7 @@ #include <linux/pm_runtime.h> #include <linux/regmap.h> #include <linux/clk.h> +#include <linux/mutex.h> #include <dt-bindings/power/imx8mm-power.h> #include <dt-bindings/power/imx8mn-power.h> @@ -34,6 +35,12 @@ struct imx8m_blk_ctrl { struct regmap *regmap; struct imx8m_blk_ctrl_domain *domains; struct genpd_onecell_data onecell_data; + /* + * Serializes the blk-ctrl reset/clock sequence across sibling domains; + * their transitions interact through the shared VPUMIX bus domain, + * VPU_NOC and the not-ack-verified ADB400 handshake (ERR050531). + */ + struct mutex power_lock; }; struct imx8m_blk_ctrl_domain_data { @@ -98,6 +105,8 @@ static int imx8m_blk_ctrl_power_on(struct generic_pm_domain *genpd) struct imx8m_blk_ctrl *bc = domain->bc; int ret; + guard(mutex)(&bc->power_lock); + /* make sure bus domain is awake */ ret = pm_runtime_resume_and_get(bc->bus_power_dev); if (ret < 0) { @@ -163,6 +172,8 @@ static int imx8m_blk_ctrl_power_off(struct generic_pm_domain *genpd) const struct imx8m_blk_ctrl_domain_data *data = domain->data; struct imx8m_blk_ctrl *bc = domain->bc; + guard(mutex)(&bc->power_lock); + /* put devices into reset and disable clocks */ if (data->mipi_phy_rst_mask) regmap_clear_bits(bc->regmap, BLK_MIPI_RESET_DIV, data->mipi_phy_rst_mask); @@ -201,6 +212,10 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) bc->dev = dev; + ret = devm_mutex_init(dev, &bc->power_lock); + if (ret) + return ret; + bc_data = of_device_get_match_data(dev); base = devm_platform_ioremap_resource(pdev, 0); |
