>drivers/mtd/spi-nor/spi-nor.c | 2 ++
> 1 file changed, 2 insertions(+)

>diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c 
>index e8f6131..10ba94f 100644
>--- a/drivers/mtd/spi-nor/spi-nor.c
>+++ b/drivers/mtd/spi-nor/spi-nor.c
>@@ -1398,6 +1398,8 @@ static int set_quad_mode(struct spi_nor *nor, struct 
>flash_info *info)
 >              }
 >              return status;
 >      case CFI_MFR_ST:
>+              if (!(nor->spi->mode & SPI_TX_QUAD))
>+                      return 0;
I think, this action should be done before callback set_quad_mode,and add some 
codes in 
Spi controller driver.what is more,how do you get spi member in spi_nor?seems 
no this member.

I have one concern that as long as spi nor be configed into quad mode,spi 
controller must be also 
immediately Transfer into quad mode, otherwise read status will be fail.
But setting spi controller layer(driver/spi/) and configure spi nor 
layer(driver/mtd/spi-nor)
 are not the same mtd layer,I found that it's hard to do.
But for new structure spi controller(such as driver/mtd/spi-nor/fsl-quadspi.c) 
is very reasonable.and 
it can be easy to set spi controller and spi nor into quad mode at the same 
time.

 >              status = micron_quad_enable(nor);
 >              if (status) {
 >                      dev_err(nor->dev, "Micron quad-read not enabled\n");
>--
>1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to