linux/include
Eric W. Biederman 467622ef2a [MTD] [NOR] Fix cfi_send_gen_cmd handling of x16 devices in x8 mode (v4)
For "unlock" cycles to 16bit devices in 8bit compatibility mode we need
to use the byte addresses 0xaaa and 0x555. These effectively match
the word address 0x555 and 0x2aa, except the latter has its low bit set.

Most chips don't care about the value of the 'A-1' pin in x8 mode,
but some -- like the ST M29W320D -- do. So we need to be careful to
set it where appropriate.

cfi_send_gen_cmd is only ever passed addresses where the low byte
is 0x00, 0x55 or 0xaa. Of those, only addresses ending 0xaa are
affected by this patch, by masking in the extra low bit when the device
is known to be in compatibility mode.

[dwmw2: Do it only when (cmd_ofs & 0xff) == 0xaa]
v4: Fix  stupid typo in cfi_build_cmd_addr that failed to compile
    I'm writing this patch way to late at night.
v3: Bring all of the work back into cfi_build_cmd_addr
    including calling of map_bankwidth(map) and cfi_interleave(cfi)
    So every caller doesn't need to.
v2: Only modified the address if we our device_type is larger than our
    bus width.

Cc: stable@kernel.org
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-11-05 14:40:25 +01:00
..
acpi include: replace __FUNCTION__ with __func__ 2008-10-16 11:21:30 -07:00
asm-arm
asm-cris container freezer: add TIF_FREEZE flag to all architectures 2008-10-20 08:52:33 -07:00
asm-frv ide: fix support for IDE PCI controllers using MMIO on frv 2008-10-17 18:09:14 +02:00
asm-generic fix WARN() for PPC 2008-10-20 15:29:57 -07:00
asm-h8300 h8300: update timer handler - new files 2008-10-16 11:21:29 -07:00
asm-m32r [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
asm-m68k Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-10-20 13:12:39 -07:00
asm-mn10300 [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
asm-um container freezer: add TIF_FREEZE flag to all architectures 2008-10-20 08:52:33 -07:00
asm-x86 Merge branch 'tracing-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-10-20 13:35:07 -07:00
asm-xtensa container freezer: add TIF_FREEZE flag to all architectures 2008-10-20 08:52:33 -07:00
crypto
drm radeon: fix PCI bus mastering support enables. 2008-10-18 07:10:54 +10:00
keys
linux [MTD] [NOR] Fix cfi_send_gen_cmd handling of x16 devices in x8 mode (v4) 2008-11-05 14:40:25 +01:00
math-emu
media V4L/DVB (9276): videobuf-dvb: two functions are now static 2008-10-17 17:39:14 -03:00
mtd
net Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs 2008-10-20 09:39:47 -07:00
pcmcia
rdma
rxrpc
scsi [SCSI] iscsi_tcp: return a descriptive error value during connection errors 2008-10-13 09:29:00 -04:00
sound Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2008-10-13 14:03:59 -07:00
trace sched: clean up tracepoints 2008-10-14 10:33:14 +02:00
video video: add sh_mobile_lcdc platform flags 2008-10-20 11:38:50 +09:00
xen
Kbuild