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

clk: berlin: drop direct of_iomap of nodes reg property

The Berlin clock driver was sharing a DT node with the pin controller
and the reset driver. All these devices are now sub-nodes of the chip
controller. This patch rework the Berlin clock driver to allow moving
the Berlin clock DT bindings into their own sub-node of the chip
controller node.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>

authored by

Antoine Tenart and committed by
Sebastian Hesselbarth
fd26031b a457b86c

+3 -15
+1 -8
drivers/clk/berlin/bg2.c
··· 508 508 u8 avpll_flags = 0; 509 509 int n; 510 510 511 - if (of_device_is_compatible(parent_np, "syscon")) 512 - np = parent_np; 513 - 514 - gbase = of_iomap(np, 0); 511 + gbase = of_iomap(parent_np, 0); 515 512 if (!gbase) 516 513 return; 517 514 ··· 686 689 bg2_fail: 687 690 iounmap(gbase); 688 691 } 689 - CLK_OF_DECLARE(berlin2_clock, "marvell,berlin2-chip-ctrl", 690 - berlin2_clock_setup); 691 - CLK_OF_DECLARE(berlin2cd_clock, "marvell,berlin2cd-chip-ctrl", 692 - berlin2_clock_setup); 693 692 CLK_OF_DECLARE(berlin2_clk, "marvell,berlin2-clk", 694 693 berlin2_clock_setup);
+2 -7
drivers/clk/berlin/bg2q.c
··· 295 295 struct clk *clk; 296 296 int n; 297 297 298 - if (of_device_is_compatible(parent_np, "syscon")) 299 - np = parent_np; 300 - 301 - gbase = of_iomap(np, 0); 298 + gbase = of_iomap(parent_np, 0); 302 299 if (!gbase) { 303 300 pr_err("%s: Unable to map global base\n", np->full_name); 304 301 return; 305 302 } 306 303 307 304 /* BG2Q CPU PLL is not part of global registers */ 308 - cpupll_base = of_iomap(np, 1); 305 + cpupll_base = of_iomap(parent_np, 1); 309 306 if (!cpupll_base) { 310 307 pr_err("%s: Unable to map cpupll base\n", np->full_name); 311 308 iounmap(gbase); ··· 385 388 iounmap(cpupll_base); 386 389 iounmap(gbase); 387 390 } 388 - CLK_OF_DECLARE(berlin2q_clock, "marvell,berlin2q-chip-ctrl", 389 - berlin2q_clock_setup); 390 391 CLK_OF_DECLARE(berlin2q_clk, "marvell,berlin2q-clk", 391 392 berlin2q_clock_setup);