/linux/drivers/spi/ |
H A D | spi-apple.c | 268 unsigned int bytes_per_word) in apple_spi_tx() argument 283 switch (bytes_per_word) { in apple_spi_tx() 309 *tx_ptr = ((u8 *)*tx_ptr) + bytes_per_word * wrote; in apple_spi_tx() 313 unsigned int bytes_per_word) in apple_spi_rx() argument 328 switch (bytes_per_word) { in apple_spi_rx() 354 *rx_ptr = ((u8 *)*rx_ptr) + bytes_per_word * read; in apple_spi_rx() 364 unsigned int bytes_per_word; in apple_spi_transfer_one() local 372 bytes_per_word = 4; in apple_spi_transfer_one() 374 bytes_per_word = 2; in apple_spi_transfer_one() 376 bytes_per_word = 1; in apple_spi_transfer_one() [all …]
|
H A D | spi-tegra114.c | 181 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 …]
|
H A D | spi-tegra210-quad.c | 198 unsigned int bytes_per_word; member 282 tqspi->bytes_per_word = DIV_ROUND_UP(bits_per_word, 8); in tegra_qspi_calculate_curr_xfer_param() 302 tqspi->curr_dma_words = max_len / tqspi->bytes_per_word; in tegra_qspi_calculate_curr_xfer_param() 305 max_word = (remain_len - 1) / tqspi->bytes_per_word + 1; in tegra_qspi_calculate_curr_xfer_param() 328 len = written_words * tqspi->bytes_per_word; in tegra_qspi_fill_tx_fifo_from_client_txbuf() 338 tqspi->cur_tx_pos += written_words * tqspi->bytes_per_word; in tegra_qspi_fill_tx_fifo_from_client_txbuf() 341 u8 bytes_per_word = tqspi->bytes_per_word; in tegra_qspi_fill_tx_fifo_from_client_txbuf() local 345 len = written_words * tqspi->bytes_per_word; in tegra_qspi_fill_tx_fifo_from_client_txbuf() 352 for (i = 0; len && (i < min(4, bytes_per_word)); i++, len--) in tegra_qspi_fill_tx_fifo_from_client_txbuf() 374 len = tqspi->curr_dma_words * tqspi->bytes_per_word; in tegra_qspi_read_rx_fifo_to_client_rxbuf() [all …]
|
H A 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() 471 xspi->bytes_per_word = bits_per_word / 8; in xilinx_spi_probe()
|
H A D | spi-altera-core.c | 94 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()
|
H A D | spi-st-ssc4.c | 62 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()
|
H A D | spi-rzv2h-rspi.c | 78 unsigned int bytes_per_word; member 163 switch (rspi->bytes_per_word) { in rzv2h_rspi_send() 184 switch (rspi->bytes_per_word) { in rzv2h_rspi_receive() 207 words_to_transfer = transfer->len / rspi->bytes_per_word; in rzv2h_rspi_transfer_one() 325 rspi->bytes_per_word = roundup_pow_of_two(BITS_TO_BYTES(bits_per_word)); in rzv2h_rspi_prepare_message()
|
H A D | spi-sh-msiof.c | 830 unsigned int bytes_per_word; in sh_msiof_transfer_one() local 896 bytes_per_word = 1; in sh_msiof_transfer_one() 900 bytes_per_word = 2; in sh_msiof_transfer_one() 911 bytes_per_word = 4; in sh_msiof_transfer_one() 922 bytes_per_word = 4; in sh_msiof_transfer_one() 935 words = len / bytes_per_word; in sh_msiof_transfer_one() 944 tx_buf += n * bytes_per_word; in sh_msiof_transfer_one() 946 rx_buf += n * bytes_per_word; in sh_msiof_transfer_one() 949 if (words == 0 && (len % bytes_per_word)) { in sh_msiof_transfer_one() 950 words = len % bytes_per_word; in sh_msiof_transfer_one() [all …]
|
H A D | spi-meson-spicc.c | 192 unsigned int bytes_per_word; member 389 unsigned int bytes = spicc->bytes_per_word; in meson_spicc_pull_data() 407 unsigned int bytes = spicc->bytes_per_word; in meson_spicc_push_data() 443 spicc->bytes_per_word, in meson_spicc_setup_burst() 448 spicc->xfer_remain -= burst_len * spicc->bytes_per_word; in meson_spicc_setup_burst() 544 (spicc->bytes_per_word << 3) - 1); in meson_spicc_setup_xfer() 591 spicc->bytes_per_word = in meson_spicc_transfer_one() 594 if (xfer->len % spicc->bytes_per_word) in meson_spicc_transfer_one() 630 spicc->xfer_remain = DIV_ROUND_UP(xfer->len, spicc->bytes_per_word); in meson_spicc_transfer_one()
|
H A D | spi-davinci.c | 127 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() 582 data_type = dspi->bytes_per_word[spi_get_chipselect(spi, 0)]; in davinci_spi_bufs() 894 dspi->bytes_per_word = devm_kcalloc(&pdev->dev, in davinci_spi_probe() 896 sizeof(*dspi->bytes_per_word), in davinci_spi_probe() 898 if (dspi->bytes_per_word == NULL) { in davinci_spi_probe()
|
H A D | spi-imx.c | 330 unsigned int bytes_per_word; in spi_imx_buf_rx_swap_u32() local 332 bytes_per_word = spi_imx_bytes_per_word(spi_imx->bits_per_word); in spi_imx_buf_rx_swap_u32() 333 if (bytes_per_word == 1) in spi_imx_buf_rx_swap_u32() 335 else if (bytes_per_word == 2) in spi_imx_buf_rx_swap_u32() 377 unsigned int bytes_per_word; in spi_imx_buf_tx_swap_u32() local 387 bytes_per_word = spi_imx_bytes_per_word(spi_imx->bits_per_word); in spi_imx_buf_tx_swap_u32() 389 if (bytes_per_word == 1) in spi_imx_buf_tx_swap_u32() 391 else if (bytes_per_word == 2) in spi_imx_buf_tx_swap_u32() 1464 unsigned int bytes_per_word, i; in spi_imx_dma_transfer() local 1468 bytes_per_word = spi_imx_bytes_per_word(transfer->bits_per_word); in spi_imx_dma_transfer() [all …]
|
H A D | spi-omap2-mcspi.c | 313 int max_fifo_depth, bytes_per_word; in omap2_mcspi_set_fifo() local 320 bytes_per_word = mcspi_bytes_per_word(cs->word_len); in omap2_mcspi_set_fifo() 321 if (t->len % bytes_per_word != 0) in omap2_mcspi_set_fifo() 329 wcnt = t->len / bytes_per_word; in omap2_mcspi_set_fifo() 336 xferlevel |= (bytes_per_word - 1) << 8; in omap2_mcspi_set_fifo() 341 xferlevel |= bytes_per_word - 1; in omap2_mcspi_set_fifo() 567 int bytes_per_word = mcspi_bytes_per_word(word_len); in omap2_mcspi_rx_dma() local 569 count -= (bytes_per_word << 1); in omap2_mcspi_rx_dma()
|
H A D | spi-fsl-lpspi.c | 207 unsigned int bytes_per_word; in fsl_lpspi_can_dma() local 212 bytes_per_word = fsl_lpspi_bytes_per_word(transfer->bits_per_word); in fsl_lpspi_can_dma() 214 switch (bytes_per_word) { in fsl_lpspi_can_dma()
|
H A D | spi-rockchip.c | 720 unsigned int bytes_per_word = xfer->bits_per_word <= 8 ? 1 : 2; in rockchip_spi_can_dma() local 726 return xfer->len / bytes_per_word >= rs->fifo_len; in rockchip_spi_can_dma()
|
H A D | spi-amlogic-spisg.c | 158 u32 bytes_per_word; member 602 spisg->bytes_per_word = spi->bits_per_word >> 3; in aml_spisg_prepare_message()
|
H A D | spi-geni-qcom.c | 485 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/include/linux/spi/ |
H A D | altera.h | 36 int bytes_per_word; member
|