mtd: m25p80: make CONFIG_M25PXX_USE_FAST_READ safe to enable
authorSascha Hauer <s.hauer@pengutronix.de>
Tue, 20 Aug 2013 07:54:40 +0000 (09:54 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 30 Aug 2013 20:44:06 +0000 (21:44 +0100)
commit58146992c956c2104ca8990a621e39a20e9c9f94
treeddc5e6ecad9f6057013c5a4480befde15ece8ee1
parent7e7d83b32ed7094f73008a99db4fecb74b8c2099
mtd: m25p80: make CONFIG_M25PXX_USE_FAST_READ safe to enable

This patch adds a flag to struct flash_info indicating that
fast_read is not supported. This now gives the following logic
when determing whether to enable fastread:

If the flash chip does not support fast_read, then disable it.
Otherwise:
1) enable fast_read if device node contains m25p,fast-read
2) enable fast_read if forced in Kconfig

This makes enabling CONFIG_M25PXX_USE_FAST_READ a safe option
since we no longer enable the fast_read option unconditionally.

For now fast_read is disabled for the everspin mr25h256 and the
catalyst devices. Others may need the flag aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/devices/m25p80.c