Home
last modified time | relevance | path

Searched refs:parent_rate (Results 1 – 20 of 20) sorted by relevance

/linux-2.6.39/arch/arm/mach-s3c2440/
Ds3c2442.c58 unsigned long parent_rate = clk_get_rate(clk->parent); in s3c2442_camif_upll_round() local
61 if (rate > parent_rate) in s3c2442_camif_upll_round()
62 return parent_rate; in s3c2442_camif_upll_round()
64 div = parent_rate / rate; in s3c2442_camif_upll_round()
67 return parent_rate / 3; in s3c2442_camif_upll_round()
78 return parent_rate / (div * 2); in s3c2442_camif_upll_round()
83 unsigned long parent_rate = clk_get_rate(clk->parent); in s3c2442_camif_upll_setrate() local
90 if (rate == parent_rate) { in s3c2442_camif_upll_setrate()
92 } else if ((parent_rate / rate) == 3) { in s3c2442_camif_upll_setrate()
98 camdivn |= (((parent_rate / rate) / 2) - 1); in s3c2442_camif_upll_setrate()
Dclock.c52 unsigned long parent_rate = clk_get_rate(clk->parent); in s3c2440_camif_upll_round() local
55 if (rate > parent_rate) in s3c2440_camif_upll_round()
56 return parent_rate; in s3c2440_camif_upll_round()
60 div = (parent_rate / rate) / 2; in s3c2440_camif_upll_round()
67 return parent_rate / (div * 2); in s3c2440_camif_upll_round()
72 unsigned long parent_rate = clk_get_rate(clk->parent); in s3c2440_camif_upll_setrate() local
79 if (rate != parent_rate) { in s3c2440_camif_upll_setrate()
81 camdivn |= (((parent_rate / rate) / 2) - 1); in s3c2440_camif_upll_setrate()
/linux-2.6.39/arch/arm/mach-imx/
Dclock-imx1.c102 unsigned long parent_rate; in _clk_simple_round_rate() local
104 parent_rate = clk_get_rate(clk->parent); in _clk_simple_round_rate()
106 div = parent_rate / rate; in _clk_simple_round_rate()
107 if (parent_rate % rate) in _clk_simple_round_rate()
113 return parent_rate / div; in _clk_simple_round_rate()
249 unsigned long parent_rate; in hclk_set_rate() local
251 parent_rate = clk_get_rate(clk->parent); in hclk_set_rate()
253 div = parent_rate / rate; in hclk_set_rate()
255 if (div > 16 || div < 1 || ((parent_rate / div) != rate)) in hclk_set_rate()
290 unsigned long parent_rate; in clk48m_set_rate() local
[all …]
Dclock-imx27.c147 unsigned long parent_rate; in round_rate_cpu() local
149 parent_rate = clk_get_rate(clk->parent); in round_rate_cpu()
151 div = parent_rate / rate; in round_rate_cpu()
152 if (parent_rate % rate) in round_rate_cpu()
158 return parent_rate / div; in round_rate_cpu()
165 unsigned long parent_rate; in set_rate_cpu() local
167 parent_rate = clk_get_rate(clk->parent); in set_rate_cpu()
169 div = parent_rate / rate; in set_rate_cpu()
171 if (div > 4 || div < 1 || ((parent_rate / div) != rate)) in set_rate_cpu()
192 unsigned long parent_rate; in round_rate_per() local
[all …]
Dclock-imx21.c287 unsigned long parent_rate; in _clk_generic_round_rate() local
289 parent_rate = clk_get_rate(clk->parent); in _clk_generic_round_rate()
291 div = parent_rate / rate; in _clk_generic_round_rate()
292 if (parent_rate % rate) in _clk_generic_round_rate()
298 return parent_rate / div; in _clk_generic_round_rate()
338 unsigned long parent_rate; in _clk_perclkx_set_rate() local
340 parent_rate = clk_get_rate(clk->parent); in _clk_perclkx_set_rate()
345 div = parent_rate / rate; in _clk_perclkx_set_rate()
346 if (div > 64 || div < 1 || ((parent_rate / div) != rate)) in _clk_perclkx_set_rate()
362 unsigned long parent_rate; in _clk_usb_recalc() local
[all …]
/linux-2.6.39/arch/arm/mach-s3c2412/
Dclock.c164 unsigned long parent_rate = clk_get_rate(clk->parent); in s3c2412_roundrate_usbsrc() local
167 if (rate > parent_rate) in s3c2412_roundrate_usbsrc()
168 return parent_rate; in s3c2412_roundrate_usbsrc()
170 div = parent_rate / rate; in s3c2412_roundrate_usbsrc()
174 return parent_rate / div; in s3c2412_roundrate_usbsrc()
179 unsigned long parent_rate = clk_get_rate(clk->parent); in s3c2412_getrate_usbsrc() local
182 return parent_rate / ((div & S3C2412_CLKDIVN_USB48DIV) ? 2 : 1); in s3c2412_getrate_usbsrc()
187 unsigned long parent_rate = clk_get_rate(clk->parent); in s3c2412_setrate_usbsrc() local
192 if ((parent_rate / rate) == 2) in s3c2412_setrate_usbsrc()
285 unsigned long parent_rate = clk_get_rate(clk->parent); in s3c2412_roundrate_clksrc() local
[all …]
/linux-2.6.39/arch/arm/mach-mx5/
Dclock-mx51-mx53.c177 unsigned long parent_rate; in clk_pll_get_rate() local
179 parent_rate = clk_get_rate(clk->parent); in clk_pll_get_rate()
207 ref_clk = 2 * parent_rate; in clk_pll_get_rate()
230 unsigned long parent_rate; in _clk_pll_set_rate() local
232 parent_rate = clk_get_rate(clk->parent); in _clk_pll_set_rate()
236 quad_parent_rate = 4 * parent_rate; in _clk_pll_set_rate()
350 unsigned long parent_rate; in clk_pll1_sw_get_rate() local
352 parent_rate = clk_get_rate(clk->parent); in clk_pll1_sw_get_rate()
364 return parent_rate / div; in clk_pll1_sw_get_rate()
399 unsigned long parent_rate; in clk_cpu_get_rate() local
[all …]
/linux-2.6.39/arch/arm/mach-mxs/
Dclock-mx23.c119 unsigned long parent_rate; \
124 parent_rate = clk_get_rate(clk->parent); \
126 return SH_DIV((parent_rate >> PARENT_RATE_SHIFT) * 18, \
225 unsigned long diff, parent_rate, calc_rate; local
228 parent_rate = clk_get_rate(clk->parent);
233 div = DIV_ROUND_UP(parent_rate, rate);
240 parent_rate >>= PARENT_RATE_SHIFT;
241 diff = parent_rate;
244 f = parent_rate * 18 / d / rate;
245 if ((parent_rate * 18 / d) % rate)
[all …]
Dclock-mx28.c159 unsigned long parent_rate; \
164 parent_rate = clk_get_rate(clk->parent); \
166 return SH_DIV((parent_rate >> PARENT_RATE_SHIFT) * 18, \
295 unsigned long diff, parent_rate, calc_rate; \
302 parent_rate = clk_get_rate(clk->parent); \
303 div = DIV_ROUND_UP(parent_rate, rate); \
316 parent_rate = clk_get_rate(clk->parent->parent); \
318 parent_rate >>= PARENT_RATE_SHIFT; \
319 diff = parent_rate; \
327 f = parent_rate * 18 / d / rate; \
[all …]
/linux-2.6.39/arch/arm/plat-samsung/
Dpwm-clock.c95 unsigned long parent_rate = clk_get_rate(clk->parent); in clk_pwm_scaler_round_rate() local
96 unsigned long divisor = parent_rate / rate; in clk_pwm_scaler_round_rate()
103 return parent_rate / divisor; in clk_pwm_scaler_round_rate()
192 unsigned long parent_rate; in clk_pwm_tdiv_round_rate() local
195 parent_rate = clk_get_rate(clk->parent); in clk_pwm_tdiv_round_rate()
196 divisor = parent_rate / rate; in clk_pwm_tdiv_round_rate()
209 return parent_rate / divisor; in clk_pwm_tdiv_round_rate()
238 unsigned long parent_rate = clk_get_rate(clk->parent); in clk_pwm_tdiv_set_rate() local
245 divisor = parent_rate / rate; in clk_pwm_tdiv_set_rate()
Dclock-clksrc.c106 unsigned long parent_rate = clk_get_rate(clk->parent); in s3c_roundrate_clksrc() local
110 if (rate >= parent_rate) in s3c_roundrate_clksrc()
111 rate = parent_rate; in s3c_roundrate_clksrc()
113 div = parent_rate / rate; in s3c_roundrate_clksrc()
114 if (parent_rate % rate) in s3c_roundrate_clksrc()
122 rate = parent_rate / div; in s3c_roundrate_clksrc()
/linux-2.6.39/arch/arm/mach-omap2/
Dclkt_dpll.c106 static unsigned long _dpll_compute_new_rate(unsigned long parent_rate, in _dpll_compute_new_rate() argument
111 num = (unsigned long long)parent_rate * m; in _dpll_compute_new_rate()
138 unsigned long parent_rate) in _dpll_test_mult() argument
151 *new_rate = _dpll_compute_new_rate(parent_rate, *m, n); in _dpll_test_mult()
165 *new_rate = _dpll_compute_new_rate(parent_rate, *m, n); in _dpll_test_mult()
/linux-2.6.39/drivers/video/
Dsh_mobile_hdmi.c704 unsigned long *hdmi_rate, unsigned long *parent_rate) in sh_hdmi_rate_error() argument
715 rate_error = pdata->clk_optimize_parent(target, hdmi_rate, parent_rate); in sh_hdmi_rate_error()
717 *parent_rate = clk_get_rate(clk_get_parent(hdmi->hdmi_clk)); in sh_hdmi_rate_error()
727 mode->refresh, *parent_rate); in sh_hdmi_rate_error()
733 unsigned long *parent_rate) in sh_hdmi_read_edid() argument
835 rate_error = sh_hdmi_rate_error(hdmi, mode, hdmi_rate, parent_rate); in sh_hdmi_read_edid()
890 found_rate_error = sh_hdmi_rate_error(hdmi, found, hdmi_rate, parent_rate); in sh_hdmi_read_edid()
1085 unsigned long parent_rate) in sh_hdmi_clk_configure() argument
1089 if (parent_rate && clk_get_parent(hdmi->hdmi_clk)) { in sh_hdmi_clk_configure()
1090 ret = clk_set_rate(clk_get_parent(hdmi->hdmi_clk), parent_rate); in sh_hdmi_clk_configure()
[all …]
/linux-2.6.39/arch/mips/jz4740/
Dclock.c242 unsigned long parent_rate = jz_clk_pll_get_rate(clk->parent); in jz_clk_main_round_rate() local
245 div = parent_rate / rate; in jz_clk_main_round_rate()
247 return parent_rate / 32; in jz_clk_main_round_rate()
249 return parent_rate; in jz_clk_main_round_rate()
253 return parent_rate / div; in jz_clk_main_round_rate()
277 unsigned long parent_rate = jz_clk_pll_get_rate(clk->parent); in jz_clk_main_set_rate() local
281 div = parent_rate / rate; in jz_clk_main_set_rate()
516 unsigned long parent_rate = jz_clk_pll_half_get_rate(clk->parent); in jz_clk_ldclk_round_rate() local
521 div = parent_rate / rate; in jz_clk_ldclk_round_rate()
527 return parent_rate / div; in jz_clk_ldclk_round_rate()
/linux-2.6.39/arch/arm/mach-tegra/
Dtegra2_clocks.c198 static int clk_div71_get_divider(unsigned long parent_rate, unsigned long rate) in clk_div71_get_divider() argument
200 s64 divider_u71 = parent_rate * 2; in clk_div71_get_divider()
213 static int clk_div16_get_divider(unsigned long parent_rate, unsigned long rate) in clk_div16_get_divider() argument
217 divider_u16 = parent_rate; in clk_div16_get_divider()
507 unsigned long parent_rate = clk_get_rate(c->parent); in tegra2_bus_clk_set_rate() local
516 if (rate == parent_rate / i) { in tegra2_bus_clk_set_rate()
591 unsigned long parent_rate = clk_get_rate(c->parent); in tegra2_blink_clk_set_rate() local
592 if (rate >= parent_rate) { in tegra2_blink_clk_set_rate()
599 on_off = DIV_ROUND_UP(parent_rate / 8, rate); in tegra2_blink_clk_set_rate()
860 unsigned long parent_rate = clk_get_rate(c->parent); in tegra2_pll_div_clk_set_rate() local
[all …]
Dusb_phy.c660 unsigned long parent_rate; in tegra_usb_phy_open() local
691 parent_rate = clk_get_rate(clk_get_parent(phy->pll_u)); in tegra_usb_phy_open()
693 if (tegra_freq_table[i].freq == parent_rate) { in tegra_usb_phy_open()
699 pr_err("invalid pll_u parent rate %ld\n", parent_rate); in tegra_usb_phy_open()
/linux-2.6.39/arch/arm/mach-pnx4008/
Dclock.c197 u32 parent_rate; in pll160_set_rate() local
200 parent_rate = clk->parent->rate; in pll160_set_rate()
202 if (!parent_rate) in pll160_set_rate()
215 rate -= rate % parent_rate; /*round down the input */ in pll160_set_rate()
229 if (rate == parent_rate) { in pll160_set_rate()
233 clk->rate = parent_rate; in pll160_set_rate()
252 tmp_m /= parent_rate; in pll160_set_rate()
270 clk->rate = (tmp_m * parent_rate) / tmp_2p; in pll160_set_rate()
/linux-2.6.39/arch/avr32/mach-at32ap/
Dat32ap700x.c372 unsigned long parent_rate, child_div, actual_rate, div; in cpu_clk_set_rate() local
374 parent_rate = clk->parent->get_rate(clk->parent); in cpu_clk_set_rate()
382 if (rate > 3 * (parent_rate / 4) || child_div == 1) { in cpu_clk_set_rate()
383 actual_rate = parent_rate; in cpu_clk_set_rate()
387 div = (parent_rate + rate / 2) / rate; in cpu_clk_set_rate()
392 actual_rate = parent_rate / (1 << (cpusel + 1)); in cpu_clk_set_rate()
540 unsigned long parent_rate, actual_rate, div; in genclk_set_rate() local
542 parent_rate = clk->parent->get_rate(clk->parent); in genclk_set_rate()
545 if (rate > 3 * parent_rate / 4) { in genclk_set_rate()
546 actual_rate = parent_rate; in genclk_set_rate()
[all …]
/linux-2.6.39/arch/arm/plat-s3c24xx/
Ds3c2443-clock.c106 unsigned long parent_rate = clk_get_rate(clk->parent); in s3c2443_getrate_mdivclk() local
112 return parent_rate / (div + 1); in s3c2443_getrate_mdivclk()
/linux-2.6.39/drivers/spi/
Dspi_sh_msiof.c146 unsigned long parent_rate, in sh_msiof_spi_set_clk_regs() argument
152 if (!WARN_ON(!spi_hz || !parent_rate)) in sh_msiof_spi_set_clk_regs()
153 div = parent_rate / spi_hz; in sh_msiof_spi_set_clk_regs()