Lines Matching refs:speed
140 unsigned int speed; member
168 static int omap24_i2c_findpsc(u32 *pscl, u32 *psch, uint speed) in omap24_i2c_findpsc() argument
185 speed /= 1000; /* convert speed to kHz */ in omap24_i2c_findpsc()
187 if (speed > 100) in omap24_i2c_findpsc()
196 if (speed > 100) { in omap24_i2c_findpsc()
200 scl = internal_clk / speed; in omap24_i2c_findpsc()
205 *pscl = internal_clk / (speed * 2) - I2C_FASTSPEED_SCLL_TRIM; in omap24_i2c_findpsc()
206 *psch = internal_clk / (speed * 2) - I2C_FASTSPEED_SCLH_TRIM; in omap24_i2c_findpsc()
210 __func__, speed, prescaler, *pscl, *psch); in omap24_i2c_findpsc()
304 static int __omap24_i2c_setspeed(void __iomem *i2c_base, int ip_rev, uint speed, in __omap24_i2c_setspeed() argument
311 if (speed >= I2C_SPEED_HIGH_RATE) { in __omap24_i2c_setspeed()
321 fsscll = I2C_INTERNAL_SAMPLING_CLK / (2 * speed); in __omap24_i2c_setspeed()
334 hsscll = hssclh = I2C_INTERNAL_SAMPLING_CLK / (2 * speed); in __omap24_i2c_setspeed()
349 psc = omap24_i2c_findpsc(&scll, &sclh, speed); in __omap24_i2c_setspeed()
357 *waitdelay = (10000000 / speed) * 2; in __omap24_i2c_setspeed()
419 static void __omap24_i2c_init(void __iomem *i2c_base, int ip_rev, int speed, in __omap24_i2c_init() argument
446 if (__omap24_i2c_setspeed(i2c_base, ip_rev, speed, waitdelay)) { in __omap24_i2c_init()
905 static uint omap24_i2c_setspeed(struct i2c_adapter *adap, uint speed) in omap24_i2c_setspeed() argument
911 ret = __omap24_i2c_setspeed(i2c_base, ip_rev, speed, &adap->waitdelay); in omap24_i2c_setspeed()
917 adap->speed = speed; in omap24_i2c_setspeed()
922 static void omap24_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd) in omap24_i2c_init() argument
927 return __omap24_i2c_init(i2c_base, ip_rev, speed, slaveadd, in omap24_i2c_init()
1030 static int omap_i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
1034 priv->speed = speed;
1036 return __omap24_i2c_setspeed(priv->regs, priv->ip_rev, speed,
1054 priv->speed = plat->speed;
1059 __omap24_i2c_init(priv->regs, priv->ip_rev, priv->speed, 0,
1071 plat->speed = dev_read_u32_default(bus, "clock-frequency",