Lines Matching refs:speed
167 enum stm32_i2c_speed speed; member
197 int speed; member
503 sdadel_min = setup->fall_time - i2c_specs[setup->speed].hddat_min - in stm32_i2c_compute_solutions()
506 sdadel_max = i2c_specs[setup->speed].vddat_max - setup->rise_time - in stm32_i2c_compute_solutions()
509 scldel_min = setup->rise_time + i2c_specs[setup->speed].sudat_min; in stm32_i2c_compute_solutions()
579 clk_max = STM32_NSEC_PER_SEC / i2c_specs[setup->speed].rate_min; in stm32_i2c_choose_solution()
580 clk_min = STM32_NSEC_PER_SEC / i2c_specs[setup->speed].rate_max; in stm32_i2c_choose_solution()
598 if ((tscl_l < i2c_specs[setup->speed].l_min) || in stm32_i2c_choose_solution()
610 (tscl_h >= i2c_specs[setup->speed].h_min) && in stm32_i2c_choose_solution()
645 if (setup->speed >= STM32_I2C_SPEED_END) { in stm32_i2c_compute_timing()
647 setup->speed, STM32_I2C_SPEED_END - 1); in stm32_i2c_compute_timing()
651 if ((setup->rise_time > i2c_specs[setup->speed].rise_max) || in stm32_i2c_compute_timing()
652 (setup->fall_time > i2c_specs[setup->speed].fall_max)) { in stm32_i2c_compute_timing()
655 setup->rise_time, i2c_specs[setup->speed].rise_max, in stm32_i2c_compute_timing()
656 setup->fall_time, i2c_specs[setup->speed].fall_max); in stm32_i2c_compute_timing()
666 if (setup->speed_freq > i2c_specs[setup->speed].rate) { in stm32_i2c_compute_timing()
668 setup->speed_freq, i2c_specs[setup->speed].rate); in stm32_i2c_compute_timing()
702 setup->speed = i2c_priv->speed; in stm32_i2c_setup_timing()
703 setup->speed_freq = i2c_specs[setup->speed].rate; in stm32_i2c_setup_timing()
716 if (i2c_priv->speed > STM32_I2C_SPEED_STANDARD) { in stm32_i2c_setup_timing()
717 i2c_priv->speed--; in stm32_i2c_setup_timing()
718 setup->speed = i2c_priv->speed; in stm32_i2c_setup_timing()
720 i2c_specs[setup->speed].rate; in stm32_i2c_setup_timing()
722 __func__, i2c_specs[setup->speed].rate); in stm32_i2c_setup_timing()
735 setup->speed, setup->speed_freq, setup->clock_src); in stm32_i2c_setup_timing()
776 static int stm32_i2c_set_bus_speed(struct udevice *bus, unsigned int speed) in stm32_i2c_set_bus_speed() argument
780 switch (speed) { in stm32_i2c_set_bus_speed()
782 i2c_priv->speed = STM32_I2C_SPEED_STANDARD; in stm32_i2c_set_bus_speed()
785 i2c_priv->speed = STM32_I2C_SPEED_FAST; in stm32_i2c_set_bus_speed()
788 i2c_priv->speed = STM32_I2C_SPEED_FAST_PLUS; in stm32_i2c_set_bus_speed()
791 debug("%s: Speed %d not supported\n", __func__, speed); in stm32_i2c_set_bus_speed()