Enable the optional ahb-msi-lite0 and mbus-msi-lite0 bus fabric clocks when provided in the A733 GMAC210 device tree node so the shared MSI-Lite0 fabric remains clocked during clk_disable_unused() without marking the gates CLK_IS_CRITICAL in the CCU driver. Assisted-by: LLM Signed-off-by: Alastair D'Silva --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c index e311d5fccfbb..648e2f9a1b0d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -77,10 +78,23 @@ static const struct regmap_config sun60i_a733_regmap_cfg = { static int sun60i_gmac210_init_resources(struct platform_device *pdev, struct sun55i_gmac *gmac) { + static const char * const msi_clks[] = { + "ahb-msi-lite0", + "mbus-msi-lite0", + }; struct device *dev = &pdev->dev; struct reset_control *ahb_reset; void __iomem *base; + for (unsigned int i = 0; i < ARRAY_SIZE(msi_clks); i++) { + struct clk *clk = devm_clk_get_optional_enabled(dev, msi_clks[i]); + + if (IS_ERR(clk)) + return dev_err_probe(dev, PTR_ERR(clk), + "Failed to enable %s clock\n", + msi_clks[i]); + } + /* * Get the configuration region out of reset before changing it. * stmmac core holds the same shared reset but only deasserts it later. -- 2.53.0