Home
last modified time | relevance | path

Searched refs:bytes_per_word (Results 1 – 13 of 13) sorted by relevance

/Linux-v4.19/drivers/spi/
Dspi-tegra20-slink.c179 unsigned bytes_per_word; member
251 switch (tspi->bytes_per_word) { in tegra_slink_get_packed_size()
276 tspi->bytes_per_word = DIV_ROUND_UP(bits_per_word, 8); in tegra_slink_calculate_curr_xfer_param()
289 tspi->curr_dma_words = max_len/tspi->bytes_per_word; in tegra_slink_calculate_curr_xfer_param()
292 max_word = (remain_len - 1) / tspi->bytes_per_word + 1; in tegra_slink_calculate_curr_xfer_param()
318 nbytes = written_words * tspi->bytes_per_word; in tegra_slink_fill_tx_fifo_from_client_txbuf()
329 nbytes = written_words * tspi->bytes_per_word; in tegra_slink_fill_tx_fifo_from_client_txbuf()
332 for (i = 0; nbytes && (i < tspi->bytes_per_word); in tegra_slink_fill_tx_fifo_from_client_txbuf()
338 tspi->cur_tx_pos += written_words * tspi->bytes_per_word; in tegra_slink_fill_tx_fifo_from_client_txbuf()
355 len = tspi->curr_dma_words * tspi->bytes_per_word; in tegra_slink_read_rx_fifo_to_client_rxbuf()
[all …]
Dspi-altera.c51 int bytes_per_word; member
84 switch (hw->bytes_per_word) { in altera_spi_tx_word()
104 switch (hw->bytes_per_word) { in altera_spi_rx_word()
126 hw->bytes_per_word = DIV_ROUND_UP(t->bits_per_word, 8); in altera_spi_txrx()
127 hw->len = t->len / hw->bytes_per_word; in altera_spi_txrx()
Dspi-tegra114.c180 unsigned bytes_per_word; member
260 tspi->bytes_per_word = DIV_ROUND_UP(bits_per_word, 8); in tegra_spi_calculate_curr_xfer_param()
272 tspi->curr_dma_words = max_len/tspi->bytes_per_word; in tegra_spi_calculate_curr_xfer_param()
275 max_word = (remain_len - 1) / tspi->bytes_per_word + 1; in tegra_spi_calculate_curr_xfer_param()
301 nbytes = written_words * tspi->bytes_per_word; in tegra_spi_fill_tx_fifo_from_client_txbuf()
313 nbytes = written_words * tspi->bytes_per_word; in tegra_spi_fill_tx_fifo_from_client_txbuf()
317 for (i = 0; nbytes && (i < tspi->bytes_per_word); in tegra_spi_fill_tx_fifo_from_client_txbuf()
323 tspi->cur_tx_pos += written_words * tspi->bytes_per_word; in tegra_spi_fill_tx_fifo_from_client_txbuf()
340 len = tspi->curr_dma_words * tspi->bytes_per_word; in tegra_spi_read_rx_fifo_to_client_rxbuf()
347 tspi->cur_rx_pos += tspi->curr_dma_words * tspi->bytes_per_word; in tegra_spi_read_rx_fifo_to_client_rxbuf()
[all …]
Dspi-meson-spicc.c132 unsigned int bytes_per_word; member
156 unsigned int bytes = spicc->bytes_per_word; in meson_spicc_pull_data()
174 unsigned int bytes = spicc->bytes_per_word; in meson_spicc_push_data()
222 spicc->xfer_remain -= burst_len * spicc->bytes_per_word; in meson_spicc_setup_burst()
281 spicc->xfer_remain / spicc->bytes_per_word, in meson_spicc_irq()
349 (spicc->bytes_per_word << 3) - 1); in meson_spicc_setup_xfer()
373 spicc->bytes_per_word = in meson_spicc_transfer_one()
380 spicc->xfer_remain / spicc->bytes_per_word, in meson_spicc_transfer_one()
Dspi-xilinx.c91 u8 bytes_per_word; member
127 switch (xspi->bytes_per_word) { in xilinx_spi_tx()
140 xspi->tx_ptr += xspi->bytes_per_word; in xilinx_spi_tx()
150 switch (xspi->bytes_per_word) { in xilinx_spi_rx()
162 xspi->rx_ptr += xspi->bytes_per_word; in xilinx_spi_rx()
251 remaining_words = t->len / xspi->bytes_per_word; in xilinx_spi_txrx_bufs()
467 xspi->bytes_per_word = bits_per_word / 8; in xilinx_spi_probe()
Dspi-fsl-dspi.c206 u8 bytes_per_word; member
220 if (dspi->bytes_per_word == 1) in dspi_pop_tx()
222 else if (dspi->bytes_per_word == 2) in dspi_pop_tx()
226 dspi->tx += dspi->bytes_per_word; in dspi_pop_tx()
228 dspi->len -= dspi->bytes_per_word; in dspi_pop_tx()
249 if (dspi->bytes_per_word == 1) in dspi_push_rx()
251 else if (dspi->bytes_per_word == 2) in dspi_push_rx()
255 dspi->rx += dspi->bytes_per_word; in dspi_push_rx()
367 / dspi->bytes_per_word; in dspi_dma_xfer()
378 dma->curr_xfer_len * dspi->bytes_per_word; in dspi_dma_xfer()
[all …]
Dspi-st-ssc4.c65 u16 bytes_per_word; member
84 if (spi_st->bytes_per_word == 1) { in ssc_write_tx_fifo()
110 if (spi_st->bytes_per_word == 1) { in ssc_read_rx_fifo()
136 spi_st->bytes_per_word = 2; in spi_st_transfer_one()
144 spi_st->bytes_per_word = 2; in spi_st_transfer_one()
154 spi_st->bytes_per_word = 1; in spi_st_transfer_one()
Dspi-tegra20-sflash.c128 unsigned bytes_per_word; member
175 tsd->bytes_per_word = DIV_ROUND_UP(t->bits_per_word, 8); in tegra_sflash_calculate_curr_xfer_param()
176 max_word = remain_len / tsd->bytes_per_word; in tegra_sflash_calculate_curr_xfer_param()
193 nbytes = max_n_32bit * tsd->bytes_per_word; in tegra_sflash_fill_tx_fifo_from_client_txbuf()
200 for (i = 0; nbytes && (i < tsd->bytes_per_word); in tegra_sflash_fill_tx_fifo_from_client_txbuf()
209 tsd->cur_tx_pos += max_n_32bit * tsd->bytes_per_word; in tegra_sflash_fill_tx_fifo_from_client_txbuf()
225 for (i = 0; (i < tsd->bytes_per_word); i++) in tegra_sflash_read_rx_fifo_to_client_rxbuf()
230 tsd->cur_rx_pos += read_words * tsd->bytes_per_word; in tegra_sflash_read_rx_fifo_to_client_rxbuf()
Dspi-uniphier.c89 static inline unsigned int bytes_per_word(unsigned int bits) in bytes_per_word() function
242 wsize = min(bytes_per_word(priv->bits_per_word), priv->tx_bytes); in uniphier_spi_send()
269 rsize = min(bytes_per_word(priv->bits_per_word), priv->rx_bytes); in uniphier_spi_recv()
297 bytes_per_word(priv->bits_per_word)); in uniphier_spi_fill_tx_fifo()
Dspi-davinci.c138 u8 *bytes_per_word; member
307 dspi->bytes_per_word[spi->chip_select] = 1; in davinci_spi_setup_transfer()
311 dspi->bytes_per_word[spi->chip_select] = 2; in davinci_spi_setup_transfer()
614 data_type = dspi->bytes_per_word[spi->chip_select]; in davinci_spi_bufs()
926 dspi->bytes_per_word = devm_kcalloc(&pdev->dev, in davinci_spi_probe()
928 sizeof(*dspi->bytes_per_word), in davinci_spi_probe()
930 if (dspi->bytes_per_word == NULL) { in davinci_spi_probe()
Dspi-imx.c219 unsigned int bytes_per_word, i; in spi_imx_can_dma() local
227 bytes_per_word = spi_imx_bytes_per_word(transfer->bits_per_word); in spi_imx_can_dma()
230 if (!(transfer->len % (i * bytes_per_word))) in spi_imx_can_dma()
283 unsigned int bytes_per_word; in spi_imx_buf_rx_swap_u32() local
288 bytes_per_word = spi_imx_bytes_per_word(spi_imx->bits_per_word); in spi_imx_buf_rx_swap_u32()
289 if (bytes_per_word == 1) in spi_imx_buf_rx_swap_u32()
291 else if (bytes_per_word == 2) in spi_imx_buf_rx_swap_u32()
333 unsigned int bytes_per_word; in spi_imx_buf_tx_swap_u32() local
343 bytes_per_word = spi_imx_bytes_per_word(spi_imx->bits_per_word); in spi_imx_buf_tx_swap_u32()
345 if (bytes_per_word == 1) in spi_imx_buf_tx_swap_u32()
[all …]
Dspi-sh-msiof.c926 unsigned int bytes_per_word; in sh_msiof_transfer_one() local
993 bytes_per_word = 1; in sh_msiof_transfer_one()
997 bytes_per_word = 2; in sh_msiof_transfer_one()
1008 bytes_per_word = 4; in sh_msiof_transfer_one()
1019 bytes_per_word = 4; in sh_msiof_transfer_one()
1032 words = len / bytes_per_word; in sh_msiof_transfer_one()
1041 tx_buf += n * bytes_per_word; in sh_msiof_transfer_one()
1043 rx_buf += n * bytes_per_word; in sh_msiof_transfer_one()
Dspi-omap2-mcspi.c302 int max_fifo_depth, fifo_depth, bytes_per_word; in omap2_mcspi_set_fifo() local
309 bytes_per_word = mcspi_bytes_per_word(cs->word_len); in omap2_mcspi_set_fifo()
310 if (t->len % bytes_per_word != 0) in omap2_mcspi_set_fifo()
319 if (fifo_depth < 2 || fifo_depth % bytes_per_word != 0) in omap2_mcspi_set_fifo()
322 wcnt = t->len / bytes_per_word; in omap2_mcspi_set_fifo()
551 int bytes_per_word = mcspi_bytes_per_word(word_len); in omap2_mcspi_rx_dma() local
553 count -= (bytes_per_word << 1); in omap2_mcspi_rx_dma()