Lines Matching refs:bits_per_word
142 int bits_per_word, int msb_first) in fsl_spi_qe_cpu_set_shifts() argument
147 if (bits_per_word <= 8) { in fsl_spi_qe_cpu_set_shifts()
150 } else if (bits_per_word <= 16) { in fsl_spi_qe_cpu_set_shifts()
155 if (bits_per_word <= 8) in fsl_spi_qe_cpu_set_shifts()
161 int bits_per_word, int msb_first) in fsl_spi_grlib_set_shifts() argument
165 if (bits_per_word <= 16) { in fsl_spi_grlib_set_shifts()
168 *tx_shift = 32 - bits_per_word; /* MSB in bit 31 */ in fsl_spi_grlib_set_shifts()
170 *rx_shift = 16 - bits_per_word; /* MSB in bit 15 */ in fsl_spi_grlib_set_shifts()
178 int bits_per_word) in mspi_apply_cpu_mode_quirks() argument
182 if (bits_per_word <= 8) { in mspi_apply_cpu_mode_quirks()
185 } else if (bits_per_word <= 16) { in mspi_apply_cpu_mode_quirks()
188 } else if (bits_per_word <= 32) { in mspi_apply_cpu_mode_quirks()
196 bits_per_word, in mspi_apply_cpu_mode_quirks()
204 return bits_per_word; in mspi_apply_cpu_mode_quirks()
209 int bits_per_word) in mspi_apply_qe_mode_quirks() argument
218 bits_per_word > 8) in mspi_apply_qe_mode_quirks()
220 if (bits_per_word > 8) in mspi_apply_qe_mode_quirks()
222 return bits_per_word; in mspi_apply_qe_mode_quirks()
229 int bits_per_word = 0; in fsl_spi_setup_transfer() local
237 bits_per_word = t->bits_per_word; in fsl_spi_setup_transfer()
242 if (!bits_per_word) in fsl_spi_setup_transfer()
243 bits_per_word = spi->bits_per_word; in fsl_spi_setup_transfer()
249 bits_per_word = mspi_apply_cpu_mode_quirks(cs, spi, in fsl_spi_setup_transfer()
251 bits_per_word); in fsl_spi_setup_transfer()
253 bits_per_word = mspi_apply_qe_mode_quirks(cs, spi, in fsl_spi_setup_transfer()
254 bits_per_word); in fsl_spi_setup_transfer()
256 if (bits_per_word < 0) in fsl_spi_setup_transfer()
257 return bits_per_word; in fsl_spi_setup_transfer()
259 if (bits_per_word == 32) in fsl_spi_setup_transfer()
260 bits_per_word = 0; in fsl_spi_setup_transfer()
262 bits_per_word = bits_per_word - 1; in fsl_spi_setup_transfer()
268 cs->hw_mode |= SPMODE_LEN(bits_per_word); in fsl_spi_setup_transfer()
314 u8 bits_per_word; in fsl_spi_bufs() local
318 bits_per_word = spi->bits_per_word; in fsl_spi_bufs()
319 if (t->bits_per_word) in fsl_spi_bufs()
320 bits_per_word = t->bits_per_word; in fsl_spi_bufs()
322 if (bits_per_word > 8) { in fsl_spi_bufs()
328 if (bits_per_word > 16) { in fsl_spi_bufs()
374 if (t->len < 256 || t->bits_per_word != 8) in fsl_spi_do_one_msg()
377 t->bits_per_word = 32; in fsl_spi_do_one_msg()
379 t->bits_per_word = 16; in fsl_spi_do_one_msg()
400 if (cs_change || last_bpw != t->bits_per_word) in fsl_spi_do_one_msg()
404 last_bpw = t->bits_per_word; in fsl_spi_do_one_msg()