/openbmc/linux/drivers/spi/ |
H A D | spi-dln2.c | 92 u8 bpw; member 303 static int dln2_spi_set_bpw(struct dln2_spi *dln2, u8 bpw) in dln2_spi_set_bpw() argument 307 u8 bpw; in dln2_spi_set_bpw() member 311 tx.bpw = bpw; in dln2_spi_set_bpw() 356 static int dln2_spi_copy_to_buf(u8 *dln2_buf, const u8 *src, u16 len, u8 bpw) in dln2_spi_copy_to_buf() argument 361 if (bpw <= 8) { in dln2_spi_copy_to_buf() 363 } else if (bpw <= 16) { in dln2_spi_copy_to_buf() 389 static int dln2_spi_copy_from_buf(u8 *dest, const u8 *dln2_buf, u16 len, u8 bpw) in dln2_spi_copy_from_buf() argument 394 if (bpw <= 8) { in dln2_spi_copy_from_buf() 396 } else if (bpw <= 16) { in dln2_spi_copy_from_buf() [all …]
|
H A D | spi-synquacer.c | 125 unsigned int bpw; member 149 switch (sspi->bpw) { in read_fifo() 193 switch (sspi->bpw) { in write_fifo() 233 unsigned int speed, mode, bpw, cs, bus_width, transfer_mode; in synquacer_spi_config() local 255 bpw = xfer->bits_per_word; in synquacer_spi_config() 259 bus_width == sspi->bus_width && bpw == sspi->bpw && in synquacer_spi_config() 277 if (bpw == 8 && (mode & (SPI_TX_DUAL | SPI_RX_DUAL)) && div < 3) in synquacer_spi_config() 279 if (bpw == 8 && (mode & (SPI_TX_QUAD | SPI_RX_QUAD)) && div < 6) in synquacer_spi_config() 281 if (bpw == 16 && (mode & (SPI_TX_QUAD | SPI_RX_QUAD)) && div < 3) in synquacer_spi_config() 326 val |= ((bpw / 8 - 1) << SYNQUACER_HSSPI_FIFOCFG_FIFO_WIDTH_SHIFT); in synquacer_spi_config() [all …]
|
H A D | spi-ar934x.c | 86 u8 bpw, term = 0; in ar934x_spi_transfer_one_message() local 95 bpw = t->bits_per_word >> 3; in ar934x_spi_transfer_one_message() 97 bpw = 4; in ar934x_spi_transfer_one_message() 114 for (trx_done = 0; trx_done < t->len; trx_done += bpw) { in ar934x_spi_transfer_one_message() 116 if (trx_cur > bpw) in ar934x_spi_transfer_one_message() 117 trx_cur = bpw; in ar934x_spi_transfer_one_message()
|
H A D | spi-topcliff-pch.c | 516 static void pch_spi_set_tx(struct pch_spi_data *data, int *bpw) in pch_spi_set_tx() argument 537 *bpw = data->cur_trans->bits_per_word; in pch_spi_set_tx() 539 *bpw = data->current_msg->spi->bits_per_word; in pch_spi_set_tx() 546 data->bpw_len = data->cur_trans->len / (*bpw / 8); in pch_spi_set_tx() 577 if (*bpw == 8) { in pch_spi_set_tx() 694 static void pch_spi_copy_rx_data(struct pch_spi_data *data, int bpw) in pch_spi_copy_rx_data() argument 704 if (bpw == 8) { in pch_spi_copy_rx_data() 715 static void pch_spi_copy_rx_data_for_dma(struct pch_spi_data *data, int bpw) in pch_spi_copy_rx_data_for_dma() argument 727 if (bpw == 8) { in pch_spi_copy_rx_data_for_dma() 819 static void pch_spi_request_dma(struct pch_spi_data *data, int bpw) in pch_spi_request_dma() argument [all …]
|
H A D | spi-clps711x.c | 32 unsigned int bpw; member 58 hw->bpw = xfer->bits_per_word; in spi_clps711x_transfer_one() 64 writel(data | SYNCIO_FRMLEN(hw->bpw) | SYNCIO_TXFRMEN, hw->syncio); in spi_clps711x_transfer_one() 83 writel(data | SYNCIO_FRMLEN(hw->bpw) | SYNCIO_TXFRMEN, in spi_clps711x_isr()
|
H A D | spi-fsl-lpspi.c | 90 u8 bpw; member 187 static int fsl_lpspi_bytes_per_word(const int bpw) in fsl_lpspi_bytes_per_word() argument 189 return DIV_ROUND_UP(bpw, BITS_PER_BYTE); in fsl_lpspi_bytes_per_word() 277 temp |= fsl_lpspi->config.bpw - 1; in fsl_lpspi_set_cmd() 368 switch (fsl_lpspi_bytes_per_word(fsl_lpspi->config.bpw)) { in fsl_lpspi_dma_configure() 451 fsl_lpspi->config.bpw = t->bits_per_word; in fsl_lpspi_setup_transfer() 460 if (!fsl_lpspi->config.bpw) in fsl_lpspi_setup_transfer() 461 fsl_lpspi->config.bpw = spi->bits_per_word; in fsl_lpspi_setup_transfer() 464 if (fsl_lpspi->config.bpw <= 8) { in fsl_lpspi_setup_transfer() 467 } else if (fsl_lpspi->config.bpw <= 16) { in fsl_lpspi_setup_transfer()
|
H A D | spi-au1550.c | 89 static void au1550_spi_bits_handlers_set(struct au1550_spi *hw, int bpw); 223 unsigned int bpw, hz; in au1550_spi_setupxfer() local 227 bpw = t->bits_per_word; in au1550_spi_setupxfer() 230 bpw = spi->bits_per_word; in au1550_spi_setupxfer() 244 if (hw->usedma && bpw <= 8) in au1550_spi_setupxfer() 249 cfg |= PSC_SPICFG_SET_LEN(bpw); in au1550_spi_setupxfer() 649 static void au1550_spi_bits_handlers_set(struct au1550_spi *hw, int bpw) in au1550_spi_bits_handlers_set() argument 651 if (bpw <= 8) { in au1550_spi_bits_handlers_set() 661 } else if (bpw <= 16) { in au1550_spi_bits_handlers_set()
|
H A D | spi-uniphier.c | 320 unsigned int bpw = bytes_per_word(priv->bits_per_word); in uniphier_spi_fill_tx_fifo() local 322 fifo_threshold = DIV_ROUND_UP(priv->rx_bytes, bpw); in uniphier_spi_fill_tx_fifo() 328 DIV_ROUND_UP(priv->rx_bytes - priv->tx_bytes, bpw); in uniphier_spi_fill_tx_fifo() 354 unsigned int bpw = bytes_per_word(priv->bits_per_word); in uniphier_spi_can_dma() local 361 return DIV_ROUND_UP(t->len, bpw) > SSI_FIFO_DEPTH; in uniphier_spi_can_dma()
|
H A D | spi-stm32.c | 485 u32 packet, bpw; in stm32h7_spi_prepare_fthlv() local 491 bpw = DIV_ROUND_UP(spi->cur_bpw, 8); in stm32h7_spi_prepare_fthlv() 492 return DIV_ROUND_UP(packet, bpw); in stm32h7_spi_prepare_fthlv() 1366 u32 bpw, fthlv; in stm32h7_spi_set_bpw() local 1369 bpw = spi->cur_bpw - 1; in stm32h7_spi_set_bpw() 1372 cfg1_setb |= FIELD_PREP(STM32H7_SPI_CFG1_DSIZE, bpw); in stm32h7_spi_set_bpw()
|
H A D | spi-s3c64xx.c | 766 u8 bpw; in s3c64xx_spi_transfer_one() local 774 bpw = xfer->bits_per_word; in s3c64xx_spi_transfer_one() 777 if (bpw != sdd->cur_bpw || speed != sdd->cur_speed) { in s3c64xx_spi_transfer_one() 778 sdd->cur_bpw = bpw; in s3c64xx_spi_transfer_one()
|
H A D | spi-ep93xx.c | 103 #define bits_per_word_to_dss(bpw) ((bpw) - 1) argument
|
/openbmc/linux/drivers/gpu/drm/ |
H A D | drm_mipi_dbi.c | 851 unsigned int bpw) in mipi_dbi_spi1e_transfer() argument 853 bool swap_bytes = (bpw == 16 && mipi_dbi_machine_little_endian()); in mipi_dbi_spi1e_transfer() 969 unsigned int bpw) in mipi_dbi_spi1_transfer() argument 983 return mipi_dbi_spi1e_transfer(dbi, dc, buf, len, bpw); in mipi_dbi_spi1_transfer() 1002 if (bpw == 16 && mipi_dbi_machine_little_endian()) { in mipi_dbi_spi1_transfer() 1086 unsigned int bpw = (*cmd == MIPI_DCS_WRITE_MEMORY_START) ? 16 : 8; in mipi_dbi_typec1_command() local 1098 return mipi_dbi_spi1_transfer(dbi, 1, parameters, num, bpw); in mipi_dbi_typec1_command() 1174 unsigned int bpw = 8; in mipi_dbi_typec3_command() local 1192 bpw = 16; in mipi_dbi_typec3_command() 1197 ret = mipi_dbi_spi_transfer(spi, speed_hz, bpw, par, num); in mipi_dbi_typec3_command() [all …]
|
/openbmc/linux/drivers/gpu/drm/tiny/ |
H A D | ili9486.c | 46 unsigned int bpw = 8; in waveshare_command() local 82 bpw = 16; in waveshare_command() 87 ret = mipi_dbi_spi_transfer(spi, speed_hz, bpw, data, num); in waveshare_command()
|
H A D | ili9225.c | 315 unsigned int bpw = 8; in ili9225_dbi_command() local 328 bpw = 16; in ili9225_dbi_command() 333 ret = mipi_dbi_spi_transfer(spi, speed_hz, bpw, par, num); in ili9225_dbi_command()
|
/openbmc/linux/drivers/soc/qcom/ |
H A D | qcom-geni-se.c | 431 void geni_se_config_packing(struct geni_se *se, int bpw, int pack_words, in geni_se_config_packing() argument 436 int temp_bpw = bpw; in geni_se_config_packing() 437 int idx_start = msb_to_lsb ? bpw - 1 : 0; in geni_se_config_packing() 440 int ceil_bpw = ALIGN(bpw, BITS_PER_BYTE); in geni_se_config_packing() 455 temp_bpw = bpw; in geni_se_config_packing() 481 if (pack_words || bpw == 32) in geni_se_config_packing() 482 writel_relaxed(bpw / 16, se->base + SE_GENI_BYTE_GRAN); in geni_se_config_packing()
|
/openbmc/linux/include/linux/spi/ |
H A D | spi.h | 1265 static inline bool spi_is_bpw_supported(struct spi_device *spi, u32 bpw) in spi_is_bpw_supported() argument 1269 if (bpw == 8 || (bpw <= 32 && bpw_mask & SPI_BPW_MASK(bpw))) in spi_is_bpw_supported()
|
/openbmc/linux/include/drm/ |
H A D | drm_mipi_dbi.h | 188 u8 bpw, const void *buf, size_t len);
|
/openbmc/linux/drivers/crypto/stm32/ |
H A D | stm32-cryp.c | 444 int bpw = sizeof(u32); in ux500_swizzle_key() local 448 j = len - bpw; in ux500_swizzle_key() 450 for (i = 0; i < bpw; i++) { in ux500_swizzle_key() 451 index = len - j - bpw + i; in ux500_swizzle_key() 455 j -= bpw; in ux500_swizzle_key()
|
/openbmc/linux/include/linux/soc/qcom/ |
H A D | geni-se.h | 489 void geni_se_config_packing(struct geni_se *se, int bpw, int pack_words,
|