lkml.org 
[lkml]   [2015]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] mtd: spi-nor: Only set Micron quad-read mode when controller in 4-lane TX mode
Date
>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



\
 
 \ /
  Last update: 2015-07-01 04:41    [W:0.129 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site