]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 21 Aug 2013 08:35:34 +0000 (01:35 -0700)
commit27761392a1879b1a4169bdebe55ea173f36bf52c
tree91b904e3ddcb09672bf7a9bb615fc0d8e0831108
parent2fd4360b15fc90939c9403647e9b9958547cf00d
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>
drivers/mtd/devices/m25p80.c