drivers: mtd: nand: Extract the Status register value

Flash Status register value will get updated in [15:8]
bits section. Hence right shift first and then extract
the required bit value.

Change-Id: I7f2233f22984da3db2324e9e2ba8aafff76adb32
Signed-off-by: Kavin A <quic_kavia@quicinc.com>
This commit is contained in:
Kavin A 2022-01-19 21:37:31 +05:30 committed by Gerrit - the friendly Code Review server
parent d539984c88
commit db4391c1d7

View file

@ -1421,6 +1421,7 @@ int qpic_spi_nand_config(struct mtd_info *mtd)
if ((status >> 8) & FLASH_SPI_NAND_FR_ECC_ENABLE) {
qspi_debug("%s : Internal ECC enabled, disabling internal ECC\n",__func__);
status >>= 8;
status &= ~(FLASH_SPI_NAND_FR_ECC_ENABLE);
status = qpic_serial_set_feature(mtd, FLASH_SPI_NAND_FR_ADDR,
status);