Skip to content

Commit 9731fa4

Browse files
committed
Merge tag 'pmdomain-v6.19-rc3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm
Pull pmdomain fixes from Ulf Hansson: - imx: Remove incorrect reset/clock mask for 8mq vpu - rockchip: Fix initial state of PM domain * tag 'pmdomain-v6.19-rc3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: pmdomain:rockchip: Fix init genpd as GENPD_STATE_ON before regulator ready pmdomain: imx8m-blk-ctrl: Remove separate rst and clk mask for 8mq vpu
2 parents d4be90c + 861d21c commit 9731fa4

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

drivers/pmdomain/imx/imx8m-blk-ctrl.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -846,22 +846,25 @@ static int imx8mq_vpu_power_notifier(struct notifier_block *nb,
846846
return NOTIFY_OK;
847847
}
848848

849+
/*
850+
* For i.MX8MQ, the ADB in the VPUMIX domain has no separate reset and clock
851+
* enable bits, but is ungated and reset together with the VPUs.
852+
* Resetting G1 or G2 separately may led to system hang.
853+
* Remove the rst_mask and clk_mask from the domain data of G1 and G2,
854+
* Let imx8mq_vpu_power_notifier() do really vpu reset.
855+
*/
849856
static const struct imx8m_blk_ctrl_domain_data imx8mq_vpu_blk_ctl_domain_data[] = {
850857
[IMX8MQ_VPUBLK_PD_G1] = {
851858
.name = "vpublk-g1",
852859
.clk_names = (const char *[]){ "g1", },
853860
.num_clks = 1,
854861
.gpc_name = "g1",
855-
.rst_mask = BIT(1),
856-
.clk_mask = BIT(1),
857862
},
858863
[IMX8MQ_VPUBLK_PD_G2] = {
859864
.name = "vpublk-g2",
860865
.clk_names = (const char *[]){ "g2", },
861866
.num_clks = 1,
862867
.gpc_name = "g2",
863-
.rst_mask = BIT(0),
864-
.clk_mask = BIT(0),
865868
},
866869
};
867870

drivers/pmdomain/rockchip/pm-domains.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,16 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
879879
pd->genpd.name = pd->info->name;
880880
else
881881
pd->genpd.name = kbasename(node->full_name);
882+
883+
/*
884+
* power domain's needing a regulator should default to off, since
885+
* the regulator state is unknown at probe time. Also the regulator
886+
* state cannot be checked, since that usually requires IP needing
887+
* (a different) power domain.
888+
*/
889+
if (pd->info->need_regulator)
890+
rockchip_pd_power(pd, false);
891+
882892
pd->genpd.power_off = rockchip_pd_power_off;
883893
pd->genpd.power_on = rockchip_pd_power_on;
884894
pd->genpd.attach_dev = rockchip_pd_attach_dev;

0 commit comments

Comments
 (0)