linux_dsm_epyc7002/drivers/mtd/chips
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
..
cfi_cmdset_0001.c [MTD] [NOR] fix cfi_cmdset_0001 FL_SYNCING race (take 2) 2008-09-26 18:56:18 -06:00
cfi_cmdset_0002.c [MTD] [NOR] Fix cfi_send_gen_cmd handling of x16 devices in x8 mode (v4) 2008-11-05 14:40:25 +01:00
cfi_cmdset_0020.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
cfi_probe.c [MTD] [NOR] Rename and export new cfi_qry_*() functions 2008-08-07 11:55:07 +01:00
cfi_util.c [MTD] [NOR] Rename and export new cfi_qry_*() functions 2008-08-07 11:55:07 +01:00
chipreg.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
fwh_lock.h [MTD] Fix fwh_lock locking 2007-04-17 14:11:20 -04:00
gen_probe.c [MTD] Use DIV_ROUND_UP 2008-08-02 18:45:18 +01:00
jedec_probe.c [MTD] [NOR] Fix cfi_send_gen_cmd handling of x16 devices in x8 mode (v4) 2008-11-05 14:40:25 +01:00
Kconfig [MTD] [NOR] Select MTD_CFI_UTIL when MTD_CFI probe routine is enabled 2008-09-01 12:23:22 +01:00
Makefile [MTD] [CHIPS] Remove MTD_OBSOLETE_CHIPS (jedec, amd_flash, sharp) 2007-05-09 13:34:37 +01:00
map_absent.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
map_ram.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
map_rom.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00