[PATCH 4/5] mtd: m25p80: remove M25PXX_USE_FAST_READ Kconfig
Marek Vasut
marex at denx.de
Sun Oct 27 09:32:42 PDT 2013
Hi Brian,
> Remove the compile-time option for FAST_READ, since we have run-time
> support for detecting it.
>
> Signed-off-by: Brian Norris <computersforpeace at gmail.com>
> ---
> drivers/mtd/devices/Kconfig | 7 -------
> drivers/mtd/devices/m25p80.c | 11 ++++++-----
> 2 files changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
> index 74ab4b7..0128138 100644
> --- a/drivers/mtd/devices/Kconfig
> +++ b/drivers/mtd/devices/Kconfig
> @@ -95,13 +95,6 @@ config MTD_M25P80
> if you want to specify device partitioning or to use a device which
> doesn't support the JEDEC ID instruction.
>
> -config M25PXX_USE_FAST_READ
> - bool "Use FAST_READ OPCode allowing SPI CLK >= 50MHz"
> - depends on MTD_M25P80
> - default y
> - help
> - This option enables FAST_READ access supported by ST M25Pxx.
> -
> config MTD_SPEAR_SMI
> tristate "SPEAR MTD NOR Support through SMI controller"
> depends on PLAT_SPEAR
> diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
> index 7e3ec7a..d6c5c57 100644
> --- a/drivers/mtd/devices/m25p80.c
> +++ b/drivers/mtd/devices/m25p80.c
> @@ -1055,13 +1055,14 @@ static int m25p_probe(struct spi_device *spi)
> flash->page_size = info->page_size;
> flash->mtd.writebufsize = flash->page_size;
>
> - flash->fast_read = false;
> - if (np && of_property_read_bool(np, "m25p,fast-read"))
> + if (np)
> + /* If we were instantiated by DT, use it */
> + flash->fast_read = of_property_read_bool(np, "m25p,fast-read");
> + else
> + /* If we weren't instantiated by DT, default to fast-read */
> flash->fast_read = true;
We should default to FALSE , unless explicitly requested by DT, am I wrong?
Otherwise this might break the old chips.
[...]
Best regards,
Marek Vasut
More information about the linux-mtd
mailing list