diff options
author | Brian Norris <computersforpeace@gmail.com> | 2016-01-29 14:25:34 -0500 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2016-03-07 21:01:56 -0500 |
commit | 0618114e2c5dd059f8d22787e62e3f1723af68fc (patch) | |
tree | dce2a29ae43379f5694915b9dfc0a3348cf0bbec | |
parent | 47b8edbf0d43dcb9fda83833c05470edf59c31e3 (diff) |
mtd: spi-nor: use BIT() for flash_info flags
It's a little easier to read and make sure there are no collisions
(IMO).
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
-rw-r--r-- | drivers/mtd/spi-nor/spi-nor.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 6fcd9d7589f8..72d87c2bb0cf 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c | |||
@@ -61,14 +61,14 @@ struct flash_info { | |||
61 | u16 addr_width; | 61 | u16 addr_width; |
62 | 62 | ||
63 | u16 flags; | 63 | u16 flags; |
64 | #define SECT_4K 0x01 /* SPINOR_OP_BE_4K works uniformly */ | 64 | #define SECT_4K BIT(0) /* SPINOR_OP_BE_4K works uniformly */ |
65 | #define SPI_NOR_NO_ERASE 0x02 /* No erase command needed */ | 65 | #define SPI_NOR_NO_ERASE BIT(1) /* No erase command needed */ |
66 | #define SST_WRITE 0x04 /* use SST byte programming */ | 66 | #define SST_WRITE BIT(2) /* use SST byte programming */ |
67 | #define SPI_NOR_NO_FR 0x08 /* Can't do fastread */ | 67 | #define SPI_NOR_NO_FR BIT(3) /* Can't do fastread */ |
68 | #define SECT_4K_PMC 0x10 /* SPINOR_OP_BE_4K_PMC works uniformly */ | 68 | #define SECT_4K_PMC BIT(4) /* SPINOR_OP_BE_4K_PMC works uniformly */ |
69 | #define SPI_NOR_DUAL_READ 0x20 /* Flash supports Dual Read */ | 69 | #define SPI_NOR_DUAL_READ BIT(5) /* Flash supports Dual Read */ |
70 | #define SPI_NOR_QUAD_READ 0x40 /* Flash supports Quad Read */ | 70 | #define SPI_NOR_QUAD_READ BIT(6) /* Flash supports Quad Read */ |
71 | #define USE_FSR 0x80 /* use flag status register */ | 71 | #define USE_FSR BIT(7) /* use flag status register */ |
72 | }; | 72 | }; |
73 | 73 | ||
74 | #define JEDEC_MFR(info) ((info)->id[0]) | 74 | #define JEDEC_MFR(info) ((info)->id[0]) |