linux-sg2042/include/linux/mtd
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
..
bbm.h [MTD] OneNAND: Error message printing and bad block scan erros 2007-02-07 12:15:01 +09:00
blktrans.h Support 'discard sectors' operation in translation layer support core 2008-10-09 08:56:01 +02:00
cfi.h [MTD] [NOR] Fix cfi_send_gen_cmd handling of x16 devices in x8 mode (v4) 2008-11-05 14:40:25 +01:00
cfi_endian.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
compatmac.h
concat.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
doc2000.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
flashchip.h [MTD] [NOR] cfi_cmdset_0001: Timeouts for erase, write and unlock operations 2008-08-06 09:44:54 +01:00
ftl.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
gen_probe.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
inftl.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
map.h Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6 2008-07-25 10:40:14 -04:00
mtd.h [MTD] Define and use MTD_FAIL_ADDR_UNKNOWN instead of 0xffffffff 2008-08-12 11:02:15 +01:00
mtdram.h [MTD] Provide mtdram.h with mtdram_init_device() prototype 2007-11-06 08:40:24 +00:00
nand-gpio.h [MTD] [NAND] GPIO NAND flash driver 2008-10-18 12:48:42 +01:00
nand.h [MTD] [NAND] Fix missing kernel-doc 2008-08-20 22:35:40 +01:00
nand_ecc.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
ndfc.h [MTD] NAND Fix platform structure and NDFC driver 2006-05-29 15:06:49 +02:00
nftl.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
onenand.h [MTD] [OneNAND] proper onenand_bbt_read_oob() prototype 2008-04-22 15:59:13 +01:00
onenand_regs.h [MTD] [OneNAND] Add defines for HF and sync write 2008-08-01 22:06:15 +01:00
partitions.h [MTD] remove unused mtd parameter in of_mtd_parse_partitions() 2008-10-13 15:01:42 +01:00
physmap.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
plat-ram.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
pmc551.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
sh_flctl.h [MTD] [NAND] sh_flctl: add support for Renesas SuperH FLCTL 2008-10-14 13:33:05 +01:00
super.h [MTD] generalise the handling of MTD-specific superblocks 2007-05-11 12:14:15 +01:00
ubi.h UBI: amend commentaries 2008-07-24 13:32:56 +03:00
xip.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00