mtd: spi-nor: winbond: Fix 4-byte opcode support for w25q256
authorMantas Pucka <mantas@8devices.com>
Wed, 15 Apr 2020 13:48:30 +0000 (16:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 07:34:13 +0000 (09:34 +0200)
commit58fe8bb094f1dd0e9423903583efde5970e9f5f6
tree203aa68d9c90f6caefc5743c1afd5253a63daf69
parent4590ea420ecf0219edd3d27ff4731aaa4534bde5
mtd: spi-nor: winbond: Fix 4-byte opcode support for w25q256

commit e8aec15dd5842b5b11b0e621a2293348d3574a61 upstream.

There are 2 different chips (w25q256fv and w25q256jv) that share
the same JEDEC ID. Only w25q256jv fully supports 4-byte opcodes.
Use SFDP header version to differentiate between them.

Fixes: 10050a02f7d5 ("mtd: spi-nor: Add 4B_OPCODES flag to w25q256")
Signed-off-by: Mantas Pucka <mantas@8devices.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/spi-nor/sfdp.c
drivers/mtd/spi-nor/sfdp.h
drivers/mtd/spi-nor/winbond.c