alistair23-linux/drivers
Brian Norris 87c9511fba mtd: m25p80: utilize dedicated 4-byte addressing commands
Traditionally, the command set used by SPI flash only supported a 3-byte
address. However, large SPI flash (>= 32MiB, or 256Mib) require 4 bytes
to address the entire flash. Most manufacturers have supplied a mode
switch (via a "bank register writer", or a "enable 4-byte mode"
command), which tells the flash to expect 4 address cycles from now on,
instead of 3. This mode remains until power is cut, the reset line is
triggered (on packages where present), or a command is sent to reset the
flash or to reset the 3-byte addressing mode.

As an alternative, some flash manufacturers have developed a new command
set that accept a full 4-byte address. They can be used orthogonally to
any of the modes; that is, they can be used when the flash is in either
3-byte or 4-byte address mode.

Now, there are a number of reasons why the "stateful" 4-byte address
mode switch may not be acceptable. For instance, some SoC's perform a
dumb boot sequence in which they only send 3-byte read commands to the
flash. However, if an unexpected reset occurs, the flash chip cannot be
guaranteed to return to its 3-byte mode. Thus, the SoC controller and
flash will not understand each other. (One might consider hooking up the
aforementioned reset pin to the system reset line so that any system
reset will reset the flash to 3-byte mode, but some packages do not
provide this pin. And in some other packages, one must choose between
having a reset pin and having enough pins for 4-output QSPI support.
It is an error prone process choosing a flash that will support a
hardware reset pin!)

This patch provides support for the new stateless command set, so that
we can avoid the problems that come with a stateful addressing mode
change. The flash can be left in "3-byte mode" while still accessing the
entire flash.

