[PATCH 1/3] mtd: m25p80: utilize dedicated 4-byte addressing commands
Peter Korsgaard
jacmet at sunsite.dk
Mon Mar 18 04:35:16 EDT 2013
>>>>> "B" == Brian Norris <computersforpeace at gmail.com> writes:
Hi,
B> This patch provides support for the new stateless command set, so that
B> we can avoid the problems that come with a stateful addressing mode
B> change. The flash can be left in "3-byte mode" while still accessing the
B> entire flash.
Patch looks good (besides the build issue ;)
B> diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
B> index e80db9e..5ff14ee 100644
B> --- a/drivers/mtd/devices/m25p80.c
B> +++ b/drivers/mtd/devices/m25p80.c
B> @@ -48,6 +48,12 @@
B> #define OPCODE_SE 0xd8 /* Sector erase (usually 64KiB) */
B> #define OPCODE_RDID 0x9f /* Read JEDEC ID */
B> +/* 4-byte address opcodes - used on Spansion and some Macronix flashes. */
B> +#define OPCODE_NORM_READ_4B 0x13 /* Read data bytes (low frequency) */
B> +#define OPCODE_FAST_READ_4B 0x0c /* Read data bytes (high frequency) */
B> +#define OPCODE_PP_4B 0x12 /* Page program (up to 256 bytes) */
B> +#define OPCODE_SE_4B 0xdc /* Sector erase (usually 64KiB) */
FYI, looking at a Micron N25Q datasheet, they support the same 4B
read/fast read commands, but NOT the 4B PP/SE ones - So for those you
need the enter-4B / exit-4B dance :/
--
Bye, Peter Korsgaard
More information about the linux-mtd
mailing list