| /Linux-v5.4/drivers/spi/ |
| D | spi-tegra20-slink.c | 168 unsigned bytes_per_word; member 240 switch (tspi->bytes_per_word) { in tegra_slink_get_packed_size() 265 tspi->bytes_per_word = DIV_ROUND_UP(bits_per_word, 8); in tegra_slink_calculate_curr_xfer_param() 278 tspi->curr_dma_words = max_len/tspi->bytes_per_word; in tegra_slink_calculate_curr_xfer_param() 281 max_word = (remain_len - 1) / tspi->bytes_per_word + 1; in tegra_slink_calculate_curr_xfer_param() 307 nbytes = written_words * tspi->bytes_per_word; in tegra_slink_fill_tx_fifo_from_client_txbuf() 318 nbytes = written_words * tspi->bytes_per_word; in tegra_slink_fill_tx_fifo_from_client_txbuf() 321 for (i = 0; nbytes && (i < tspi->bytes_per_word); in tegra_slink_fill_tx_fifo_from_client_txbuf() 327 tspi->cur_tx_pos += written_words * tspi->bytes_per_word; in tegra_slink_fill_tx_fifo_from_client_txbuf() 344 len = tspi->curr_dma_words * tspi->bytes_per_word; in tegra_slink_read_rx_fifo_to_client_rxbuf() [all …]
|
| D | spi-altera.c | 48 int bytes_per_word; member 81 switch (hw->bytes_per_word) { in altera_spi_tx_word() 101 switch (hw->bytes_per_word) { in altera_spi_rx_word() 123 hw->bytes_per_word = DIV_ROUND_UP(t->bits_per_word, 8); in altera_spi_txrx() 124 hw->len = t->len / hw->bytes_per_word; in altera_spi_txrx()
|
| D | spi-tegra114.c | 182 unsigned bytes_per_word; member 268 tspi->bytes_per_word = DIV_ROUND_UP(bits_per_word, 8); in tegra_spi_calculate_curr_xfer_param() 281 tspi->curr_dma_words = max_len/tspi->bytes_per_word; in tegra_spi_calculate_curr_xfer_param() 284 max_word = (remain_len - 1) / tspi->bytes_per_word + 1; in tegra_spi_calculate_curr_xfer_param() 310 nbytes = written_words * tspi->bytes_per_word; in tegra_spi_fill_tx_fifo_from_client_txbuf() 320 tspi->cur_tx_pos += written_words * tspi->bytes_per_word; in tegra_spi_fill_tx_fifo_from_client_txbuf() 325 nbytes = written_words * tspi->bytes_per_word; in tegra_spi_fill_tx_fifo_from_client_txbuf() 332 for (i = 0; nbytes && (i < tspi->bytes_per_word); in tegra_spi_fill_tx_fifo_from_client_txbuf() 357 len = tspi->curr_dma_words * tspi->bytes_per_word; in tegra_spi_read_rx_fifo_to_client_rxbuf() 365 tspi->cur_rx_pos += tspi->curr_dma_words * tspi->bytes_per_word; in tegra_spi_read_rx_fifo_to_client_rxbuf() [all …]
|
| D | spi-meson-spicc.c | 132 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()
|
| D | spi-xilinx.c | 89 u8 bytes_per_word; member 125 switch (xspi->bytes_per_word) { in xilinx_spi_tx() 138 xspi->tx_ptr += xspi->bytes_per_word; in xilinx_spi_tx() 148 switch (xspi->bytes_per_word) { in xilinx_spi_rx() 160 xspi->rx_ptr += xspi->bytes_per_word; in xilinx_spi_rx() 249 remaining_words = t->len / xspi->bytes_per_word; in xilinx_spi_txrx_bufs() 465 xspi->bytes_per_word = bits_per_word / 8; in xilinx_spi_probe()
|
| D | spi-fsl-dspi.c | 192 u8 bytes_per_word; member 206 if (dspi->bytes_per_word == 1) in dspi_pop_tx() 208 else if (dspi->bytes_per_word == 2) in dspi_pop_tx() 212 dspi->tx += dspi->bytes_per_word; in dspi_pop_tx() 214 dspi->len -= dspi->bytes_per_word; in dspi_pop_tx() 238 if (dspi->bytes_per_word == 1) in dspi_push_rx() 240 else if (dspi->bytes_per_word == 2) in dspi_push_rx() 244 dspi->rx += dspi->bytes_per_word; in dspi_push_rx() 361 / dspi->bytes_per_word; in dspi_dma_xfer() 372 dma->curr_xfer_len * dspi->bytes_per_word; in dspi_dma_xfer() [all …]
|
| D | spi-st-ssc4.c | 63 u16 bytes_per_word; member 82 if (spi_st->bytes_per_word == 1) { in ssc_write_tx_fifo() 108 if (spi_st->bytes_per_word == 1) { in ssc_read_rx_fifo() 134 spi_st->bytes_per_word = 2; in spi_st_transfer_one() 142 spi_st->bytes_per_word = 2; in spi_st_transfer_one() 152 spi_st->bytes_per_word = 1; in spi_st_transfer_one()
|
| D | spi-tegra20-sflash.c | 117 unsigned bytes_per_word; member 164 tsd->bytes_per_word = DIV_ROUND_UP(t->bits_per_word, 8); in tegra_sflash_calculate_curr_xfer_param() 165 max_word = remain_len / tsd->bytes_per_word; in tegra_sflash_calculate_curr_xfer_param() 182 nbytes = max_n_32bit * tsd->bytes_per_word; in tegra_sflash_fill_tx_fifo_from_client_txbuf() 189 for (i = 0; nbytes && (i < tsd->bytes_per_word); in tegra_sflash_fill_tx_fifo_from_client_txbuf() 198 tsd->cur_tx_pos += max_n_32bit * tsd->bytes_per_word; in tegra_sflash_fill_tx_fifo_from_client_txbuf() 214 for (i = 0; (i < tsd->bytes_per_word); i++) in tegra_sflash_read_rx_fifo_to_client_rxbuf() 219 tsd->cur_rx_pos += read_words * tsd->bytes_per_word; in tegra_sflash_read_rx_fifo_to_client_rxbuf()
|
| D | spi-sh-msiof.c | 918 unsigned int bytes_per_word; in sh_msiof_transfer_one() local 984 bytes_per_word = 1; in sh_msiof_transfer_one() 988 bytes_per_word = 2; in sh_msiof_transfer_one() 999 bytes_per_word = 4; in sh_msiof_transfer_one() 1010 bytes_per_word = 4; in sh_msiof_transfer_one() 1023 words = len / bytes_per_word; in sh_msiof_transfer_one() 1032 tx_buf += n * bytes_per_word; in sh_msiof_transfer_one() 1034 rx_buf += n * bytes_per_word; in sh_msiof_transfer_one() 1037 if (words == 0 && (len % bytes_per_word)) { in sh_msiof_transfer_one() 1038 words = len % bytes_per_word; in sh_msiof_transfer_one() [all …]
|
| D | spi-davinci.c | 128 u8 *bytes_per_word; member 301 dspi->bytes_per_word[spi->chip_select] = 1; in davinci_spi_setup_transfer() 305 dspi->bytes_per_word[spi->chip_select] = 2; in davinci_spi_setup_transfer() 588 data_type = dspi->bytes_per_word[spi->chip_select]; in davinci_spi_bufs() 900 dspi->bytes_per_word = devm_kcalloc(&pdev->dev, in davinci_spi_probe() 902 sizeof(*dspi->bytes_per_word), in davinci_spi_probe() 904 if (dspi->bytes_per_word == NULL) { in davinci_spi_probe()
|
| D | spi-imx.c | 286 unsigned int bytes_per_word; in spi_imx_buf_rx_swap_u32() local 291 bytes_per_word = spi_imx_bytes_per_word(spi_imx->bits_per_word); in spi_imx_buf_rx_swap_u32() 292 if (bytes_per_word == 1) in spi_imx_buf_rx_swap_u32() 294 else if (bytes_per_word == 2) in spi_imx_buf_rx_swap_u32() 336 unsigned int bytes_per_word; in spi_imx_buf_tx_swap_u32() local 346 bytes_per_word = spi_imx_bytes_per_word(spi_imx->bits_per_word); in spi_imx_buf_tx_swap_u32() 348 if (bytes_per_word == 1) in spi_imx_buf_tx_swap_u32() 350 else if (bytes_per_word == 2) in spi_imx_buf_tx_swap_u32() 1342 unsigned int bytes_per_word, i; in spi_imx_dma_transfer() local 1346 bytes_per_word = spi_imx_bytes_per_word(transfer->bits_per_word); in spi_imx_dma_transfer() [all …]
|
| D | spi-uniphier.c | 91 static inline unsigned int bytes_per_word(unsigned int bits) in bytes_per_word() function 244 wsize = min(bytes_per_word(priv->bits_per_word), priv->tx_bytes); in uniphier_spi_send() 271 rsize = min(bytes_per_word(priv->bits_per_word), priv->rx_bytes); in uniphier_spi_recv() 299 bytes_per_word(priv->bits_per_word)); in uniphier_spi_fill_tx_fifo()
|
| D | spi-npcm-pspi.c | 68 static inline unsigned int bytes_per_word(unsigned int bits) in bytes_per_word() function 199 wsize = min(bytes_per_word(priv->bits_per_word), priv->tx_bytes); in npcm_pspi_send() 225 rsize = min(bytes_per_word(priv->bits_per_word), priv->rx_bytes); in npcm_pspi_recv()
|
| D | spi-omap2-mcspi.c | 300 int max_fifo_depth, bytes_per_word; in omap2_mcspi_set_fifo() local 307 bytes_per_word = mcspi_bytes_per_word(cs->word_len); in omap2_mcspi_set_fifo() 308 if (t->len % bytes_per_word != 0) in omap2_mcspi_set_fifo() 316 wcnt = t->len / bytes_per_word; in omap2_mcspi_set_fifo() 323 xferlevel |= (bytes_per_word - 1) << 8; in omap2_mcspi_set_fifo() 328 xferlevel |= bytes_per_word - 1; in omap2_mcspi_set_fifo() 555 int bytes_per_word = mcspi_bytes_per_word(word_len); in omap2_mcspi_rx_dma() local 557 count -= (bytes_per_word << 1); in omap2_mcspi_rx_dma()
|
| D | spi-fsl-lpspi.c | 184 unsigned int bytes_per_word; in fsl_lpspi_can_dma() local 189 bytes_per_word = fsl_lpspi_bytes_per_word(transfer->bits_per_word); in fsl_lpspi_can_dma() 191 switch (bytes_per_word) in fsl_lpspi_can_dma()
|
| D | spi-rockchip.c | 576 unsigned int bytes_per_word = xfer->bits_per_word <= 8 ? 1 : 2; in rockchip_spi_can_dma() local 582 return xfer->len / bytes_per_word >= rs->fifo_len; in rockchip_spi_can_dma()
|