Searched refs:div_b (Results 1 – 2 of 2) sorted by relevance
/openbmc/u-boot/drivers/i2c/ |
H A D | i2c-cdns.c | 165 unsigned int div_a, div_b, calc_div_a = 0, calc_div_b = 0; in cdns_i2c_calc_divs() local 180 div_b = DIV_ROUND_UP(input_clk, 22 * fscl * (div_a + 1)); in cdns_i2c_calc_divs() 182 if ((div_b < 1) || (div_b > CDNS_I2C_DIVB_MAX)) in cdns_i2c_calc_divs() 184 div_b--; in cdns_i2c_calc_divs() 186 actual_fscl = input_clk / (22 * (div_a + 1) * (div_b + 1)); in cdns_i2c_calc_divs() 196 calc_div_b = div_b; in cdns_i2c_calc_divs() 212 u32 div_a = 0, div_b = 0; in cdns_i2c_set_bus_speed() local 222 ret = cdns_i2c_calc_divs(&speed_p, bus->input_freq, &div_a, &div_b); in cdns_i2c_set_bus_speed() 227 __func__, div_a, div_b, bus->input_freq, speed, speed_p); in cdns_i2c_set_bus_speed() 229 writel((div_b << CDNS_I2C_CONTROL_DIV_B_SHIFT) | in cdns_i2c_set_bus_speed()
|
/openbmc/linux/drivers/i2c/busses/ |
H A D | i2c-cadence.c | 1018 unsigned int div_a, div_b, calc_div_a = 0, calc_div_b = 0; in cdns_i2c_calc_divs() local 1033 div_b = DIV_ROUND_UP(input_clk, 22 * fscl * (div_a + 1)); in cdns_i2c_calc_divs() 1035 if ((div_b < 1) || (div_b > CDNS_I2C_DIVB_MAX)) in cdns_i2c_calc_divs() 1037 div_b--; in cdns_i2c_calc_divs() 1039 actual_fscl = input_clk / (22 * (div_a + 1) * (div_b + 1)); in cdns_i2c_calc_divs() 1048 calc_div_b = div_b; in cdns_i2c_calc_divs() 1079 unsigned int div_a, div_b; in cdns_i2c_setclk() local 1084 ret = cdns_i2c_calc_divs(&fscl, clk_in, &div_a, &div_b); in cdns_i2c_setclk() 1091 (div_b << CDNS_I2C_CR_DIVB_SHIFT)); in cdns_i2c_setclk() 1131 unsigned int div_a, div_b; in cdns_i2c_clk_notifier_cb() local [all …]
|