Lines Matching full:speed
20 static int spi_set_speed_mode(struct udevice *bus, int speed, int mode) in spi_set_speed_mode() argument
27 ret = ops->set_speed(bus, speed); in spi_set_speed_mode()
31 printf("Cannot set speed (err=%d)\n", ret); in spi_set_speed_mode()
53 int speed; in dm_spi_claim_bus() local
55 speed = slave->max_hz; in dm_spi_claim_bus()
57 if (speed) in dm_spi_claim_bus()
58 speed = min(speed, (int)spi->max_hz); in dm_spi_claim_bus()
60 speed = spi->max_hz; in dm_spi_claim_bus()
62 if (!speed) in dm_spi_claim_bus()
63 speed = SPI_DEFAULT_SPEED_HZ; in dm_spi_claim_bus()
64 if (speed != slave->speed) { in dm_spi_claim_bus()
65 int ret = spi_set_speed_mode(bus, speed, slave->mode); in dm_spi_claim_bus()
69 slave->speed = speed; in dm_spi_claim_bus()
299 int spi_get_bus_and_cs(int busnum, int cs, int speed, int mode, in spi_get_bus_and_cs() argument
335 if (speed) { in spi_get_bus_and_cs()
336 plat->max_hz = speed; in spi_get_bus_and_cs()
338 printf("Warning: SPI speed fallback to %u kHz\n", in spi_get_bus_and_cs()
361 if (!speed) { in spi_get_bus_and_cs()
362 speed = plat->max_hz; in spi_get_bus_and_cs()
365 ret = spi_set_speed_mode(bus, speed, mode); in spi_get_bus_and_cs()
388 unsigned int speed, unsigned int mode) in spi_setup_slave() argument
394 ret = spi_get_bus_and_cs(busnum, cs, speed, mode, NULL, 0, &dev, in spi_setup_slave()