Lines Matching refs:tfr
210 struct spi_transfer *tfr) in sun4i_spi_transfer_one() argument
220 if (tfr->len > SUN4I_MAX_XFER_SIZE) in sun4i_spi_transfer_one()
223 if (tfr->tx_buf && tfr->len >= SUN4I_MAX_XFER_SIZE) in sun4i_spi_transfer_one()
227 sspi->tx_buf = tfr->tx_buf; in sun4i_spi_transfer_one()
228 sspi->rx_buf = tfr->rx_buf; in sun4i_spi_transfer_one()
229 sspi->len = tfr->len; in sun4i_spi_transfer_one()
274 if (mclk_rate < (2 * tfr->speed_hz)) { in sun4i_spi_transfer_one()
275 clk_set_rate(sspi->mclk, 2 * tfr->speed_hz); in sun4i_spi_transfer_one()
293 div = mclk_rate / (2 * tfr->speed_hz); in sun4i_spi_transfer_one()
300 div = ilog2(mclk_rate) - ilog2(tfr->speed_hz); in sun4i_spi_transfer_one()
308 tx_len = tfr->len; in sun4i_spi_transfer_one()
311 sun4i_spi_write(sspi, SUN4I_BURST_CNT_REG, SUN4I_BURST_CNT(tfr->len)); in sun4i_spi_transfer_one()
332 tx_time = max(tfr->len * 8 * 2 / (tfr->speed_hz / 1000), 100U); in sun4i_spi_transfer_one()
340 dev_name(&spi->dev), tfr->len, tfr->speed_hz, in sun4i_spi_transfer_one()