Home
last modified time | relevance | path

Searched refs:DIV_ROUND_CLOSEST (Results 1 – 25 of 25) sorted by relevance

/openbmc/u-boot/drivers/clk/
H A Dclk_zynq.c197 return DIV_ROUND_CLOSEST(zynq_clk_get_pll_rate(priv, pll), div); in zynq_clk_get_cpu_rate()
209 return DIV_ROUND_CLOSEST(zynq_clk_get_pll_rate(priv, ddrpll_clk), div); in zynq_clk_get_ddr2x_rate()
221 return DIV_ROUND_CLOSEST(zynq_clk_get_pll_rate(priv, ddrpll_clk), div); in zynq_clk_get_ddr3x_rate()
234 return DIV_ROUND_CLOSEST(DIV_ROUND_CLOSEST( in zynq_clk_get_dci_rate()
263 DIV_ROUND_CLOSEST( in zynq_clk_get_peripheral_rate()
264 DIV_ROUND_CLOSEST( in zynq_clk_get_peripheral_rate()
297 new_rate = DIV_ROUND_CLOSEST( in zynq_clk_calc_peripheral_two_divs()
298 DIV_ROUND_CLOSEST(pll_rate, d0), d1); in zynq_clk_calc_peripheral_two_divs()
334 div0 = DIV_ROUND_CLOSEST(pll_rate, rate); in zynq_clk_set_peripheral_rate()
337 new_rate = DIV_ROUND_CLOSEST(rate, div0); in zynq_clk_set_peripheral_rate()
H A Dclk_zynqmp.c389 return DIV_ROUND_CLOSEST(pllrate, div); in zynqmp_clk_get_cpu_rate()
412 return DIV_ROUND_CLOSEST(pllrate, div); in zynqmp_clk_get_ddr_rate()
446 DIV_ROUND_CLOSEST( in zynqmp_clk_get_peripheral_rate()
447 DIV_ROUND_CLOSEST(pllrate, div0), div1); in zynqmp_clk_get_peripheral_rate()
489 DIV_ROUND_CLOSEST( in zynqmp_clk_get_wdt_rate()
490 DIV_ROUND_CLOSEST(pllrate, div0), div1); in zynqmp_clk_get_wdt_rate()
503 new_rate = DIV_ROUND_CLOSEST( in zynqmp_clk_calc_peripheral_two_divs()
504 DIV_ROUND_CLOSEST(pll_rate, d0), d1); in zynqmp_clk_calc_peripheral_two_divs()
549 div0 = DIV_ROUND_CLOSEST(pll_rate, rate); in zynqmp_clk_set_peripheral_rate()
552 new_rate = DIV_ROUND_CLOSEST(rate, div0); in zynqmp_clk_set_peripheral_rate()
H A Dclk_meson.c363 new_div = DIV_ROUND_CLOSEST(parent_rate, rate); in meson_div_set_rate()
377 new_div = DIV_ROUND_CLOSEST(parent_rate, rate); in meson_div_set_rate()
/openbmc/u-boot/arch/arm/mach-omap2/
H A Dabb.c50 sys_rate = DIV_ROUND_CLOSEST(V_OSCK, 1000000); in abb_setup_timings()
51 clk_cycles = DIV_ROUND_CLOSEST(OMAP_ABB_CLOCK_CYCLES * 10, sys_rate); in abb_setup_timings()
52 sr2_cnt = DIV_ROUND_CLOSEST(OMAP_ABB_SETTLING_TIME * 10, clk_cycles); in abb_setup_timings()
/openbmc/u-boot/lib/
H A Dstrmhz.c13 n = DIV_ROUND_CLOSEST(hz, 1000) / 1000L; in strmhz()
17 m = DIV_ROUND_CLOSEST(hz, 1000L); in strmhz()
/openbmc/u-boot/drivers/serial/
H A Dserial_mtk.c71 quot = DIV_ROUND_CLOSEST(priv->clock, 16 * baud); in _mtk_serial_setbrg()
75 quot = DIV_ROUND_CLOSEST(priv->clock, 256 * baud); in _mtk_serial_setbrg()
79 samplecount = DIV_ROUND_CLOSEST(priv->clock, in _mtk_serial_setbrg()
113 tmp = DIV_ROUND_CLOSEST(priv->clock, quot * baud); in _mtk_serial_setbrg()
H A Dserial_uniphier.c52 divisor = DIV_ROUND_CLOSEST(priv->uartclk, mode_x_div * baudrate); in uniphier_serial_setbrg()
H A Dserial_pic32.c50 u32 div = DIV_ROUND_CLOSEST(clk, baudrate * 16); in pic32_serial_init()
H A Dserial_stm32.c25 int_div = DIV_ROUND_CLOSEST(clock_rate, baudrate); in _stm32_serial_setbrg()
H A Dns16550.c146 return DIV_ROUND_CLOSEST(clock, mode_x_div * baudrate); in ns16550_calc_divisor()
/openbmc/u-boot/arch/arm/mach-uniphier/debug-uart/
H A Ddebug-uart-sld8.c19 return DIV_ROUND_CLOSEST(UNIPHIER_SLD8_UART_CLK, 16 * CONFIG_BAUDRATE); in uniphier_sld8_debug_uart_init()
H A Ddebug-uart-ld4.c19 return DIV_ROUND_CLOSEST(UNIPHIER_LD4_UART_CLK, 16 * CONFIG_BAUDRATE); in uniphier_ld4_debug_uart_init()
H A Ddebug-uart-pro4.c29 return DIV_ROUND_CLOSEST(UNIPHIER_PRO4_UART_CLK, 16 * CONFIG_BAUDRATE); in uniphier_pro4_debug_uart_init()
H A Ddebug-uart-ld6b.c29 return DIV_ROUND_CLOSEST(UNIPHIER_LD6B_UART_CLK, 16 * CONFIG_BAUDRATE); in uniphier_ld6b_debug_uart_init()
H A Ddebug-uart-pxs2.c30 return DIV_ROUND_CLOSEST(UNIPHIER_PXS2_UART_CLK, 16 * CONFIG_BAUDRATE); in uniphier_pxs2_debug_uart_init()
H A Ddebug-uart-pro5.c32 return DIV_ROUND_CLOSEST(UNIPHIER_PRO5_UART_CLK, 16 * CONFIG_BAUDRATE); in uniphier_pro5_debug_uart_init()
H A Ddebug-uart-ld20.c33 return DIV_ROUND_CLOSEST(UNIPHIER_LD20_UART_CLK, 16 * CONFIG_BAUDRATE); in uniphier_ld20_debug_uart_init()
/openbmc/u-boot/arch/arm/mach-uniphier/clk/
H A Dpll-base-ld20.c45 DIV_ROUND_CLOSEST(487UL * freq * ssc_rate, in uniphier_ld20_sscpll_init()
52 DIV_ROUND_CLOSEST(21431887UL * freq, in uniphier_ld20_sscpll_init()
/openbmc/u-boot/drivers/i2c/
H A Drcar_iic.c214 priv->iccl = DIV_ROUND_CLOSEST(clkrate * ratio_low, denom); in rcar_iic_set_speed()
215 priv->icch = DIV_ROUND_CLOSEST(clkrate * ratio_high, denom); in rcar_iic_set_speed()
H A Dstm32f7_i2c.c491 u32 i2cclk = DIV_ROUND_CLOSEST(STM32_NSEC_PER_SEC, in stm32_i2c_compute_solutions()
561 u32 i2cbus = DIV_ROUND_CLOSEST(STM32_NSEC_PER_SEC, in stm32_i2c_choose_solution()
564 u32 i2cclk = DIV_ROUND_CLOSEST(STM32_NSEC_PER_SEC, in stm32_i2c_choose_solution()
/openbmc/u-boot/drivers/clk/at91/
H A Dclk-usb.c68 tmp_rate = DIV_ROUND_CLOSEST(source_rate, div); in at91_usb_clk_set_rate()
H A Dclk-generated.c100 tmp_rate = DIV_ROUND_CLOSEST(parent_rate, div); in generic_clk_set_rate()
/openbmc/u-boot/drivers/misc/
H A Dmxc_ocotp.c258 prog = DIV_ROUND_CLOSEST(ipg_clk * BV_TIMING_PROG_US, 1000000) + 1; in set_timing()
283 strobe_prog = DIV_ROUND_CLOSEST(ipg_clk * BV_TIMING_STROBE_PROG_US, in set_timing()
/openbmc/u-boot/include/linux/
H A Dkernel.h95 #define DIV_ROUND_CLOSEST(x, divisor)( \ macro
/openbmc/u-boot/arch/arm/cpu/arm926ejs/mxs/
H A Dspl_power_init.c1129 new_brownout = DIV_ROUND_CLOSEST(new_target - new_brownout, in mxs_power_set_vddx()