Lines Matching refs:hw

35 	struct clk_hw hw;  member
39 #define to_pllclk(_hw) container_of(_hw, struct clk_pll, hw)
42 struct clk_hw hw; member
47 #define to_dmnclk(_hw) container_of(_hw, struct clk_dmn, hw)
50 struct clk_hw hw; member
54 #define to_stdclk(_hw) container_of(_hw, struct clk_std, hw)
56 static int std_clk_is_enabled(struct clk_hw *hw);
57 static int std_clk_enable(struct clk_hw *hw);
58 static void std_clk_disable(struct clk_hw *hw);
74 static unsigned long pll_clk_recalc_rate(struct clk_hw *hw, in pll_clk_recalc_rate() argument
78 struct clk_pll *clk = to_pllclk(hw); in pll_clk_recalc_rate()
96 static long pll_clk_round_rate(struct clk_hw *hw, unsigned long rate, in pll_clk_round_rate() argument
127 static int pll_clk_set_rate(struct clk_hw *hw, unsigned long rate, in pll_clk_set_rate() argument
130 struct clk_pll *clk = to_pllclk(hw); in pll_clk_set_rate()
163 static long cpu_clk_round_rate(struct clk_hw *hw, unsigned long rate, in cpu_clk_round_rate() argument
170 struct clk_hw *parent_clk = clk_hw_get_parent(hw); in cpu_clk_round_rate()
176 static unsigned long cpu_clk_recalc_rate(struct clk_hw *hw, in cpu_clk_recalc_rate() argument
183 struct clk_hw *parent_clk = clk_hw_get_parent(hw); in cpu_clk_recalc_rate()
220 .hw = {
227 .hw = {
234 .hw = {
243 static int usb_pll_clk_enable(struct clk_hw *hw) in usb_pll_clk_enable() argument
262 static unsigned long usb_pll_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) in usb_pll_clk_recalc_rate() argument
297 static u8 dmn_clk_get_parent(struct clk_hw *hw) in dmn_clk_get_parent() argument
299 struct clk_dmn *clk = to_dmnclk(hw); in dmn_clk_get_parent()
303 if (strcmp(hw->init->name, "io") == 0) in dmn_clk_get_parent()
311 static int dmn_clk_set_parent(struct clk_hw *hw, u8 parent) in dmn_clk_set_parent() argument
313 struct clk_dmn *clk = to_dmnclk(hw); in dmn_clk_set_parent()
317 if (strcmp(hw->init->name, "io") == 0) in dmn_clk_set_parent()
329 static unsigned long dmn_clk_recalc_rate(struct clk_hw *hw, in dmn_clk_recalc_rate() argument
334 struct clk_dmn *clk = to_dmnclk(hw); in dmn_clk_recalc_rate()
352 static long dmn_clk_round_rate(struct clk_hw *hw, unsigned long rate, in dmn_clk_round_rate() argument
357 unsigned bits = (strcmp(hw->init->name, "mem") == 0) ? 3 : 4; in dmn_clk_round_rate()
373 static int dmn_clk_set_rate(struct clk_hw *hw, unsigned long rate, in dmn_clk_set_rate() argument
376 struct clk_dmn *clk = to_dmnclk(hw); in dmn_clk_set_rate()
379 unsigned bits = (strcmp(hw->init->name, "mem") == 0) ? 3 : 4; in dmn_clk_set_rate()
404 static int cpu_clk_set_rate(struct clk_hw *hw, unsigned long rate, in cpu_clk_set_rate() argument
410 if (rate == clk_get_rate(clk_pll1.hw.clk)) { in cpu_clk_set_rate()
411 ret1 = clk_set_parent(hw->clk, clk_pll1.hw.clk); in cpu_clk_set_rate()
415 if (rate == clk_get_rate(clk_pll2.hw.clk)) { in cpu_clk_set_rate()
416 ret1 = clk_set_parent(hw->clk, clk_pll2.hw.clk); in cpu_clk_set_rate()
420 if (rate == clk_get_rate(clk_pll3.hw.clk)) { in cpu_clk_set_rate()
421 ret1 = clk_set_parent(hw->clk, clk_pll3.hw.clk); in cpu_clk_set_rate()
425 cur_parent = clk_get_parent(hw->clk); in cpu_clk_set_rate()
428 if (cur_parent == clk_pll1.hw.clk) { in cpu_clk_set_rate()
429 ret1 = clk_set_parent(hw->clk, clk_pll2.hw.clk); in cpu_clk_set_rate()
433 ret2 = clk_set_rate(clk_pll1.hw.clk, rate); in cpu_clk_set_rate()
435 ret1 = clk_set_parent(hw->clk, clk_pll1.hw.clk); in cpu_clk_set_rate()
457 .hw = {
472 .hw = {
486 .hw = {
509 .hw = {
537 .hw = {
552 .hw = {
567 .hw = {
587 .hw = {
602 .hw = {
632 static int std_clk_is_enabled(struct clk_hw *hw) in std_clk_is_enabled() argument
636 struct clk_std *clk = to_stdclk(hw); in std_clk_is_enabled()
645 static int std_clk_enable(struct clk_hw *hw) in std_clk_enable() argument
649 struct clk_std *clk = to_stdclk(hw); in std_clk_enable()
662 static void std_clk_disable(struct clk_hw *hw) in std_clk_disable() argument
666 struct clk_std *clk = to_stdclk(hw); in std_clk_disable()
697 .hw = {
711 .hw = {
725 .hw = {
739 .hw = {
753 .hw = {
767 .hw = {
781 .hw = {
795 .hw = {
809 .hw = {
823 .hw = {
837 .hw = {
851 .hw = {
865 .hw = {
879 .hw = {
893 .hw = {
907 .hw = {
921 .hw = {
935 .hw = {
949 .hw = {
967 .hw = {
981 .hw = {
999 .hw = {
1017 .hw = {
1031 .hw = {