aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2014-04-08 21:15:31 -0400
committerBrian Norris <computersforpeace@gmail.com>2014-04-14 14:23:00 -0400
commitb02e7f3ef0beb72da8fc64542f0ac977996ec56b (patch)
treef57360f33fb08ed196f1c407ae4ac8f1ed2cf3bb /include/linux
parentbecd0cb8666de4bfaaf6eb3042f69066c8fb8677 (diff)
mtd: spi-nor: re-name OPCODE_* to SPINOR_OP_*
Qualify these with a better namespace, and prepare them for use in more drivers. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mtd/spi-nor.h54
1 files changed, 27 insertions, 27 deletions
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index a6e87190ead1..f1fe1a6659a3 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -11,41 +11,41 @@
11#define __LINUX_MTD_SPI_NOR_H 11#define __LINUX_MTD_SPI_NOR_H
12 12
13/* Flash opcodes. */ 13/* Flash opcodes. */
14#define OPCODE_WREN 0x06 /* Write enable */ 14#define SPINOR_OP_WREN 0x06 /* Write enable */
15#define OPCODE_RDSR 0x05 /* Read status register */ 15#define SPINOR_OP_RDSR 0x05 /* Read status register */
16#define OPCODE_WRSR 0x01 /* Write status register 1 byte */ 16#define SPINOR_OP_WRSR 0x01 /* Write status register 1 byte */
17#define OPCODE_NORM_READ 0x03 /* Read data bytes (low frequency) */ 17#define SPINOR_OP_NORM_READ 0x03 /* Read data bytes (low frequency) */
18#define OPCODE_FAST_READ 0x0b /* Read data bytes (high frequency) */ 18#define SPINOR_OP_FAST_READ 0x0b /* Read data bytes (high frequency) */
19#define OPCODE_DUAL_READ 0x3b /* Read data bytes (Dual SPI) */ 19#define SPINOR_OP_DUAL_READ 0x3b /* Read data bytes (Dual SPI) */
20#define OPCODE_QUAD_READ 0x6b /* Read data bytes (Quad SPI) */ 20#define SPINOR_OP_QUAD_READ 0x6b /* Read data bytes (Quad SPI) */
21#define OPCODE_PP 0x02 /* Page program (up to 256 bytes) */ 21#define SPINOR_OP_PP 0x02 /* Page program (up to 256 bytes) */
22#define OPCODE_BE_4K 0x20 /* Erase 4KiB block */ 22#define SPINOR_OP_BE_4K 0x20 /* Erase 4KiB block */
23#define OPCODE_BE_4K_PMC 0xd7 /* Erase 4KiB block on PMC chips */ 23#define SPINOR_OP_BE_4K_PMC 0xd7 /* Erase 4KiB block on PMC chips */
24#define OPCODE_BE_32K 0x52 /* Erase 32KiB block */ 24#define SPINOR_OP_BE_32K 0x52 /* Erase 32KiB block */
25#define OPCODE_CHIP_ERASE 0xc7 /* Erase whole flash chip */ 25#define SPINOR_OP_CHIP_ERASE 0xc7 /* Erase whole flash chip */
26#define OPCODE_SE 0xd8 /* Sector erase (usually 64KiB) */ 26#define SPINOR_OP_SE 0xd8 /* Sector erase (usually 64KiB) */
27#define OPCODE_RDID 0x9f /* Read JEDEC ID */ 27#define SPINOR_OP_RDID 0x9f /* Read JEDEC ID */
28#define OPCODE_RDCR 0x35 /* Read configuration register */ 28#define SPINOR_OP_RDCR 0x35 /* Read configuration register */
29 29
30/* 4-byte address opcodes - used on Spansion and some Macronix flashes. */ 30/* 4-byte address opcodes - used on Spansion and some Macronix flashes. */
31#define OPCODE_NORM_READ_4B 0x13 /* Read data bytes (low frequency) */ 31#define SPINOR_OP_NORM_READ_4B 0x13 /* Read data bytes (low frequency) */
32#define OPCODE_FAST_READ_4B 0x0c /* Read data bytes (high frequency) */ 32#define SPINOR_OP_FAST_READ_4B 0x0c /* Read data bytes (high frequency) */
33#define OPCODE_DUAL_READ_4B 0x3c /* Read data bytes (Dual SPI) */ 33#define SPINOR_OP_DUAL_READ_4B 0x3c /* Read data bytes (Dual SPI) */
34#define OPCODE_QUAD_READ_4B 0x6c /* Read data bytes (Quad SPI) */ 34#define SPINOR_OP_QUAD_READ_4B 0x6c /* Read data bytes (Quad SPI) */
35#define OPCODE_PP_4B 0x12 /* Page program (up to 256 bytes) */ 35#define SPINOR_OP_PP_4B 0x12 /* Page program (up to 256 bytes) */
36#define OPCODE_SE_4B 0xdc /* Sector erase (usually 64KiB) */ 36#define SPINOR_OP_SE_4B 0xdc /* Sector erase (usually 64KiB) */
37 37
38/* Used for SST flashes only. */ 38/* Used for SST flashes only. */
39#define OPCODE_BP 0x02 /* Byte program */ 39#define SPINOR_OP_BP 0x02 /* Byte program */
40#define OPCODE_WRDI 0x04 /* Write disable */ 40#define SPINOR_OP_WRDI 0x04 /* Write disable */
41#define OPCODE_AAI_WP 0xad /* Auto address increment word program */ 41#define SPINOR_OP_AAI_WP 0xad /* Auto address increment word program */
42 42
43/* Used for Macronix and Winbond flashes. */ 43/* Used for Macronix and Winbond flashes. */
44#define OPCODE_EN4B 0xb7 /* Enter 4-byte mode */ 44#define SPINOR_OP_EN4B 0xb7 /* Enter 4-byte mode */
45#define OPCODE_EX4B 0xe9 /* Exit 4-byte mode */ 45#define SPINOR_OP_EX4B 0xe9 /* Exit 4-byte mode */
46 46
47/* Used for Spansion flashes only. */ 47/* Used for Spansion flashes only. */
48#define OPCODE_BRWR 0x17 /* Bank register write */ 48#define SPINOR_OP_BRWR 0x17 /* Bank register write */
49 49
50/* Status Register bits. */ 50/* Status Register bits. */
51#define SR_WIP 1 /* Write in progress */ 51#define SR_WIP 1 /* Write in progress */