[PATCH 1/3] mtd: m25p80: utilize dedicated 4-byte addressing commands
Matthieu CASTET
matthieu.castet at parrot.com
Mon Mar 18 11:37:12 EDT 2013
Peter Korsgaard a écrit :
>>>>>> "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 :/
>
Same for windbond chip.
More information about the linux-mtd
mailing list