Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

PM / devfreq: rk3399_dmc: Block PMU during transitions

See the previous patch ("soc: rockchip: power-domain: Manage resource
conflicts with firmware") for a thorough explanation of the conflicts.
While ARM Trusted Firmware may be modifying memory controller and
power-domain states, we need to block the kernel's power-domain driver.

If the power-domain driver is disabled, there is no resource conflict
and this becomes a no-op.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Brian Norris and committed by
Chanwoo Choi
2e691421 defec178

+13
+13
drivers/devfreq/rk3399_dmc.c
··· 21 21 #include <linux/rwsem.h> 22 22 #include <linux/suspend.h> 23 23 24 + #include <soc/rockchip/pm_domains.h> 24 25 #include <soc/rockchip/rk3399_grf.h> 25 26 #include <soc/rockchip/rockchip_sip.h> 26 27 ··· 93 92 return 0; 94 93 95 94 mutex_lock(&dmcfreq->lock); 95 + 96 + /* 97 + * Ensure power-domain transitions don't interfere with ARM Trusted 98 + * Firmware power-domain idling. 99 + */ 100 + err = rockchip_pmu_block(); 101 + if (err) { 102 + dev_err(dev, "Failed to block PMU: %d\n", err); 103 + goto out_unlock; 104 + } 96 105 97 106 /* 98 107 * Some idle parameters may be based on the DDR controller clock, which ··· 209 198 dmcfreq->volt = target_volt; 210 199 211 200 out: 201 + rockchip_pmu_unblock(); 202 + out_unlock: 212 203 mutex_unlock(&dmcfreq->lock); 213 204 return err; 214 205 }