Note that Spansion supports this command set on all its large flash
(e.g, S25FL512S), and Macronix has begun supporting this command set on
some new flash (e.g., MX25L25635F). For the moment, I don't know how to
differentiate the Macronix that don't support this command set (e.g.,
MX25L25635E) from those that do, so this patch only supports Spansion.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2013-08-05 20:43:51 +01:00
..
accessibility printk: move braille console support into separate braille.[ch] files 2013-07-31 14:41:03 -07:00
acpi ACPI / battery: Fix parsing _BIX return value 2013-07-30 14:00:42 +02:00
amba
ata ahci_imx: depend on CONFIG_MFD_SYSCON 2013-07-26 08:57:56 -04:00
atm
auxdisplay
base Driver core patches for 3.11-rc2 2013-07-18 12:48:40 -07:00
bcma bcma: add support for BCM43142 2013-06-27 13:42:16 -04:00
block Merge branch 'for-3.11/drivers' of git://git.kernel.dk/linux-block 2013-07-22 19:02:52 -07:00
bluetooth Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth 2013-07-31 15:11:50 -04:00
bus ARM SoC device tree changes 2013-07-02 14:23:01 -07:00
cdrom drivers/cdrom/cdrom.c: use kzalloc() for failing hardware 2013-07-03 16:07:25 -07:00
char parisc: agp/parisc-agp: allow binding of user memory to the AGP GART 2013-07-31 23:42:00 +02:00
clk Power management and ACPI updates for 3.11-rc1 2013-07-03 14:35:40 -07:00
clocksource clocksource+irqchip: delete __cpuinit usage from all related files 2013-07-14 19:36:57 -04:00
connector
cpufreq cpufreq: Fix cpufreq driver module refcount balance after suspend/resume 2013-07-30 00:32:00 +02:00
cpuidle Revert "cpuidle: Quickly notice prediction failure for repeat mode" 2013-07-29 13:32:29 +02:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2013-07-24 11:05:18 -07:00
dca
devfreq Merge branch 'akpm' (updates from Andrew Morton) 2013-07-03 17:12:13 -07:00
dio
dma dma: pl330: Fix cyclic transfers 2013-07-28 19:08:33 +05:30
edac EDAC: Fix lockdep splat 2013-07-23 16:01:28 -07:00
eisa
extcon drivers: avoid format string in dev_set_name 2013-07-03 16:07:41 -07:00
firewire firewire: fix libdc1394/FlyCap2 iso event regression 2013-07-27 20:24:36 +02:00
firmware dmi_scan: add comments on dmi_present() and the loop in dmi_scan_machine() 2013-07-31 14:41:02 -07:00
fmc FMC: fix error handling in probe() function 2013-06-24 16:23:25 -07:00
gpio gpio_msm: Fix build error due to missing err.h 2013-07-31 00:34:31 +02:00
gpu drm/radeon: fix 64 bit divide in SI spm code 2013-08-04 11:03:14 +10:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2013-08-02 14:22:15 -07:00
hsi drivers: avoid format string in dev_set_name 2013-07-03 16:07:41 -07:00
hv Drivers: hv: balloon: Do not post pressure status if interrupted 2013-07-16 23:19:19 -07:00
hwmon hwmon: (max6697) fix MAX6581 ideality 2013-08-03 07:04:50 -07:00
hwspinlock
i2c Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-07-13 14:52:21 -07:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide 2013-07-10 18:15:41 -07:00
idle
iio The first round of IIO fixes for the 3.11 cycle. 2013-07-16 22:41:38 -07:00
infiniband Merge branches 'cma', 'cxgb3', 'cxgb4', 'ipoib', 'misc', 'mlx4', 'mlx5', 'nes', 'ocrdma' and 'qib' into for-next 2013-07-31 14:24:06 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2013-07-13 18:05:13 -07:00
iommu IOMMU Updates for Linux 3.11 2013-07-10 14:46:40 -07:00
ipack
irqchip clocksource+irqchip: delete __cpuinit usage from all related files 2013-07-14 19:36:57 -04:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
leds leds: mc13783: Fix "uninitialized variable" warning 2013-07-02 08:44:02 -07:00
lguest Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-07-04 11:40:58 -07:00
macintosh powerpc/windfarm: Fix noisy slots-fan on Xserve (rm31) 2013-08-01 13:11:47 +10:00
mailbox
md 2 more bugfixes for md in 3.11 2013-07-26 11:20:10 -07:00
media [media] saa7134: Fix unlocked snd_pcm_stop() call 2013-07-15 21:25:14 +02:00
memory
memstick drivers/memstick/host/r592.c: convert to module_pci_driver 2013-07-03 16:08:06 -07:00
message drivers: avoid format strings in names passed to alloc_workqueue() 2013-07-03 16:07:41 -07:00
mfd For the 3.11 merge we only have one new MFD driver for the Kontron PLD. 2013-07-10 11:10:27 -07:00
misc Char/Misc patches for 3.11-rc3 2013-07-26 11:36:12 -07:00
mmc ARM: pxa: propagate errors from regulator_enable() to pxamci 2013-07-23 12:15:15 -07:00
mtd mtd: m25p80: utilize dedicated 4-byte addressing commands 2013-08-05 20:43:51 +01:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-08-03 15:00:23 -07:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
ntb
nubus
of of/irq: init struct resource to 0 in of_irq_to_resource() 2013-07-22 19:40:38 +01:00
oprofile drivers: delete __cpuinit usage from all remaining drivers files 2013-07-14 19:36:59 -04:00
parisc parisc: Fix interrupt routing for C8000 serial ports 2013-07-31 23:42:32 +02:00
parport Merge branch 'akpm' (updates from Andrew Morton) 2013-07-03 17:12:13 -07:00
pci PCI updates for v3.11: 2013-08-02 13:12:52 -07:00
pcmcia Driver core patches for 3.11-rc1 2013-07-02 11:44:19 -07:00
pinctrl pinctrl: fix a memleak when freeing maps 2013-07-25 17:18:36 +02:00
platform x86 platform drivers: fix gpio leak 2013-07-10 15:42:51 -04:00
pnp PNP / ACPI: avoid garbage in resource name 2013-07-18 01:38:59 +02:00
power Nothing exciting this time, just assorted fixes and cleanups. 2013-07-10 11:13:00 -07:00
pps pps-gpio: add device-tree binding and support 2013-07-03 16:08:06 -07:00
ps3
ptp build some drivers only when compile-testing 2013-06-24 16:41:32 -07:00
pwm pwm: pwm-tiehrpwm: Use clk_enable/disable instead clk_prepare/unprepare. 2013-06-26 23:23:54 +02:00
rapidio rapidio: fix use after free in rio_unregister_scan() 2013-07-31 14:41:02 -07:00
regulator For the 3.11 merge we only have one new MFD driver for the Kontron PLD. 2013-07-10 11:10:27 -07:00
remoteproc Trivial remoteproc fixes by Suman Anna, Wei Yongjun and Thomas Meyer. 2013-07-11 12:35:09 -07:00
reset
rpmsg
rtc drivers/rtc/rtc-twl.c: fix: rtcX/wakealarm attribute isn't created 2013-07-31 14:41:03 -07:00
s390 s390/zcrypt: Alias for new zcrypt device driver base module 2013-07-19 08:37:39 +02:00
sbus
scsi [SCSI] isci: fix breakage caused by >16byte CDB patch 2013-07-24 14:18:12 -07:00
sfi
sh Merge branch 'pm-assorted' 2013-06-28 13:01:40 +02:00
sn
spi Merge remote-tracking branch 'spi/fix/xilinx' into spi-linus 2013-07-15 11:46:16 +01:00
ssb Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-07-13 14:52:21 -07:00
staging MAINTAINERS: Update the list of maintainers for staging/comedi driver. 2013-07-24 09:51:18 -07:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2013-07-11 12:57:19 -07:00
tc
thermal Thermal: Fix lockup of cpu_down() 2013-07-22 09:34:46 +08:00
tty parisc: Fix interrupt routing for C8000 serial ports 2013-07-31 23:42:32 +02:00
uio uio: use vma_pages() to replace (vm_end - vm_start) >> PAGE_SHIFT 2013-07-03 16:07:26 -07:00
usb USB: serial: ftdi_sio: add more RT Systems ftdi devices 2013-07-29 13:38:38 -07:00
uwb drivers: avoid format string in dev_set_name 2013-07-03 16:07:41 -07:00
vfio vfio-pci: Avoid deadlock on remove 2013-07-24 16:36:41 -06:00
vhost vhost: more fixes for 3.11 2013-07-23 14:38:20 -07:00
video Small fbdev fixes 2013-07-31 17:54:24 -07:00
virt
virtio No real surprises. 2013-07-10 14:50:58 -07:00
vlynq
vme vme: vme_tsi148.c: fix error return code in tsi148_probe() 2013-06-24 16:23:25 -07:00
w1 drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode 2013-07-03 16:08:06 -07:00
watchdog Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-07-13 14:52:21 -07:00
xen Fixes: 2013-07-31 11:37:43 -07:00
zorro zorro: switch to fixed_size_llseek() 2013-06-29 12:57:28 +04:00
Kconfig For the 3.11 merge we only have one new MFD driver for the Kontron PLD. 2013-07-10 11:10:27 -07:00
Makefile For the 3.11 merge we only have one new MFD driver for the Kontron PLD. 2013-07-10 11:10:27 -07:00