Lines Matching refs:clkid

71 static struct clk_pll *get_pll(enum clock_id clkid)  in get_pll()  argument
76 assert(clock_id_is_pll(clkid)); in get_pll()
77 if (clkid >= (enum clock_id)TEGRA_CLK_PLLS) { in get_pll()
78 debug("%s: Invalid PLL %d\n", __func__, clkid); in get_pll()
81 return &clkrst->crc_pll[clkid]; in get_pll()
84 __weak struct clk_pll_simple *clock_get_simple_pll(enum clock_id clkid) in clock_get_simple_pll() argument
89 int clock_ll_read_pll(enum clock_id clkid, u32 *divm, u32 *divn, in clock_ll_read_pll() argument
92 struct clk_pll *pll = get_pll(clkid); in clock_ll_read_pll()
93 struct clk_pll_info *pllinfo = &tegra_pll_info_table[clkid]; in clock_ll_read_pll()
96 assert(clkid != CLOCK_ID_USB); in clock_ll_read_pll()
99 if (!clock_id_is_pll(clkid) || clkid == CLOCK_ID_USB) in clock_ll_read_pll()
113 unsigned long clock_start_pll(enum clock_id clkid, u32 divm, u32 divn, in clock_start_pll() argument
117 struct clk_pll_info *pllinfo = &tegra_pll_info_table[clkid]; in clock_start_pll()
121 if (clkid < (enum clock_id)TEGRA_CLK_PLLS) { in clock_start_pll()
122 pll = get_pll(clkid); in clock_start_pll()
124 simple_pll = clock_get_simple_pll(clkid); in clock_start_pll()
126 debug("%s: Uknown simple PLL %d\n", __func__, clkid); in clock_start_pll()
263 int clock_set_pllout(enum clock_id clkid, enum pll_out_id pllout, unsigned rate) in clock_set_pllout() argument
265 struct clk_pll *pll = get_pll(clkid); in clock_set_pllout()
268 if (!clock_id_is_pll(clkid)) in clock_set_pllout()
271 if (pllout + 1 > pll_num_clkouts[clkid]) in clock_set_pllout()
274 div = clk_get_divider(8, pll_rate[clkid], rate); in clock_set_pllout()
488 void clock_enable(enum periph_id clkid) in clock_enable() argument
490 clock_set_enable(clkid, 1); in clock_enable()
493 void clock_disable(enum periph_id clkid) in clock_disable() argument
495 clock_set_enable(clkid, 0); in clock_disable()
532 unsigned clock_get_rate(enum clock_id clkid) in clock_get_rate() argument
537 struct clk_pll_info *pllinfo = &tegra_pll_info_table[clkid]; in clock_get_rate()
540 if (clkid == CLOCK_ID_OSC) in clock_get_rate()
543 if (clkid == CLOCK_ID_CLK_M) in clock_get_rate()
546 pll = get_pll(clkid); in clock_get_rate()
564 if (clkid != CLOCK_ID_PERIPH) in clock_get_rate()
588 int clock_set_rate(enum clock_id clkid, u32 n, u32 m, u32 p, u32 cpcon) in clock_set_rate() argument
592 struct clk_pll_info *pllinfo = &tegra_pll_info_table[clkid]; in clock_set_rate()
594 pll = get_pll(clkid); in clock_set_rate()
608 if (clkid == CLOCK_ID_PERIPH) { in clock_set_rate()