Home
last modified time | relevance | path

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

/Linux-v6.6/drivers/spi/
Dspi-tegra20-slink.c170 unsigned bytes_per_word; member
239 switch (tspi->bytes_per_word) { in tegra_slink_get_packed_size()
264 tspi->bytes_per_word = DIV_ROUND_UP(bits_per_word, 8); in tegra_slink_calculate_curr_xfer_param()
277 tspi->curr_dma_words = max_len/tspi->bytes_per_word; in tegra_slink_calculate_curr_xfer_param()
280 max_word = (remain_len - 1) / tspi->bytes_per_word + 1; in tegra_slink_calculate_curr_xfer_param()
306 nbytes = written_words * tspi->bytes_per_word; in tegra_slink_fill_tx_fifo_from_client_txbuf()
317 nbytes = written_words * tspi->bytes_per_word; in tegra_slink_fill_tx_fifo_from_client_txbuf()
320 for (i = 0; nbytes && (i < tspi->bytes_per_word); in tegra_slink_fill_tx_fifo_from_client_txbuf()
326 tspi->cur_tx_pos += written_words * tspi->bytes_per_word; in tegra_slink_fill_tx_fifo_from_client_txbuf()
343 len = tspi->curr_dma_words * tspi->bytes_per_word; in tegra_slink_read_rx_fifo_to_client_rxbuf()
[all …]
Dspi-tegra114.c181 unsigned bytes_per_word; member
267 tspi->bytes_per_word = DIV_ROUND_UP(bits_per_word, 8); in tegra_spi_calculate_curr_xfer_param()
280 tspi->curr_dma_words = max_len/tspi->bytes_per_word; in tegra_spi_calculate_curr_xfer_param()
283 max_word = (remain_len - 1) / tspi->bytes_per_word + 1; in tegra_spi_calculate_curr_xfer_param()
309 nbytes = written_words * tspi->bytes_per_word; in tegra_spi_fill_tx_fifo_from_client_txbuf()
319 tspi->cur_tx_pos += written_words * tspi->bytes_per_word; in tegra_spi_fill_tx_fifo_from_client_txbuf()
324 nbytes = written_words * tspi->bytes_per_word; in tegra_spi_fill_tx_fifo_from_client_txbuf()
331 for (i = 0; nbytes && (i < tspi->bytes_per_word); in tegra_spi_fill_tx_fifo_from_client_txbuf()
356 len = tspi->curr_dma_words * tspi->bytes_per_word; in tegra_spi_read_rx_fifo_to_client_rxbuf()
364 tspi->cur_rx_pos += tspi->curr_dma_words * tspi->bytes_per_word; in tegra_spi_read_rx_fifo_to_client_rxbuf()
[all …]
Dspi-tegra210-quad.c190 unsigned int bytes_per_word; member
274 tqspi->bytes_per_word = DIV_ROUND_UP(bits_per_word, 8); in tegra_qspi_calculate_curr_xfer_param()
294 tqspi->curr_dma_words = max_len / tqspi->bytes_per_word; in tegra_qspi_calculate_curr_xfer_param()
297 max_word = (remain_len - 1) / tqspi->bytes_per_word + 1; in tegra_qspi_calculate_curr_xfer_param()
320 len = written_words * tqspi->bytes_per_word; in tegra_qspi_fill_tx_fifo_from_client_txbuf()
330 tqspi->cur_tx_pos += written_words * tqspi->bytes_per_word; in tegra_qspi_fill_tx_fifo_from_client_txbuf()
333 u8 bytes_per_word = tqspi->bytes_per_word; in tegra_qspi_fill_tx_fifo_from_client_txbuf() local
337 len = written_words * tqspi->bytes_per_word; in tegra_qspi_fill_tx_fifo_from_client_txbuf()
344 for (i = 0; len && (i < bytes_per_word); i++, len--) in tegra_qspi_fill_tx_fifo_from_client_txbuf()
366 len = tqspi->curr_dma_words * tqspi->bytes_per_word; in tegra_qspi_read_rx_fifo_to_client_rxbuf()
[all …]
Dspi-altera-core.c94 switch (hw->bytes_per_word) { in altera_spi_tx_word()
121 switch (hw->bytes_per_word) { in altera_spi_rx_word()
151 hw->bytes_per_word = DIV_ROUND_UP(t->bits_per_word, 8); in altera_spi_txrx()
152 hw->len = t->len / hw->bytes_per_word; in altera_spi_txrx()
Dspi-xilinx.c89 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()
470 xspi->bytes_per_word = bits_per_word / 8; in xilinx_spi_probe()
Dspi-st-ssc4.c62 u16 bytes_per_word; member
81 if (spi_st->bytes_per_word == 1) { in ssc_write_tx_fifo()
107 if (spi_st->bytes_per_word == 1) { in ssc_read_rx_fifo()
133 spi_st->bytes_per_word = 2; in spi_st_transfer_one()
141 spi_st->bytes_per_word = 2; in spi_st_transfer_one()
151 spi_st->bytes_per_word = 1; in spi_st_transfer_one()
Dspi-tegra20-sflash.c117 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()
Dspi-rzv2m-csi.c98 unsigned int bytes_per_word; member
153 if (csi->bytes_per_word == 2) { in rzv2m_csi_fill_txfifo()
178 if (csi->bytes_per_word == 2) { in rzv2m_csi_read_rxfifo()
212 if (csi->bytes_per_word == 2) in rzv2m_csi_calc_current_transfer()
223 if (csi->bytes_per_word == 2) in rzv2m_csi_calc_current_transfer()
383 csi->bytes_per_word = t->bits_per_word / 8; in rzv2m_csi_setup_operating_mode()
385 csi->bytes_per_word == 2); in rzv2m_csi_setup_operating_mode()
Dspi-meson-spicc.c167 unsigned int bytes_per_word; member
219 unsigned int bytes = spicc->bytes_per_word; in meson_spicc_pull_data()
237 unsigned int bytes = spicc->bytes_per_word; in meson_spicc_push_data()
273 spicc->bytes_per_word, in meson_spicc_setup_burst()
278 spicc->xfer_remain -= burst_len * spicc->bytes_per_word; in meson_spicc_setup_burst()
371 (spicc->bytes_per_word << 3) - 1); in meson_spicc_setup_xfer()
418 spicc->bytes_per_word = in meson_spicc_transfer_one()
421 if (xfer->len % spicc->bytes_per_word) in meson_spicc_transfer_one()
Dspi-sh-msiof.c918 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 …]
Dspi-davinci.c127 u8 *bytes_per_word; member
295 dspi->bytes_per_word[spi_get_chipselect(spi, 0)] = 1; in davinci_spi_setup_transfer()
299 dspi->bytes_per_word[spi_get_chipselect(spi, 0)] = 2; in davinci_spi_setup_transfer()
581 data_type = dspi->bytes_per_word[spi_get_chipselect(spi, 0)]; in davinci_spi_bufs()
888 dspi->bytes_per_word = devm_kcalloc(&pdev->dev, in davinci_spi_probe()
890 sizeof(*dspi->bytes_per_word), in davinci_spi_probe()
892 if (dspi->bytes_per_word == NULL) { in davinci_spi_probe()
Dspi-imx.c312 unsigned int bytes_per_word; in spi_imx_buf_rx_swap_u32() local
314 bytes_per_word = spi_imx_bytes_per_word(spi_imx->bits_per_word); in spi_imx_buf_rx_swap_u32()
315 if (bytes_per_word == 1) in spi_imx_buf_rx_swap_u32()
317 else if (bytes_per_word == 2) in spi_imx_buf_rx_swap_u32()
359 unsigned int bytes_per_word; in spi_imx_buf_tx_swap_u32() local
369 bytes_per_word = spi_imx_bytes_per_word(spi_imx->bits_per_word); in spi_imx_buf_tx_swap_u32()
371 if (bytes_per_word == 1) in spi_imx_buf_tx_swap_u32()
373 else if (bytes_per_word == 2) in spi_imx_buf_tx_swap_u32()
1404 unsigned int bytes_per_word, i; in spi_imx_dma_transfer() local
1408 bytes_per_word = spi_imx_bytes_per_word(transfer->bits_per_word); in spi_imx_dma_transfer()
[all …]
Dspi-npcm-pspi.c61 static inline unsigned int bytes_per_word(unsigned int bits) in bytes_per_word() function
200 wsize = min(bytes_per_word(priv->bits_per_word), priv->tx_bytes); in npcm_pspi_send()
227 rsize = min(bytes_per_word(priv->bits_per_word), priv->rx_bytes); in npcm_pspi_recv()
Dspi-uniphier.c103 static inline unsigned int bytes_per_word(unsigned int bits) in bytes_per_word() function
256 wsize = min(bytes_per_word(priv->bits_per_word), priv->tx_bytes); in uniphier_spi_send()
283 rsize = min(bytes_per_word(priv->bits_per_word), priv->rx_bytes); in uniphier_spi_recv()
320 unsigned int bpw = bytes_per_word(priv->bits_per_word); in uniphier_spi_fill_tx_fifo()
354 unsigned int bpw = bytes_per_word(priv->bits_per_word); in uniphier_spi_can_dma()
Dspi-omap2-mcspi.c298 int max_fifo_depth, bytes_per_word; in omap2_mcspi_set_fifo() local
305 bytes_per_word = mcspi_bytes_per_word(cs->word_len); in omap2_mcspi_set_fifo()
306 if (t->len % bytes_per_word != 0) in omap2_mcspi_set_fifo()
314 wcnt = t->len / bytes_per_word; in omap2_mcspi_set_fifo()
321 xferlevel |= (bytes_per_word - 1) << 8; in omap2_mcspi_set_fifo()
326 xferlevel |= bytes_per_word - 1; in omap2_mcspi_set_fifo()
552 int bytes_per_word = mcspi_bytes_per_word(word_len); in omap2_mcspi_rx_dma() local
554 count -= (bytes_per_word << 1); in omap2_mcspi_rx_dma()
Dspi-fsl-lpspi.c177 unsigned int bytes_per_word; in fsl_lpspi_can_dma() local
182 bytes_per_word = fsl_lpspi_bytes_per_word(transfer->bits_per_word); in fsl_lpspi_can_dma()
184 switch (bytes_per_word) { in fsl_lpspi_can_dma()
Dspi-rockchip.c715 unsigned int bytes_per_word = xfer->bits_per_word <= 8 ? 1 : 2; in rockchip_spi_can_dma() local
721 return xfer->len / bytes_per_word >= rs->fifo_len; in rockchip_spi_can_dma()
Dspi-geni-qcom.c485 int bytes_per_word = (mas->cur_bits_per_word / BITS_PER_BYTE) + 1; in setup_gsi_xfer() local
487 peripheral.rx_len = (xfer->len / bytes_per_word); in setup_gsi_xfer()
/Linux-v6.6/include/linux/spi/
Daltera.h36 int bytes_per_word; member