| /rk3399_rockchip-uboot/arch/arm/mach-omap2/ |
| H A D | abb.c | 51 sys_rate = DIV_ROUND_CLOSEST(V_OSCK, 1000000); in abb_setup_timings() 52 clk_cycles = DIV_ROUND_CLOSEST(OMAP_ABB_CLOCK_CYCLES * 10, sys_rate); in abb_setup_timings() 53 sr2_cnt = DIV_ROUND_CLOSEST(OMAP_ABB_SETTLING_TIME * 10, clk_cycles); in abb_setup_timings()
|
| /rk3399_rockchip-uboot/drivers/clk/ |
| H A D | clk_zynq.c | 198 return DIV_ROUND_CLOSEST(zynq_clk_get_pll_rate(priv, pll), div); in zynq_clk_get_cpu_rate() 210 return DIV_ROUND_CLOSEST(zynq_clk_get_pll_rate(priv, ddrpll_clk), div); in zynq_clk_get_ddr2x_rate() 222 return DIV_ROUND_CLOSEST(zynq_clk_get_pll_rate(priv, ddrpll_clk), div); in zynq_clk_get_ddr3x_rate() 235 return DIV_ROUND_CLOSEST(DIV_ROUND_CLOSEST( in zynq_clk_get_dci_rate() 264 DIV_ROUND_CLOSEST( in zynq_clk_get_peripheral_rate() 265 DIV_ROUND_CLOSEST( in zynq_clk_get_peripheral_rate() 298 new_rate = DIV_ROUND_CLOSEST( in zynq_clk_calc_peripheral_two_divs() 299 DIV_ROUND_CLOSEST(pll_rate, d0), d1); in zynq_clk_calc_peripheral_two_divs() 335 div0 = DIV_ROUND_CLOSEST(pll_rate, rate); in zynq_clk_set_peripheral_rate() 338 new_rate = DIV_ROUND_CLOSEST(rate, div0); in zynq_clk_set_peripheral_rate()
|
| H A D | clk_zynqmp.c | 362 return DIV_ROUND_CLOSEST(pllrate, div); in zynqmp_clk_get_cpu_rate() 385 return DIV_ROUND_CLOSEST(pllrate, div); in zynqmp_clk_get_ddr_rate() 419 DIV_ROUND_CLOSEST( in zynqmp_clk_get_peripheral_rate() 420 DIV_ROUND_CLOSEST(pllrate, div0), div1); in zynqmp_clk_get_peripheral_rate() 433 new_rate = DIV_ROUND_CLOSEST( in zynqmp_clk_calc_peripheral_two_divs() 434 DIV_ROUND_CLOSEST(pll_rate, d0), d1); in zynqmp_clk_calc_peripheral_two_divs() 479 div0 = DIV_ROUND_CLOSEST(pll_rate, rate); in zynqmp_clk_set_peripheral_rate() 482 new_rate = DIV_ROUND_CLOSEST(rate, div0); in zynqmp_clk_set_peripheral_rate()
|
| /rk3399_rockchip-uboot/lib/ |
| H A D | strmhz.c | 14 n = DIV_ROUND_CLOSEST(hz, 1000) / 1000L; in strmhz() 18 m = DIV_ROUND_CLOSEST(hz, 1000L); in strmhz()
|
| /rk3399_rockchip-uboot/arch/arm/mach-uniphier/debug-uart/ |
| H A D | debug-uart-ld4.c | 20 return DIV_ROUND_CLOSEST(UNIPHIER_LD4_UART_CLK, 16 * CONFIG_BAUDRATE); in uniphier_ld4_debug_uart_init()
|
| H A D | debug-uart-sld8.c | 20 return DIV_ROUND_CLOSEST(UNIPHIER_SLD8_UART_CLK, 16 * CONFIG_BAUDRATE); in uniphier_sld8_debug_uart_init()
|
| H A D | debug-uart-pro4.c | 30 return DIV_ROUND_CLOSEST(UNIPHIER_PRO4_UART_CLK, 16 * CONFIG_BAUDRATE); in uniphier_pro4_debug_uart_init()
|
| H A D | debug-uart-ld6b.c | 30 return DIV_ROUND_CLOSEST(UNIPHIER_LD6B_UART_CLK, 16 * CONFIG_BAUDRATE); in uniphier_ld6b_debug_uart_init()
|
| H A D | debug-uart-pxs2.c | 31 return DIV_ROUND_CLOSEST(UNIPHIER_PXS2_UART_CLK, 16 * CONFIG_BAUDRATE); in uniphier_pxs2_debug_uart_init()
|
| H A D | debug-uart-pro5.c | 33 return DIV_ROUND_CLOSEST(UNIPHIER_PRO5_UART_CLK, 16 * CONFIG_BAUDRATE); in uniphier_pro5_debug_uart_init()
|
| H A D | debug-uart-ld20.c | 34 return DIV_ROUND_CLOSEST(UNIPHIER_LD20_UART_CLK, 16 * CONFIG_BAUDRATE); in uniphier_ld20_debug_uart_init()
|
| /rk3399_rockchip-uboot/drivers/video/drm/ |
| H A D | dw_mipi_dsi2.c | 376 tmp = DIV_ROUND_CLOSEST(tmp * 100, 228); in dw_mipi_dsi2_get_lane_rate() 600 phy_hs_clk = DIV_ROUND_CLOSEST(dsi2->lane_hs_rate * MSEC_PER_SEC, 7); in dw_mipi_dsi2_ipi_set() 602 phy_hs_clk = DIV_ROUND_CLOSEST(dsi2->lane_hs_rate * MSEC_PER_SEC, 16); in dw_mipi_dsi2_ipi_set() 605 hsa_time = DIV_ROUND_CLOSEST(tmp << 16, pixel_clk); in dw_mipi_dsi2_ipi_set() 609 hbp_time = DIV_ROUND_CLOSEST(tmp << 16, pixel_clk); in dw_mipi_dsi2_ipi_set() 613 hact_time = DIV_ROUND_CLOSEST(tmp << 16, pixel_clk); in dw_mipi_dsi2_ipi_set() 617 hline_time = DIV_ROUND_CLOSEST(tmp << 16, pixel_clk); in dw_mipi_dsi2_ipi_set() 983 dsi2->lane_hs_rate = DIV_ROUND_CLOSEST(rate, MSEC_PER_SEC); in dw_mipi_dsi2_set_hs_clk() 1044 phy_hsclk = DIV_ROUND_CLOSEST(dsi2->lane_hs_rate * MSEC_PER_SEC, 7); in dw_mipi_dsi2_phy_ratio_cfg() 1047 phy_hsclk = DIV_ROUND_CLOSEST(dsi2->lane_hs_rate * MSEC_PER_SEC, 16); in dw_mipi_dsi2_phy_ratio_cfg() [all …]
|
| H A D | samsung_mipi_dcphy.c | 1756 max_prediv = DIV_ROUND_CLOSEST(fin, 6 * MSEC_PER_SEC); in samsung_mipi_dcphy_pll_round_rate() 1761 _fbdiv = DIV_ROUND_CLOSEST(fvco * _prediv, 2 * fin); in samsung_mipi_dcphy_pll_round_rate() 1773 tmp = DIV_ROUND_CLOSEST(_fbdiv * fin * 2 * 1000, _prediv); in samsung_mipi_dcphy_pll_round_rate() 1775 DIV_ROUND_CLOSEST(abs(_dsm) * fin * 1000, in samsung_mipi_dcphy_pll_round_rate() 1777 _freq = (DIV_ROUND_CLOSEST(tmp, 1000) * MSEC_PER_SEC); in samsung_mipi_dcphy_pll_round_rate()
|
| H A D | inno_mipi_phy.c | 447 UI = DIV_ROUND_CLOSEST(NSEC_PER_USEC, inno->lane_mbps); in inno_mipi_dphy_lane_timing_init() 485 #define TIMING_NS(x, freq) (((x) * (DIV_ROUND_CLOSEST(NSEC_PER_SEC, freq)))) in inno_mipi_dphy_lane_timing_init()
|
| H A D | rockchip-inno-hdmi-phy.c | 903 vco += DIV_ROUND_CLOSEST(parent_rate * frac, (1 << 24)); in inno_hdmi_3328_phy_pll_recalc_rate() 1113 vco += DIV_ROUND_CLOSEST(parent_rate * frac, (1 << 24)); in inno_hdmi_rk3528_phy_pll_recalc_rate() 1128 inno->pixclock = DIV_ROUND_CLOSEST(frac, 1000) * 1000; in inno_hdmi_rk3528_phy_pll_recalc_rate()
|
| /rk3399_rockchip-uboot/drivers/serial/ |
| H A D | serial_uniphier.c | 52 divisor = DIV_ROUND_CLOSEST(priv->uartclk, mode_x_div * baudrate); in uniphier_serial_setbrg()
|
| H A D | serial_stm32x7.c | 24 int_div = DIV_ROUND_CLOSEST(plat->clock_rate, baudrate); in stm32_serial_setbrg()
|
| H A D | serial_pic32.c | 51 u32 div = DIV_ROUND_CLOSEST(clk, baudrate * 16); in pic32_serial_init()
|
| /rk3399_rockchip-uboot/drivers/misc/ |
| H A D | mxc_ocotp.c | 254 prog = DIV_ROUND_CLOSEST(ipg_clk * BV_TIMING_PROG_US, 1000000) + 1; in set_timing() 279 strobe_prog = DIV_ROUND_CLOSEST(ipg_clk * BV_TIMING_STROBE_PROG_US, in set_timing()
|
| /rk3399_rockchip-uboot/drivers/clk/at91/ |
| H A D | clk-generated.c | 100 tmp_rate = DIV_ROUND_CLOSEST(parent_rate, div); in generic_clk_set_rate()
|
| /rk3399_rockchip-uboot/drivers/mmc/ |
| H A D | rockchip_dw_mmc.c | 171 degrees += DIV_ROUND_CLOSEST(delay_num * factor, 1000000); in rockchip_mmc_get_phase() 231 delay = DIV_ROUND_CLOSEST(delay, in rockchip_mmc_set_phase()
|
| /rk3399_rockchip-uboot/drivers/i2c/ |
| H A D | stm32f7_i2c.c | 494 u32 i2cclk = DIV_ROUND_CLOSEST(STM32_NSEC_PER_SEC, in stm32_i2c_compute_solutions() 564 u32 i2cbus = DIV_ROUND_CLOSEST(STM32_NSEC_PER_SEC, in stm32_i2c_choose_solution() 567 u32 i2cclk = DIV_ROUND_CLOSEST(STM32_NSEC_PER_SEC, in stm32_i2c_choose_solution()
|
| /rk3399_rockchip-uboot/include/linux/ |
| H A D | kernel.h | 90 #define DIV_ROUND_CLOSEST(x, divisor)( \ macro
|
| /rk3399_rockchip-uboot/drivers/video/drm/rk628/ |
| H A D | rk628_combtxphy.c | 306 ref_clk = DIV_ROUND_CLOSEST(ref_clk, 1000); /* khz */ in rk628_combtxphy_set_mode()
|
| H A D | rk628_dsi.c | 1183 hline_time = DIV_ROUND_CLOSEST(hline * lanebyteclk, dpipclk); in rk628_dsi_set_vid_mode() 1187 hsa_time = DIV_ROUND_CLOSEST(hsa * lanebyteclk, dpipclk); in rk628_dsi_set_vid_mode() 1190 hbp_time = DIV_ROUND_CLOSEST(hbp * lanebyteclk, dpipclk); in rk628_dsi_set_vid_mode()
|