Lines Matching refs:cr
170 u32 cr; in sifive_spi_prep_transfer() local
174 cr = DIV_ROUND_UP(clk_get_rate(spi->clk) >> 1, t->speed_hz) - 1; in sifive_spi_prep_transfer()
175 cr &= SIFIVE_SPI_SCKDIV_DIV_MASK; in sifive_spi_prep_transfer()
176 sifive_spi_write(spi, SIFIVE_SPI_REG_SCKDIV, cr); in sifive_spi_prep_transfer()
181 cr = SIFIVE_SPI_FMT_LEN(t->bits_per_word); in sifive_spi_prep_transfer()
184 cr |= SIFIVE_SPI_FMT_PROTO_QUAD; in sifive_spi_prep_transfer()
187 cr |= SIFIVE_SPI_FMT_PROTO_DUAL; in sifive_spi_prep_transfer()
190 cr |= SIFIVE_SPI_FMT_PROTO_SINGLE; in sifive_spi_prep_transfer()
194 cr |= SIFIVE_SPI_FMT_ENDIAN; in sifive_spi_prep_transfer()
196 cr |= SIFIVE_SPI_FMT_DIR; in sifive_spi_prep_transfer()
197 sifive_spi_write(spi, SIFIVE_SPI_REG_FMT, cr); in sifive_spi_prep_transfer()
226 u32 cr; in sifive_spi_wait() local
229 cr = sifive_spi_read(spi, SIFIVE_SPI_REG_IP); in sifive_spi_wait()
230 } while (!(cr & bit)); in sifive_spi_wait()