Lines Matching refs:tfr
206 struct spi_transfer *tfr) in sun4i_spi_transfer_one() argument
216 if (tfr->len > SUN4I_MAX_XFER_SIZE) in sun4i_spi_transfer_one()
219 if (tfr->tx_buf && tfr->len >= SUN4I_MAX_XFER_SIZE) in sun4i_spi_transfer_one()
223 sspi->tx_buf = tfr->tx_buf; in sun4i_spi_transfer_one()
224 sspi->rx_buf = tfr->rx_buf; in sun4i_spi_transfer_one()
225 sspi->len = tfr->len; in sun4i_spi_transfer_one()
270 if (mclk_rate < (2 * tfr->speed_hz)) { in sun4i_spi_transfer_one()
271 clk_set_rate(sspi->mclk, 2 * tfr->speed_hz); in sun4i_spi_transfer_one()
289 div = mclk_rate / (2 * tfr->speed_hz); in sun4i_spi_transfer_one()
296 div = ilog2(mclk_rate) - ilog2(tfr->speed_hz); in sun4i_spi_transfer_one()
304 tx_len = tfr->len; in sun4i_spi_transfer_one()
307 sun4i_spi_write(sspi, SUN4I_BURST_CNT_REG, SUN4I_BURST_CNT(tfr->len)); in sun4i_spi_transfer_one()
328 tx_time = max(tfr->len * 8 * 2 / (tfr->speed_hz / 1000), 100U); in sun4i_spi_transfer_one()
336 dev_name(&spi->dev), tfr->len, tfr->speed_hz, in sun4i_spi_transfer_one()