mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
mtd: spi-nor: Add SNOR_F_NO_READ_CR warning
SPI Nor usually has a way to obtain the CR status and add a warning to notify developers to make corresponding optimizations to avoid forced SR writing, which may cause SR wear out. Change-Id: Id0e32b94c33f564539cbbac3bb2147ad8227c3dd Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
@@ -1647,8 +1647,10 @@ int spi_nor_sr2_bit1_quad_enable(struct spi_nor *nor)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (nor->flags & SNOR_F_NO_READ_CR)
|
||||
if (nor->flags & SNOR_F_NO_READ_CR) {
|
||||
dev_warn(nor->dev, "it is recommended to optimize the SNOR_F_NO_READ_CR!\n");
|
||||
return spi_nor_write_16bit_cr_and_check(nor, SR2_QUAD_EN_BIT1);
|
||||
}
|
||||
|
||||
ret = spi_nor_read_cr(nor, nor->bouncebuf);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user