[PATCHv3 0/2] m25p80: QUAD read support + cleanup.

Sourav Poddar sourav.poddar at ti.com
Thu Nov 7 23:24:30 EST 2013


Hi Brian,
On Thursday 07 November 2013 11:59 PM, Brian Norris wrote:
> + Huang
>
> On Wed, Nov 06, 2013 at 08:05:33PM +0530, Sourav Poddar wrote:
>> Patch series does the following:
>> 1. Cleanup the m25p80 driver to convert bool check for
>>     read into an enum. This will help adding more read
>>     commands into the driver easily.
>>
>> 2. Add quad read support for spansion and macronix flash devices.
> Do we have any testing results? I know that some QSPI controllers still
> need some more work to be able to support this, but has someone tested
> this current patch set with a "true" SPI controller on mainline?
>
I have tested this with a 3.12-rc6  based internal kernel(as dt patches 
are not in).
  You can check the controller at drivers/spi/spi-ti-qspi.c. From driver 
perspective, there
is an additional patch[1] required, it was pulled in by Mark, and I can 
see it in his tree.
Testing details:
flash_erase the entire chip
mtd write the flash with a particular pattern
mtd read the flash
diff the write and the read value.

[1]:
Add dual/quad read mode bit flag for the master controller.
These check will be used in the spi framework to determine
whether the master controller can do dual/quad read respectively.

Signed-off-by: Sourav Poddar <sourav.poddar at ti.com>
---
v1->v2
Added dual mode bit also.
  drivers/spi/spi-ti-qspi.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index e12d962..7a45c3e 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -472,7 +472,7 @@ static int ti_qspi_probe(struct platform_device *pdev)
      if (!master)
          return -ENOMEM;

-    master->mode_bits = SPI_CPOL | SPI_CPHA;
+    master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_RX_DUAL | SPI_RX_QUAD;

      master->bus_num = -1;
      master->flags = SPI_MASTER_HALF_DUPLEX;

> Bri
> an




More information about the linux-mtd mailing list