Thread (15 messages) 15 messages, 3 authors, 2021-11-22

Re: [PATCH 5/6] clk: samsung: exynos850: Register clocks early

From: Sylwester Nawrocki <s.nawrocki@samsung.com>
Date: 2021-11-22 10:00:45
Also in: linux-clk, linux-devicetree, linux-samsung-soc, lkml

On 22.11.2021 00:27, Sam Protsenko wrote:
quoted hunk ↗ jump to hunk
/* Register Offset definitions for CMU_CORE (0x12000000) */
@@ -1014,24 +1060,12 @@ static int __init exynos850_cmu_probe(struct platform_device *pdev)
 {
 	const struct samsung_cmu_info *info;
 	struct device *dev = &pdev->dev;
-	struct device_node *np = dev->of_node;
 
 	info = of_device_get_match_data(dev);
-	exynos850_init_clocks(np, info->clk_regs, info->nr_clk_regs);
-	samsung_cmu_register_one(np, info);
 
-	/* Keep bus clock running, so it's possible to access CMU registers */
-	if (info->clk_name) {
-		struct clk *bus_clk;
-
-		bus_clk = clk_get(dev, info->clk_name);
-		if (IS_ERR(bus_clk)) {
-			pr_err("%s: could not find bus clock %s; err = %ld\n",
-			       __func__, info->clk_name, PTR_ERR(bus_clk));
-		} else {
-			clk_prepare_enable(bus_clk);
-		}
-	}
+	/* Early clocks are already registered using CLK_OF_DECLARE_DRIVER() */
+	if (info != &peri_cmu_info)
+		exynos850_register_cmu(dev, dev->of_node, info);
 
Do you still need this test? How about just removing "samsung,exynos850-cmu-peri"
from exynos850_cmu_of_match[] ?

-- 
Regards,
Sylwester

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help