Lines Matching +full:clkout +full:- +full:clock

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Clock definitions for u8500 platform.
5 * Copyright (C) 2012 ST-Ericsson SA
11 #include <linux/clk-provider.h>
12 #include <linux/mfd/dbx500-prcmu.h>
16 #include "reset-prcc.h"
35 if (clkspec->args_count != 2) in ux500_twocell_get()
36 return ERR_PTR(-EINVAL); in ux500_twocell_get()
38 base = clkspec->args[0]; in ux500_twocell_get()
39 bit = clkspec->args[1]; in ux500_twocell_get()
43 return ERR_PTR(-EINVAL); in ux500_twocell_get()
78 struct clk_hw *clkout; in ux500_clkout_get() local
80 if (clkspec->args_count != 3) in ux500_clkout_get()
81 return ERR_PTR(-EINVAL); in ux500_clkout_get()
83 id = clkspec->args[0]; in ux500_clkout_get()
84 source = clkspec->args[1]; in ux500_clkout_get()
85 divider = clkspec->args[2]; in ux500_clkout_get()
88 pr_err("%s: invalid clkout ID %d\n", __func__, id); in ux500_clkout_get()
89 return ERR_PTR(-EINVAL); in ux500_clkout_get()
93 pr_info("%s: clkout%d already registered, not reconfiguring\n", in ux500_clkout_get()
100 return ERR_PTR(-EINVAL); in ux500_clkout_get()
105 return ERR_PTR(-EINVAL); in ux500_clkout_get()
108 pr_debug("registering clkout%d with source %d and divider %d\n", in ux500_clkout_get()
111 clkout = clk_reg_prcmu_clkout(id ? "clkout2" : "clkout1", in ux500_clkout_get()
115 if (IS_ERR(clkout)) { in ux500_clkout_get()
116 pr_err("failed to register clkout%d\n", id + 1); in ux500_clkout_get()
117 return ERR_CAST(clkout); in ux500_clkout_get()
120 clkout_clk[id] = clkout; in ux500_clkout_get()
122 return clkout; in ux500_clkout_get()
152 rstc->phy_base[i] = r.start; in u8500_clk_init()
155 /* Clock sources */ in u8500_clk_init()
169 * Read-only clocks that only return their current rate, only used in u8500_clk_init()
171 * clk38m_to_clkgen is the same as the SYSCLK, i.e. the root clock. in u8500_clk_init()
187 switch (fw_version->project) { in u8500_clk_init()
302 /* PRCC P-clocks */ in u8500_clk_init()
479 /* PRCC K-clocks in u8500_clk_init()
482 * by enabling just the K-clock, even if it is not a valid parent to in u8500_clk_init()
483 * the K-clock. Until drivers get fixed we might need some kind of in u8500_clk_init()
595 if (of_node_name_eq(child, "prcmu-clock")) in u8500_clk_init()
599 if (of_node_name_eq(child, "clkout-clock")) in u8500_clk_init()
602 if (of_node_name_eq(child, "prcc-periph-clock")) in u8500_clk_init()
605 if (of_node_name_eq(child, "prcc-kernel-clock")) in u8500_clk_init()
608 if (of_node_name_eq(child, "rtc32k-clock")) in u8500_clk_init()
611 if (of_node_name_eq(child, "smp-twd-clock")) in u8500_clk_init()
614 if (of_node_name_eq(child, "prcc-reset-controller")) in u8500_clk_init()
618 CLK_OF_DECLARE(u8500_clks, "stericsson,u8500-clks", u8500_clk_init);