/u-boot/drivers/ddr/microchip/ |
A D | ddr2.c | 150 wr2rd = max_t(u32, DIV_ROUND_UP(T_WTR, T_CK_CTRL), in ddr2_ctrl_init() 151 DIV_ROUND_UP(T_WTR_TCK, 2)) + WL + BL; in ddr2_ctrl_init() 153 wr2prech = DIV_ROUND_UP(T_WR, T_CK_CTRL) + WL + BL; in ddr2_ctrl_init() 155 DIV_ROUND_UP(T_RTP_TCK, 2)) + BL - 2; in ddr2_ctrl_init() 157 DIV_ROUND_UP(T_RRD_TCK, 2)) - 1; in ddr2_ctrl_init() 158 ras2cas = DIV_ROUND_UP(T_RCD, T_CK_CTRL) - 1; in ddr2_ctrl_init() 159 prech2ras = DIV_ROUND_UP(T_RP, T_CK_CTRL) - 1; in ddr2_ctrl_init() 180 writel((DIV_ROUND_UP(T_RP, T_CK_CTRL) | in ddr2_ctrl_init() 188 writel(((DIV_ROUND_UP(T_RAS_MIN, T_CK_CTRL) - 1) | in ddr2_ctrl_init() 189 ((DIV_ROUND_UP(T_RC, T_CK_CTRL) - 1) << 8) | in ddr2_ctrl_init() [all …]
|
/u-boot/drivers/phy/ |
A D | meson-axg-mipi-dphy.c | 236 DIV_ROUND_UP(priv->config.clk_trail, temp) | in phy_meson_axg_mipi_dphy_power_on() 237 (DIV_ROUND_UP(priv->config.clk_post + in phy_meson_axg_mipi_dphy_power_on() 239 (DIV_ROUND_UP(priv->config.clk_zero, temp) << 16) | in phy_meson_axg_mipi_dphy_power_on() 242 DIV_ROUND_UP(priv->config.clk_pre, temp)); in phy_meson_axg_mipi_dphy_power_on() 245 DIV_ROUND_UP(priv->config.hs_exit, temp) | in phy_meson_axg_mipi_dphy_power_on() 246 (DIV_ROUND_UP(priv->config.hs_trail, temp) << 8) | in phy_meson_axg_mipi_dphy_power_on() 247 (DIV_ROUND_UP(priv->config.hs_zero, temp) << 16) | in phy_meson_axg_mipi_dphy_power_on() 251 DIV_ROUND_UP(priv->config.lpx, temp) | in phy_meson_axg_mipi_dphy_power_on() 252 (DIV_ROUND_UP(priv->config.ta_sure, temp) << 8) | in phy_meson_axg_mipi_dphy_power_on() 253 (DIV_ROUND_UP(priv->config.ta_go, temp) << 16) | in phy_meson_axg_mipi_dphy_power_on() [all …]
|
/u-boot/arch/arm/mach-imx/mx6/ |
A D | ddr.c | 1089 txp = DIV_ROUND_UP(7500, clkper) - 1; in mx6_lpddr2_cfg() 1092 tfaw = DIV_ROUND_UP(60000, clkper) - 1; in mx6_lpddr2_cfg() 1094 tfaw = DIV_ROUND_UP(50000, clkper) - 1; in mx6_lpddr2_cfg() 1095 trrd = DIV_ROUND_UP(10000, clkper) - 1; in mx6_lpddr2_cfg() 1098 tcksre = DIV_ROUND_UP(15000, clkper); in mx6_lpddr2_cfg() 1100 twr = DIV_ROUND_UP(15000, clkper) - 1; in mx6_lpddr2_cfg() 1115 twtr = DIV_ROUND_UP(7500, clkper) - 1; in mx6_lpddr2_cfg() 1116 trtp = DIV_ROUND_UP(7500, clkper) - 1; in mx6_lpddr2_cfg() 1327 txs = DIV_ROUND_UP(120000, clkper) - 1; in mx6_ddr3_cfg() 1331 txs = DIV_ROUND_UP(170000, clkper) - 1; in mx6_ddr3_cfg() [all …]
|
/u-boot/drivers/clk/rockchip/ |
A D | clk_rv1108.c | 164 div = DIV_ROUND_UP(pll_rate, rate) - 1; in rv1108_mac_set_clk() 185 div = DIV_ROUND_UP(pll_rate, rate) - 1; in rv1108_sfc_set_clk() 210 src_clk_div = DIV_ROUND_UP(OSC_HZ, hz) - 1; in rv1108_saradc_set_clk() 235 src_clk_div = DIV_ROUND_UP(GPLL_HZ, hz) - 1; in rv1108_aclk_vio1_set_clk() 261 src_clk_div = DIV_ROUND_UP(GPLL_HZ, hz) - 1; in rv1108_aclk_vio0_set_clk() 296 src_clk_div = DIV_ROUND_UP(GPLL_HZ, hz) - 1; in rv1108_dclk_vop_set_clk() 326 src_clk_div = DIV_ROUND_UP(parent_rate, hz) - 1; in rv1108_aclk_bus_set_clk() 378 src_clk_div = DIV_ROUND_UP(parent_rate, hz) - 1; in rv1108_aclk_peri_set_clk() 394 src_clk_div = DIV_ROUND_UP(parent_rate, hz) - 1; in rv1108_hclk_peri_set_clk() 409 src_clk_div = DIV_ROUND_UP(parent_rate, hz) - 1; in rv1108_pclk_peri_set_clk() [all …]
|
A D | clk_px30.c | 117 postdiv2 = DIV_ROUND_UP(postdiv1, max_postdiv1); in pll_clk_set_by_auto() 118 postdiv1 = DIV_ROUND_UP(postdiv1, postdiv2); in pll_clk_set_by_auto() 324 src_clk_div = DIV_ROUND_UP(priv->gpll_hz, hz); in px30_i2c_set_clk() 611 src_clk_div = DIV_ROUND_UP(priv->gpll_hz, hz); in px30_pwm_set_clk() 653 src_clk_div = DIV_ROUND_UP(OSC_HZ, hz); in px30_saradc_set_clk() 679 src_clk_div = DIV_ROUND_UP(OSC_HZ, hz); in px30_tsadc_set_clk() 716 src_clk_div = DIV_ROUND_UP(priv->gpll_hz, hz); in px30_spi_set_clk() 940 src_clk_div = DIV_ROUND_UP(priv->gpll_hz, hz); in px30_peri_set_clk() 998 src_clk_div = DIV_ROUND_UP(priv->gpll_hz, hz); in px30_crypto_set_clk() 1075 div = DIV_ROUND_UP(pll_rate, hz) - 1; in px30_mac_set_clk() [all …]
|
A D | clk_rk3308.c | 164 src_clk_div = DIV_ROUND_UP(priv->dpll_hz, hz); in rk3308_i2c_set_clk() 214 div = DIV_ROUND_UP(pll_rate, hz) - 1; in rk3308_mac_set_clk() 328 src_clk_div = DIV_ROUND_UP(OSC_HZ, hz); in rk3308_saradc_set_clk() 356 src_clk_div = DIV_ROUND_UP(OSC_HZ, hz); in rk3308_tsadc_set_clk() 399 src_clk_div = DIV_ROUND_UP(priv->dpll_hz, hz); in rk3308_spi_set_clk() 443 src_clk_div = DIV_ROUND_UP(priv->dpll_hz, hz); in rk3308_pwm_set_clk() 513 div = DIV_ROUND_UP(pll_rate, hz); in rk3308_vop_set_clk() 577 src_clk_div = DIV_ROUND_UP(priv->dpll_hz, hz); in rk3308_bus_set_clk() 640 src_clk_div = DIV_ROUND_UP(priv->dpll_hz, hz); in rk3308_peri_set_clk() 699 src_clk_div = DIV_ROUND_UP(priv->vpll0_hz, hz); in rk3308_audio_set_clk() [all …]
|
A D | clk_rk3128.c | 96 postdiv1 = DIV_ROUND_UP(VCO_MIN_HZ / 1000, freq_khz); in pll_para_config() 98 postdiv2 = DIV_ROUND_UP(postdiv1, max_postdiv1); in pll_para_config() 99 postdiv1 = DIV_ROUND_UP(postdiv1, postdiv2); in pll_para_config() 320 src_clk_div = DIV_ROUND_UP(clk_general_rate / 2, freq); in rockchip_mmc_set_clk() 323 src_clk_div = DIV_ROUND_UP(OSC_HZ / 2, freq); in rockchip_mmc_set_clk() 410 src_clk_div = DIV_ROUND_UP(OSC_HZ, hz) - 1; in rk3128_saradc_set_clk()
|
A D | clk_rk3288.c | 249 no = DIV_ROUND_UP(VCO_MIN_KHZ, freq_khz); in pll_para_config() 251 *ext_div = DIV_ROUND_UP(no, max_no); in pll_para_config() 252 no = DIV_ROUND_UP(no, *ext_div); in pll_para_config() 257 no = DIV_ROUND_UP(no, 2) * 2; in pll_para_config() 330 div = DIV_ROUND_UP(pll_rate, freq) - 1; in rockchip_mac_set_clk() 619 src_clk_div = DIV_ROUND_UP(gclk_rate / 2, freq); in rockchip_mmc_set_clk() 622 src_clk_div = DIV_ROUND_UP(OSC_HZ / 2, freq); in rockchip_mmc_set_clk() 697 src_clk_div = DIV_ROUND_UP(gclk_rate, freq) - 1; in rockchip_spi_set_clk() 740 src_clk_div = DIV_ROUND_UP(OSC_HZ, hz) - 1; in rockchip_saradc_set_clk()
|
/u-boot/include/linux/ |
A D | delay.h | 18 udelay(DIV_ROUND_UP(nsec, 1000)); in ndelay()
|
/u-boot/board/freescale/common/ |
A D | vid.c | 270 voltage_read = DIV_ROUND_UP(voltage_read, 128); in read_voltage_from_IR() 370 vout = DIV_ROUND_UP(vout * MV_PER_V, multiplier); in read_voltage_from_pmbus() 469 vid = DIV_ROUND_UP(vdd - 265, 5); in set_voltage_to_IR() 471 vid = DIV_ROUND_UP(vdd - 245, 5); in set_voltage_to_IR() 514 vdd = DIV_ROUND_UP(vdd * multiplier, MV_PER_V); in set_voltage_to_pmbus() 678 DIV_ROUND_UP(vdd_target, 10)); in adjust_vdd() 694 vdd_target = DIV_ROUND_UP(vdd_target, 10); in adjust_vdd()
|
/u-boot/arch/arm/cpu/armv8/fsl-layerscape/ |
A D | ppa.c | 102 cnt = DIV_ROUND_UP(fdt_header_len, 512); in ppa_init() 128 cnt = DIV_ROUND_UP(CONFIG_LS_PPA_ESBC_HDR_SIZE, 512); in ppa_init() 152 cnt = DIV_ROUND_UP(fw_length, 512); in ppa_init()
|
/u-boot/fs/squashfs/ |
A D | sqfs_inode.c | 36 blk_list_size = DIV_ROUND_UP(file_size, blk_size); in sqfs_inode_size() 72 blk_list_size = DIV_ROUND_UP(file_size, blk_size); in sqfs_inode_size()
|
/u-boot/arch/x86/include/asm/ |
A D | itss.h | 21 #define NUM_IPC_REGS DIV_ROUND_UP(ITSS_MAX_IRQ, IRQS_PER_IPC)
|
/u-boot/drivers/fpga/ |
A D | socfpga.c | 52 uint32_t loops4 = DIV_ROUND_UP(rbf_size % 32, 4); in fpgamgr_program_write()
|
/u-boot/lib/aes/ |
A D | aes-decrypt.c | 34 aes_blocks = DIV_ROUND_UP(cipher_len, AES_BLOCK_LENGTH); in image_aes_decrypt()
|
/u-boot/drivers/mtd/onenand/ |
A D | onenand_spl.c | 185 to_page = page + DIV_ROUND_UP(size, 2048); in onenand_spl_load_image() 188 to_page = page + DIV_ROUND_UP(size, 4096); in onenand_spl_load_image()
|
/u-boot/drivers/spi/ |
A D | cadence_qspi_apb.c | 272 div = DIV_ROUND_UP(ref_clk_hz, sclk_hz * 2) - 1; in cadence_qspi_apb_config_baudrate_div() 352 ref_clk_ns = DIV_ROUND_UP(1000000000, ref_clk); in cadence_qspi_apb_delay() 355 sclk_ns = DIV_ROUND_UP(1000000000, sclk_hz); in cadence_qspi_apb_delay() 362 tshsl = DIV_ROUND_UP(tshsl_ns, ref_clk_ns); in cadence_qspi_apb_delay() 363 tchsh = DIV_ROUND_UP(tchsh_ns, ref_clk_ns); in cadence_qspi_apb_delay() 364 tslch = DIV_ROUND_UP(tslch_ns, ref_clk_ns); in cadence_qspi_apb_delay() 365 tsd2d = DIV_ROUND_UP(tsd2d_ns, ref_clk_ns); in cadence_qspi_apb_delay()
|
/u-boot/tools/ |
A D | omapimage.c | 22 #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) macro 155 DIV_ROUND_UP(sbuf->st_size, sizeof(uint32_t)); in omapimage_set_header()
|
/u-boot/drivers/clk/ti/ |
A D | clk-divider.c | 97 return DIV_ROUND_UP(parent_rate, rate); in _div_round() 149 r = DIV_ROUND_UP(parent_round_rate, i); in clk_ti_divider_best_div() 181 return DIV_ROUND_UP(parent_rate, div); in clk_ti_divider_round_rate() 234 rate = DIV_ROUND_UP(parent_rate, div); in clk_ti_divider_get_rate()
|
/u-boot/drivers/mmc/ |
A D | sdhci-adma.c | 46 uint desc_count = DIV_ROUND_UP(trans_bytes, ADMA_MAX_LEN); in sdhci_prepare_adma_table()
|
/u-boot/drivers/watchdog/ |
A D | tangier_wdt.c | 62 in_size = DIV_ROUND_UP(sizeof(ipc_wd_start), 4); in tangier_wdt_start()
|
/u-boot/drivers/fastboot/ |
A D | fb_mmc.c | 305 hdr_sectors = DIV_ROUND_UP(sizeof(struct andr_img_hdr), sector_size); in fb_mmc_get_boot_header() 391 ramdisk_sector_start += DIV_ROUND_UP(hdr->kernel_size, hdr->page_size) * in fb_mmc_update_zimage() 393 ramdisk_sectors = DIV_ROUND_UP(hdr->ramdisk_size, hdr->page_size) * in fb_mmc_update_zimage() 418 kernel_sectors = DIV_ROUND_UP(hdr->kernel_size, hdr->page_size) * in fb_mmc_update_zimage() 430 ramdisk_sector_start += DIV_ROUND_UP(hdr->kernel_size, hdr->page_size) * in fb_mmc_update_zimage()
|
/u-boot/common/spl/ |
A D | spl_sata.c | 50 image_size_sectors = DIV_ROUND_UP(spl_image->size, stor_dev->blksz); in spl_sata_load_image_raw()
|
/u-boot/arch/arm/mach-sunxi/ |
A D | clock_sun4i.c | 134 axi = DIV_ROUND_UP(hz, 432000000); /* Max 450MHz */ in clock_set_pll1() 135 ahb = DIV_ROUND_UP(hz/axi, 204000000); /* Max 250MHz */ in clock_set_pll1()
|
/u-boot/drivers/i2c/ |
A D | rk_i2c.c | 54 *divh = DIV_ROUND_UP(div, 2); in rk_i2c_get_div() 70 div = DIV_ROUND_UP(i2c_rate, scl_rate * 8) - 2; in rk_i2c_set_clk() 209 words_xferred = DIV_ROUND_UP(bytes_xferred, 4); in rk_i2c_read() 287 words_xferred = DIV_ROUND_UP(bytes_xferred, 4); in rk_i2c_write()
|