mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 23:28:29 +08:00
drivers/mtd/mx25rxx.c: add support for MX25L12873G
Build Documentation / build-html (push) Has been cancelled
Build Documentation / build-html (push) Has been cancelled
MX25L12873G is a SPI memory very similar to MX25L25673G, but 128Mbit, which means it does not use 4-byte addresses. Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
This commit is contained in:
committed by
Alan C. Assis
parent
f657ea6031
commit
ee57ca0800
@@ -108,6 +108,7 @@
|
||||
#else
|
||||
# define MX25R_JEDEC_MEMORY_TYPE 0x28 /* MX25Rx memory type */
|
||||
#endif
|
||||
#define MX25R_JEDEC_MX25L12873G_CAPACITY 0x18 /* MX25L12873G memory capacity */
|
||||
#define MX25R_JEDEC_MX25L25673G_CAPACITY 0x19 /* MX25L25673G memory capacity */
|
||||
#define MX25R_JEDEC_MX25R6435F_CAPACITY 0x17 /* MX25R6435F memory capacity */
|
||||
#define MX25R_JEDEC_MX25R8035F_CAPACITY 0x14 /* MX25R8035F memory capacity */
|
||||
@@ -127,6 +128,14 @@
|
||||
#define MX25R6435F_SECTOR_COUNT (2048)
|
||||
#define MX25R6435F_PAGE_SIZE (256)
|
||||
|
||||
/* MX25L12873G (128 MB) memory capacity */
|
||||
|
||||
#define MX25L12873G_SECTOR_SIZE (4*1024)
|
||||
#define MX25L12873G_SECTOR_SHIFT (12)
|
||||
#define MX25L12873G_ADDRESS_BYTES MX25R_ADDRESSBYTES_3
|
||||
#define MX25L12873G_SECTOR_COUNT (4096)
|
||||
#define MX25L12873G_PAGE_SIZE (256)
|
||||
|
||||
/* MX25L25673G (256 MB) memory capacity */
|
||||
|
||||
#define MX25L25673G_SECTOR_SIZE (4*1024)
|
||||
@@ -137,9 +146,11 @@
|
||||
|
||||
#ifdef CONFIG_MX25RXX_PAGE128
|
||||
# define MX25R6435F_PAGE_SHIFT (7)
|
||||
# define MX25L12873G_PAGE_SHIFT (7)
|
||||
# define MX25L25673G_PAGE_SHIFT (7)
|
||||
#else
|
||||
# define MX25R6435F_PAGE_SHIFT (8)
|
||||
# define MX25L12873G_PAGE_SHIFT (8)
|
||||
# define MX25L25673G_PAGE_SHIFT (8)
|
||||
#endif
|
||||
|
||||
@@ -881,6 +892,13 @@ int mx25rxx_readid(FAR struct mx25rxx_dev_s *dev)
|
||||
dev->nsectors = MX25R6435F_SECTOR_COUNT;
|
||||
break;
|
||||
|
||||
case MX25R_JEDEC_MX25L12873G_CAPACITY:
|
||||
dev->sectorshift = MX25L12873G_SECTOR_SHIFT;
|
||||
dev->pageshift = MX25L12873G_PAGE_SHIFT;
|
||||
dev->addressbytes = MX25L12873G_ADDRESS_BYTES;
|
||||
dev->nsectors = MX25L12873G_SECTOR_COUNT;
|
||||
break;
|
||||
|
||||
case MX25R_JEDEC_MX25L25673G_CAPACITY:
|
||||
dev->sectorshift = MX25L25673G_SECTOR_SHIFT;
|
||||
dev->pageshift = MX25L25673G_PAGE_SHIFT;
|
||||
|
||||
Reference in New Issue
Block a user