Lines Matching full:sr2

879 		 * change the value of the SR2 Quad Enable bit.  in spi_nor_write_16bit_sr_and_check()
888 * described in SR2 at BIT(1). in spi_nor_write_16bit_sr_and_check()
1001 * @sr2: pointer to DMA-able buffer to write to the Status Register 2.
1005 static int spi_nor_write_sr2(struct spi_nor *nor, const u8 *sr2) in spi_nor_write_sr2() argument
1014 struct spi_mem_op op = SPI_NOR_WRSR2_OP(sr2); in spi_nor_write_sr2()
1021 sr2, 1); in spi_nor_write_sr2()
1025 dev_dbg(nor->dev, "error %d writing SR2\n", ret); in spi_nor_write_sr2()
1036 * @sr2: pointer to DMA-able buffer where the value of the
1041 static int spi_nor_read_sr2(struct spi_nor *nor, u8 *sr2) in spi_nor_read_sr2() argument
1046 struct spi_mem_op op = SPI_NOR_RDSR2_OP(sr2); in spi_nor_read_sr2()
1052 ret = spi_nor_controller_ops_read_reg(nor, SPINOR_OP_RDSR2, sr2, in spi_nor_read_sr2()
1057 dev_dbg(nor->dev, "error %d reading SR2\n", ret); in spi_nor_read_sr2()
1932 u8 *sr2 = nor->bouncebuf; in spi_nor_sr2_bit7_quad_enable() local
1937 ret = spi_nor_read_sr2(nor, sr2); in spi_nor_sr2_bit7_quad_enable()
1940 if (*sr2 & SR2_QUAD_EN_BIT7) in spi_nor_sr2_bit7_quad_enable()
1944 *sr2 |= SR2_QUAD_EN_BIT7; in spi_nor_sr2_bit7_quad_enable()
1946 ret = spi_nor_write_sr2(nor, sr2); in spi_nor_sr2_bit7_quad_enable()
1950 sr2_written = *sr2; in spi_nor_sr2_bit7_quad_enable()
1953 ret = spi_nor_read_sr2(nor, sr2); in spi_nor_sr2_bit7_quad_enable()
1957 if (*sr2 != sr2_written) { in spi_nor_sr2_bit7_quad_enable()
1958 dev_dbg(nor->dev, "SR2: Read back test failed\n"); in spi_nor_sr2_bit7_quad_enable()