Home
last modified time | relevance | path

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

/Linux-v6.1/drivers/spi/
Dspi-tegra20-slink.c171 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 …]
Dspi-tegra114.c182 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 …]
Dspi-tegra210-quad.c189 unsigned int bytes_per_word; member
273 tqspi->bytes_per_word = DIV_ROUND_UP(bits_per_word, 8); in tegra_qspi_calculate_curr_xfer_param()
293 tqspi->curr_dma_words = max_len / tqspi->bytes_per_word; in tegra_qspi_calculate_curr_xfer_param()
296 max_word = (remain_len - 1) / tqspi->bytes_per_word + 1; in tegra_qspi_calculate_curr_xfer_param()
319 len = written_words * tqspi->bytes_per_word; in tegra_qspi_fill_tx_fifo_from_client_txbuf()
329 tqspi->cur_tx_pos += written_words * tqspi->bytes_per_word; in tegra_qspi_fill_tx_fifo_from_client_txbuf()
332 u8 bytes_per_word = tqspi->bytes_per_word; in tegra_qspi_fill_tx_fifo_from_client_txbuf() local
336 len = written_words * tqspi->bytes_per_word; in tegra_qspi_fill_tx_fifo_from_client_txbuf()
343 for (i = 0; len && (i < bytes_per_word); i++, len--) in tegra_qspi_fill_tx_fifo_from_client_txbuf()
365 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()
468 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-meson-spicc.c167 unsigned int bytes_per_word; member
202 unsigned int bytes = spicc->bytes_per_word; in meson_spicc_pull_data()
220 unsigned int bytes = spicc->bytes_per_word; in meson_spicc_push_data()
256 spicc->bytes_per_word, in meson_spicc_setup_burst()
261 spicc->xfer_remain -= burst_len * spicc->bytes_per_word; in meson_spicc_setup_burst()
354 (spicc->bytes_per_word << 3) - 1); in meson_spicc_setup_xfer()
401 spicc->bytes_per_word = in meson_spicc_transfer_one()
404 if (xfer->len % spicc->bytes_per_word) in meson_spicc_transfer_one()
Dspi-sh-msiof.c919 unsigned int bytes_per_word; in sh_msiof_transfer_one() local
985 bytes_per_word = 1; in sh_msiof_transfer_one()
989 bytes_per_word = 2; in sh_msiof_transfer_one()
1000 bytes_per_word = 4; in sh_msiof_transfer_one()
1011 bytes_per_word = 4; in sh_msiof_transfer_one()
1024 words = len / bytes_per_word; in sh_msiof_transfer_one()
1033 tx_buf += n * bytes_per_word; in sh_msiof_transfer_one()
1035 rx_buf += n * bytes_per_word; in sh_msiof_transfer_one()
1038 if (words == 0 && (len % bytes_per_word)) { in sh_msiof_transfer_one()
1039 words = len % bytes_per_word; in sh_msiof_transfer_one()
[all …]
Dspi-davinci.c128 u8 *bytes_per_word; member
296 dspi->bytes_per_word[spi->chip_select] = 1; in davinci_spi_setup_transfer()
300 dspi->bytes_per_word[spi->chip_select] = 2; in davinci_spi_setup_transfer()
582 data_type = dspi->bytes_per_word[spi->chip_select]; in davinci_spi_bufs()
889 dspi->bytes_per_word = devm_kcalloc(&pdev->dev, in davinci_spi_probe()
891 sizeof(*dspi->bytes_per_word), in davinci_spi_probe()
893 if (dspi->bytes_per_word == NULL) { in davinci_spi_probe()
Dspi-imx.c301 unsigned int bytes_per_word; in spi_imx_buf_rx_swap_u32() local
303 bytes_per_word = spi_imx_bytes_per_word(spi_imx->bits_per_word); in spi_imx_buf_rx_swap_u32()
304 if (bytes_per_word == 1) in spi_imx_buf_rx_swap_u32()
306 else if (bytes_per_word == 2) in spi_imx_buf_rx_swap_u32()
348 unsigned int bytes_per_word; in spi_imx_buf_tx_swap_u32() local
358 bytes_per_word = spi_imx_bytes_per_word(spi_imx->bits_per_word); in spi_imx_buf_tx_swap_u32()
360 if (bytes_per_word == 1) in spi_imx_buf_tx_swap_u32()
362 else if (bytes_per_word == 2) in spi_imx_buf_tx_swap_u32()
1381 unsigned int bytes_per_word, i; in spi_imx_dma_transfer() local
1385 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.c178 unsigned int bytes_per_word; in fsl_lpspi_can_dma() local
183 bytes_per_word = fsl_lpspi_bytes_per_word(transfer->bits_per_word); in fsl_lpspi_can_dma()
185 switch (bytes_per_word) { in fsl_lpspi_can_dma()
Dspi-rockchip.c713 unsigned int bytes_per_word = xfer->bits_per_word <= 8 ? 1 : 2; in rockchip_spi_can_dma() local
719 return xfer->len / bytes_per_word >= rs->fifo_len; in rockchip_spi_can_dma()
Dspi-geni-qcom.c419 int bytes_per_word = (mas->cur_bits_per_word / BITS_PER_BYTE) + 1; in setup_gsi_xfer() local
421 peripheral.rx_len = (xfer->len / bytes_per_word); in setup_gsi_xfer()
/Linux-v6.1/include/linux/spi/
Daltera.h36 int bytes_per_word; member