Patch "soc: mtk-pm-domains: do not register smi node as syscon" has been added to the 5.13-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    soc: mtk-pm-domains: do not register smi node as syscon

to the 5.13-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     soc-mtk-pm-domains-do-not-register-smi-node-as-sysco.patch
and it can be found in the queue-5.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit bcc7303b619118cc79c59cdf78345ab1696ca8dd
Author: Hsin-Yi Wang <hsinyi@xxxxxxxxxxxx>
Date:   Tue Jun 1 11:59:04 2021 +0800

    soc: mtk-pm-domains: do not register smi node as syscon
    
    [ Upstream commit eed6ff1bb2da65067d928f4ab322c7d75f944fa4 ]
    
    Mediatek requires mmsys clocks to be unprepared during suspend,
    otherwise system has chances to hang.
    
    syscon_regmap_lookup_by_phandle_optional() will attach and prepare the
    first clock in smi node, leading to additional prepare to the clock
    which is not balanced with the prepare/unprepare pair in resume/suspend
    callbacks.
    
    If a power domain node requests an smi node and the smi node's first
    clock is an mmsys clock, it will results in an unstable suspend resume.
    
    Fixes: f414854c8843 ("soc: mediatek: pm-domains: Add SMI block as bus protection block")
    Signed-off-by: Hsin-Yi Wang <hsinyi@xxxxxxxxxxxx>
    Reviewed-by: chun-jie.chen <chun-jie.chen@xxxxxxxxxxxx>
    Reviewed-by: Enric Balletbo i Serra <enric.balletbo@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210601035905.2970384-2-hsinyi@xxxxxxxxxxxx
    Signed-off-by: Matthias Brugger <matthias.bgg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/soc/mediatek/mtk-pm-domains.c b/drivers/soc/mediatek/mtk-pm-domains.c
index 0af00efa0ef8..22fa52f0e86e 100644
--- a/drivers/soc/mediatek/mtk-pm-domains.c
+++ b/drivers/soc/mediatek/mtk-pm-domains.c
@@ -297,6 +297,7 @@ generic_pm_domain *scpsys_add_one_domain(struct scpsys *scpsys, struct device_no
 	const struct scpsys_domain_data *domain_data;
 	struct scpsys_domain *pd;
 	struct device_node *root_node = scpsys->dev->of_node;
+	struct device_node *smi_node;
 	struct property *prop;
 	const char *clk_name;
 	int i, ret, num_clks;
@@ -352,9 +353,13 @@ generic_pm_domain *scpsys_add_one_domain(struct scpsys *scpsys, struct device_no
 	if (IS_ERR(pd->infracfg))
 		return ERR_CAST(pd->infracfg);
 
-	pd->smi = syscon_regmap_lookup_by_phandle_optional(node, "mediatek,smi");
-	if (IS_ERR(pd->smi))
-		return ERR_CAST(pd->smi);
+	smi_node = of_parse_phandle(node, "mediatek,smi", 0);
+	if (smi_node) {
+		pd->smi = device_node_to_regmap(smi_node);
+		of_node_put(smi_node);
+		if (IS_ERR(pd->smi))
+			return ERR_CAST(pd->smi);
+	}
 
 	num_clks = of_clk_get_parent_count(node);
 	if (num_clks > 0) {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux