Lines Matching refs:bits_per_word
115 int bits_per_word, int msb_first) in fsl_spi_qe_cpu_set_shifts() argument
120 if (bits_per_word <= 8) { in fsl_spi_qe_cpu_set_shifts()
123 } else if (bits_per_word <= 16) { in fsl_spi_qe_cpu_set_shifts()
128 if (bits_per_word <= 8) in fsl_spi_qe_cpu_set_shifts()
134 int bits_per_word, int msb_first) in fsl_spi_grlib_set_shifts() argument
138 if (bits_per_word <= 16) { in fsl_spi_grlib_set_shifts()
141 *tx_shift = 32 - bits_per_word; /* MSB in bit 31 */ in fsl_spi_grlib_set_shifts()
143 *rx_shift = 16 - bits_per_word; /* MSB in bit 15 */ in fsl_spi_grlib_set_shifts()
151 int bits_per_word) in mspi_apply_cpu_mode_quirks() argument
155 if (bits_per_word <= 8) { in mspi_apply_cpu_mode_quirks()
158 } else if (bits_per_word <= 16) { in mspi_apply_cpu_mode_quirks()
161 } else if (bits_per_word <= 32) { in mspi_apply_cpu_mode_quirks()
169 bits_per_word, in mspi_apply_cpu_mode_quirks()
177 return bits_per_word; in mspi_apply_cpu_mode_quirks()
182 int bits_per_word) in mspi_apply_qe_mode_quirks() argument
191 bits_per_word > 8) in mspi_apply_qe_mode_quirks()
193 if (bits_per_word > 8) in mspi_apply_qe_mode_quirks()
195 return bits_per_word; in mspi_apply_qe_mode_quirks()
202 int bits_per_word = 0; in fsl_spi_setup_transfer() local
210 bits_per_word = t->bits_per_word; in fsl_spi_setup_transfer()
215 if (!bits_per_word) in fsl_spi_setup_transfer()
216 bits_per_word = spi->bits_per_word; in fsl_spi_setup_transfer()
222 bits_per_word = mspi_apply_cpu_mode_quirks(cs, spi, in fsl_spi_setup_transfer()
224 bits_per_word); in fsl_spi_setup_transfer()
226 bits_per_word = mspi_apply_qe_mode_quirks(cs, spi, in fsl_spi_setup_transfer()
227 bits_per_word); in fsl_spi_setup_transfer()
229 if (bits_per_word < 0) in fsl_spi_setup_transfer()
230 return bits_per_word; in fsl_spi_setup_transfer()
232 if (bits_per_word == 32) in fsl_spi_setup_transfer()
233 bits_per_word = 0; in fsl_spi_setup_transfer()
235 bits_per_word = bits_per_word - 1; in fsl_spi_setup_transfer()
241 cs->hw_mode |= SPMODE_LEN(bits_per_word); in fsl_spi_setup_transfer()
287 u8 bits_per_word; in fsl_spi_bufs() local
291 bits_per_word = spi->bits_per_word; in fsl_spi_bufs()
292 if (t->bits_per_word) in fsl_spi_bufs()
293 bits_per_word = t->bits_per_word; in fsl_spi_bufs()
295 if (bits_per_word > 8) { in fsl_spi_bufs()
301 if (bits_per_word > 16) { in fsl_spi_bufs()
356 if (t->len < 256 || t->bits_per_word != 8) in fsl_spi_prepare_message()
359 t->bits_per_word = 32; in fsl_spi_prepare_message()
361 t->bits_per_word = 16; in fsl_spi_prepare_message()