[RFC PATCH] mtd: spi-nor: add DDR quad read support

Marek Vasut marex at denx.de
Mon Apr 21 08:25:04 PDT 2014


On Thursday, April 17, 2014 at 08:41:50 PM, Geert Uytterhoeven wrote:
> On Thu, Apr 17, 2014 at 4:24 PM, Marek Vasut <marex at denx.de> wrote:
> >> @@ -1016,8 +1038,15 @@ int spi_nor_scan(struct spi_nor *nor, const
> >> struct spi_device_id *id, if (info->flags & SPI_NOR_NO_FR)
> >> 
> >>               nor->flash_read = SPI_NOR_NORMAL;
> >> 
> >> -     /* Quad/Dual-read mode takes precedence over fast/normal */
> >> -     if (mode == SPI_NOR_QUAD && info->flags & SPI_NOR_QUAD_READ) {
> >> +     /* DDR Quad/Quad/Dual-read mode takes precedence over fast/normal
> >> */ +     if (mode == SPI_NOR_DDR_QUAD && info->flags &
> >> SPI_NOR_DDR_QUAD_READ) { +             ret = set_ddr_quad_mode(nor,
> >> info->jedec_id);
> >> +             if (ret) {
> >> +                     dev_err(dev, "DDR quad mode not supported\n");
> >> +                     return ret;
> > 
> > Is it really necessary to fail here? Can we not fall back to some "lower"
> > mode ?
> 
> IIRC, the original m25p80 also fails, FWIW...

OK, so let's keep consistent. But maybe we should add a note for future 
generations that this can be improved.

Best regards,
Marek Vasut



More information about the linux-mtd mailing list