Searched refs:ckdiv (Results 1 – 4 of 4) sorted by relevance
/openbmc/u-boot/drivers/i2c/ |
H A D | at91_i2c.c | 157 int ckdiv, cdiv, div; in at91_calc_i2c_clock() local 163 ckdiv = fls(div >> 8); in at91_calc_i2c_clock() 164 cdiv = div >> ckdiv; in at91_calc_i2c_clock() 166 if (ckdiv > max_ckdiv) { in at91_calc_i2c_clock() 167 ckdiv = max_ckdiv; in at91_calc_i2c_clock() 172 (cdiv * (1 << ckdiv) + offset) * 2); in at91_calc_i2c_clock() 174 bus->cwgr_val = (ckdiv << 16) | (cdiv << 8) | cdiv; in at91_calc_i2c_clock()
|
/openbmc/linux/drivers/i2c/busses/ |
H A D | i2c-at91-master.c | 68 int ckdiv, cdiv, div, hold = 0, filter_width = 0; in at91_calc_twi_clock() local 78 ckdiv = fls(div >> 8); in at91_calc_twi_clock() 79 cdiv = div >> ckdiv; in at91_calc_twi_clock() 81 if (ckdiv > max_ckdiv) { in at91_calc_twi_clock() 83 ckdiv, max_ckdiv); in at91_calc_twi_clock() 84 ckdiv = max_ckdiv; in at91_calc_twi_clock() 122 dev->twi_cwgr_reg = (ckdiv << 16) | (cdiv << 8) | cdiv in at91_calc_twi_clock() 128 cdiv, ckdiv, hold, t->sda_hold_ns, filter_width, in at91_calc_twi_clock()
|
/openbmc/linux/drivers/spi/ |
H A D | spi-npcm-pspi.c | 148 u32 ckdiv; in npcm_pspi_set_baudrate() local 152 ckdiv = DIV_ROUND_CLOSEST(clk_get_rate(priv->clk), (2 * speed)) - 1; in npcm_pspi_set_baudrate() 156 iowrite16(regtemp | (ckdiv << 9), NPCM_PSPI_CTL1 + priv->base); in npcm_pspi_set_baudrate()
|
H A D | spi-uniphier.c | 202 u32 val, ckdiv; in uniphier_spi_set_baudrate() local 208 ckdiv = DIV_ROUND_UP(clk_get_rate(priv->clk), speed); in uniphier_spi_set_baudrate() 209 ckdiv = round_up(ckdiv, 2); in uniphier_spi_set_baudrate() 213 val |= ckdiv & SSI_CKS_CKRAT_MASK; in uniphier_spi_set_baudrate()
|