Lines Matching full:sr2

883 		 * change the value of the SR2 Quad Enable bit.  in spi_nor_write_16bit_sr_and_check()
892 * described in SR2 at BIT(1). in spi_nor_write_16bit_sr_and_check()
1005 * @sr2: pointer to DMA-able buffer to write to the Status Register 2.
1009 static int spi_nor_write_sr2(struct spi_nor *nor, const u8 *sr2) in spi_nor_write_sr2() argument
1018 struct spi_mem_op op = SPI_NOR_WRSR2_OP(sr2); in spi_nor_write_sr2()
1025 sr2, 1); in spi_nor_write_sr2()
1029 dev_dbg(nor->dev, "error %d writing SR2\n", ret); in spi_nor_write_sr2()
1040 * @sr2: pointer to DMA-able buffer where the value of the
1045 static int spi_nor_read_sr2(struct spi_nor *nor, u8 *sr2) in spi_nor_read_sr2() argument
1050 struct spi_mem_op op = SPI_NOR_RDSR2_OP(sr2); in spi_nor_read_sr2()
1056 ret = spi_nor_controller_ops_read_reg(nor, SPINOR_OP_RDSR2, sr2, in spi_nor_read_sr2()
1061 dev_dbg(nor->dev, "error %d reading SR2\n", ret); in spi_nor_read_sr2()
1936 u8 *sr2 = nor->bouncebuf; in spi_nor_sr2_bit7_quad_enable() local
1941 ret = spi_nor_read_sr2(nor, sr2); in spi_nor_sr2_bit7_quad_enable()
1944 if (*sr2 & SR2_QUAD_EN_BIT7) in spi_nor_sr2_bit7_quad_enable()
1948 *sr2 |= SR2_QUAD_EN_BIT7; in spi_nor_sr2_bit7_quad_enable()
1950 ret = spi_nor_write_sr2(nor, sr2); in spi_nor_sr2_bit7_quad_enable()
1954 sr2_written = *sr2; in spi_nor_sr2_bit7_quad_enable()
1957 ret = spi_nor_read_sr2(nor, sr2); in spi_nor_sr2_bit7_quad_enable()
1961 if (*sr2 != sr2_written) { in spi_nor_sr2_bit7_quad_enable()
1962 dev_dbg(nor->dev, "SR2: Read back test failed\n"); in spi_nor_sr2_bit7_quad_enable()