Lines Matching +full:4 +full:- +full:cpu
1 // SPDX-License-Identifier: GPL-2.0
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
15 #include <linux/clk-provider.h>
24 * Kirkwood PLL sample-at-reset configuration
27 * SAR0[4:3,22,1] : CPU frequency (6281,6292,6282)
28 * 4 = 600 MHz
38 * SAR0[19,10:9] : CPU to L2 Clock divider ratio (6281,6292,6282)
39 * 1 = (1/2) * CPU
40 * 3 = (1/3) * CPU
41 * 5 = (1/4) * CPU
44 * SAR0[8:5] : CPU to DDR DRAM Clock divider ratio (6281,6292,6282)
45 * 2 = (1/2) * CPU
46 * 4 = (1/3) * CPU
47 * 6 = (1/4) * CPU
48 * 7 = (2/9) * CPU
49 * 8 = (1/5) * CPU
50 * 9 = (1/6) * CPU
53 * SAR0[4:2] : Kirkwood 6180 cpu/l2/ddr clock configuration (6180 only)
54 * 5 = [CPU = 600 MHz, L2 = (1/2) * CPU, DDR = 200 MHz = (1/3) * CPU]
55 * 6 = [CPU = 800 MHz, L2 = (1/2) * CPU, DDR = 200 MHz = (1/4) * CPU]
56 * 7 = [CPU = 1000 MHz, L2 = (1/2) * CPU, DDR = 200 MHz = (1/5) * CPU]
116 { 0, 1 }, { 1, 4 }, { 0, 1 }, { 0, 1 }
121 { 1, 3 }, { 0, 1 }, { 1, 4 }, { 2, 9 },
163 { 0, 1 }, { 1, 3 }, { 1, 4 }, { 1, 5 }
172 /* mv88f6180 has a fixed 1:2 CPU-to-L2 ratio */ in mv88f6180_get_clk_ratio()
225 { "sdio", NULL, 4, 0 },
277 if (clkspec->args_count < 1) in clk_muxing_get_src()
278 return ERR_PTR(-EINVAL); in clk_muxing_get_src()
280 for (n = 0; n < ctrl->num_muxes; n++) { in clk_muxing_get_src()
282 to_clk_mux(__clk_get_hw(ctrl->muxes[n])); in clk_muxing_get_src()
283 if (clkspec->args[0] == mux->shift) in clk_muxing_get_src()
284 return ctrl->muxes[n]; in clk_muxing_get_src()
286 return ERR_PTR(-ENODEV); in clk_muxing_get_src()
305 ctrl->lock = &ctrl_gating_lock; in kirkwood_clk_muxing_setup()
311 ctrl->num_muxes = n; in kirkwood_clk_muxing_setup()
312 ctrl->muxes = kcalloc(ctrl->num_muxes, sizeof(struct clk *), in kirkwood_clk_muxing_setup()
314 if (WARN_ON(!ctrl->muxes)) in kirkwood_clk_muxing_setup()
317 for (n = 0; n < ctrl->num_muxes; n++) { in kirkwood_clk_muxing_setup()
318 ctrl->muxes[n] = clk_register_mux(NULL, desc[n].name, in kirkwood_clk_muxing_setup()
321 desc[n].width, desc[n].flags, ctrl->lock); in kirkwood_clk_muxing_setup()
322 WARN_ON(IS_ERR(ctrl->muxes[n])); in kirkwood_clk_muxing_setup()
337 of_find_compatible_node(NULL, NULL, "marvell,kirkwood-gating-clock"); in kirkwood_clk_init()
340 if (of_device_is_compatible(np, "marvell,mv88f6180-core-clock")) in kirkwood_clk_init()
342 else if (of_device_is_compatible(np, "marvell,mv98dx1135-core-clock")) in kirkwood_clk_init()
354 CLK_OF_DECLARE(kirkwood_clk, "marvell,kirkwood-core-clock",
356 CLK_OF_DECLARE(mv88f6180_clk, "marvell,mv88f6180-core-clock",
358 CLK_OF_DECLARE(98dx1135_clk, "marvell,mv98dx1135-core-clock",