Lines Matching refs:bits_per_word
139 int bits_per_word, int msb_first) in fsl_spi_qe_cpu_set_shifts() argument
144 if (bits_per_word <= 8) { in fsl_spi_qe_cpu_set_shifts()
147 } else if (bits_per_word <= 16) { in fsl_spi_qe_cpu_set_shifts()
152 if (bits_per_word <= 8) in fsl_spi_qe_cpu_set_shifts()
158 int bits_per_word, int msb_first) in fsl_spi_grlib_set_shifts() argument
162 if (bits_per_word <= 16) { in fsl_spi_grlib_set_shifts()
165 *tx_shift = 32 - bits_per_word; /* MSB in bit 31 */ in fsl_spi_grlib_set_shifts()
167 *rx_shift = 16 - bits_per_word; /* MSB in bit 15 */ in fsl_spi_grlib_set_shifts()
175 int bits_per_word) in mspi_apply_cpu_mode_quirks() argument
179 if (bits_per_word <= 8) { in mspi_apply_cpu_mode_quirks()
182 } else if (bits_per_word <= 16) { in mspi_apply_cpu_mode_quirks()
185 } else if (bits_per_word <= 32) { in mspi_apply_cpu_mode_quirks()
193 bits_per_word, in mspi_apply_cpu_mode_quirks()
201 return bits_per_word; in mspi_apply_cpu_mode_quirks()
206 int bits_per_word) in mspi_apply_qe_mode_quirks() argument
215 bits_per_word > 8) in mspi_apply_qe_mode_quirks()
217 if (bits_per_word > 8) in mspi_apply_qe_mode_quirks()
219 return bits_per_word; in mspi_apply_qe_mode_quirks()
226 int bits_per_word = 0; in fsl_spi_setup_transfer() local
234 bits_per_word = t->bits_per_word; in fsl_spi_setup_transfer()
239 if (!bits_per_word) in fsl_spi_setup_transfer()
240 bits_per_word = spi->bits_per_word; in fsl_spi_setup_transfer()
243 if ((bits_per_word < 4) in fsl_spi_setup_transfer()
244 || ((bits_per_word > 16) && (bits_per_word != 32)) in fsl_spi_setup_transfer()
245 || (bits_per_word > mpc8xxx_spi->max_bits_per_word)) in fsl_spi_setup_transfer()
252 bits_per_word = mspi_apply_cpu_mode_quirks(cs, spi, in fsl_spi_setup_transfer()
254 bits_per_word); in fsl_spi_setup_transfer()
256 bits_per_word = mspi_apply_qe_mode_quirks(cs, spi, in fsl_spi_setup_transfer()
257 bits_per_word); in fsl_spi_setup_transfer()
259 if (bits_per_word < 0) in fsl_spi_setup_transfer()
260 return bits_per_word; in fsl_spi_setup_transfer()
262 if (bits_per_word == 32) in fsl_spi_setup_transfer()
263 bits_per_word = 0; in fsl_spi_setup_transfer()
265 bits_per_word = bits_per_word - 1; in fsl_spi_setup_transfer()
271 cs->hw_mode |= SPMODE_LEN(bits_per_word); in fsl_spi_setup_transfer()
318 u8 bits_per_word; in fsl_spi_bufs() local
322 bits_per_word = spi->bits_per_word; in fsl_spi_bufs()
323 if (t->bits_per_word) in fsl_spi_bufs()
324 bits_per_word = t->bits_per_word; in fsl_spi_bufs()
326 if (bits_per_word > 8) { in fsl_spi_bufs()
332 if (bits_per_word > 16) { in fsl_spi_bufs()
373 if (t->bits_per_word || t->speed_hz) { in fsl_spi_do_one_msg()