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

Geert Uytterhoeven geert at linux-m68k.org
Thu Apr 17 11:41:50 PDT 2014


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...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



More information about the linux-mtd mailing list