Lines Matching refs:sr
64 static inline int spi_nor_read_sr(uint8_t *sr) in spi_nor_read_sr() argument
66 return spi_nor_reg(SPI_NOR_OP_READ_SR, sr, 1U, SPI_MEM_DATA_IN); in spi_nor_read_sr()
86 uint8_t sr; in spi_nor_ready() local
89 ret = spi_nor_read_sr(&sr); in spi_nor_ready()
102 return (((fsr & FSR_READY) != 0U) && ((sr & SR_WIP) == 0U)) ? in spi_nor_ready()
106 return (((sr & SR_WIP) == 0U) ? 0 : 1); in spi_nor_ready()
126 uint8_t sr; in spi_nor_macronix_quad_enable() local
129 ret = spi_nor_read_sr(&sr); in spi_nor_macronix_quad_enable()
134 if ((sr & SR_QUAD_EN_MX) != 0U) { in spi_nor_macronix_quad_enable()
143 sr |= SR_QUAD_EN_MX; in spi_nor_macronix_quad_enable()
144 ret = spi_nor_reg(SPI_NOR_OP_WRSR, &sr, 1U, SPI_MEM_DATA_OUT); in spi_nor_macronix_quad_enable()
154 ret = spi_nor_read_sr(&sr); in spi_nor_macronix_quad_enable()
155 if ((ret != 0) || ((sr & SR_QUAD_EN_MX) == 0U)) { in spi_nor_macronix_quad_enable()