Lines Matching refs:speed
124 uint i2c_clk, uint speed) in set_i2c_bus_speed() argument
126 ushort divider = min(i2c_clk / speed, (uint)USHRT_MAX); in set_i2c_bus_speed()
148 speed = i2c_clk / divider; /* Fake something */ in set_i2c_bus_speed()
150 debug("Requested speed:%d, i2c_clk:%d\n", speed, i2c_clk); in set_i2c_bus_speed()
166 speed = i2c_clk / est_div; in set_i2c_bus_speed()
171 debug("a: %d, b: %d, speed: %d\n", a, b, speed); in set_i2c_bus_speed()
185 debug("FDR: 0x%.2x, speed: %d\n", fdr, speed); in set_i2c_bus_speed()
197 speed = i2c_clk / fsl_i2c_speed_map[i].divider; in set_i2c_bus_speed()
203 return speed; in set_i2c_bus_speed()
264 static void __i2c_init(const struct fsl_i2c_base *base, int speed, int in __i2c_init() argument
279 set_i2c_bus_speed(base, i2c_clk, speed); in __i2c_init()
491 uint speed, int i2c_clk) in __i2c_set_bus_speed() argument
494 set_i2c_bus_speed(base, i2c_clk, speed); in __i2c_set_bus_speed()
501 static void fsl_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd) in fsl_i2c_init() argument
503 __i2c_init(i2c_base[adap->hwadapnr], speed, slaveadd, in fsl_i2c_init()
530 static uint fsl_i2c_set_bus_speed(struct i2c_adapter *adap, uint speed) in fsl_i2c_set_bus_speed() argument
532 return __i2c_set_bus_speed(i2c_base[adap->hwadapnr], speed, in fsl_i2c_set_bus_speed()
570 static int fsl_i2c_set_bus_speed(struct udevice *bus, uint speed)
574 return __i2c_set_bus_speed(dev->base, speed, dev->i2c_clk);
590 dev->speed = dev_read_u32_default(bus, "clock-frequency",
606 __i2c_init(dev->base, dev->speed, dev->slaveadd, dev->i2c_clk,