diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-06-07 17:35:40 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-07-10 15:22:10 +0100 |
commit | cc017f211a338a68a571226e589ce34e47fc8ad3 (patch) | |
tree | 6db04ff23a3069c33be297938adc634c34592d7c /firmware/target/mips/ingenic_x1000/nand-x1000.h | |
parent | 131566b8f80355aa64bba904f9de4d1506b90442 (diff) | |
download | rockbox-cc017f211a338a68a571226e589ce34e47fc8ad3.tar.gz rockbox-cc017f211a338a68a571226e589ce34e47fc8ad3.zip |
x1000: support 2nd device ID byte for NAND flash
Some components have additional ID bytes. Add support for an
optional 2nd device ID byte during the identification routine.
Change-Id: I5bbad73fb57004067c6f13f223f7bf4d43ff7849
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/nand-x1000.h')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/nand-x1000.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/target/mips/ingenic_x1000/nand-x1000.h b/firmware/target/mips/ingenic_x1000/nand-x1000.h index 5e6d1f09bc..176897e4f2 100644 --- a/firmware/target/mips/ingenic_x1000/nand-x1000.h +++ b/firmware/target/mips/ingenic_x1000/nand-x1000.h | |||
@@ -41,6 +41,8 @@ | |||
41 | #define NAND_CHIPFLAG_QUAD 0x0001 | 41 | #define NAND_CHIPFLAG_QUAD 0x0001 |
42 | /* Chip requires QE bit set to enable quad I/O mode */ | 42 | /* Chip requires QE bit set to enable quad I/O mode */ |
43 | #define NAND_CHIPFLAG_HAS_QE_BIT 0x0002 | 43 | #define NAND_CHIPFLAG_HAS_QE_BIT 0x0002 |
44 | /* Chip has 2nd device ID byte */ | ||
45 | #define NAND_CHIPFLAG_HAS_DEVID2 0x0004 | ||
44 | 46 | ||
45 | /* cmd mode a d phase format has data */ | 47 | /* cmd mode a d phase format has data */ |
46 | #define NANDCMD_RESET SFC_CMD(0xff, SFC_TMODE_1_1_1, 0, 0, SFC_PFMT_ADDR_FIRST, 0) | 48 | #define NANDCMD_RESET SFC_CMD(0xff, SFC_TMODE_1_1_1, 0, 0, SFC_PFMT_ADDR_FIRST, 0) |
@@ -97,6 +99,7 @@ typedef struct nand_chip { | |||
97 | /* Manufacturer and device ID bytes */ | 99 | /* Manufacturer and device ID bytes */ |
98 | uint8_t mf_id; | 100 | uint8_t mf_id; |
99 | uint8_t dev_id; | 101 | uint8_t dev_id; |
102 | uint8_t dev_id2; | ||
100 | 103 | ||
101 | /* Row/column address width */ | 104 | /* Row/column address width */ |
102 | uint8_t row_cycles; | 105 | uint8_t row_cycles; |
@@ -158,6 +161,7 @@ typedef struct nand_drv { | |||
158 | /* Probed mf_id / dev_id for debugging, in case identification fails. */ | 161 | /* Probed mf_id / dev_id for debugging, in case identification fails. */ |
159 | uint8_t mf_id; | 162 | uint8_t mf_id; |
160 | uint8_t dev_id; | 163 | uint8_t dev_id; |
164 | uint8_t dev_id2; | ||
161 | 165 | ||
162 | /* SFC commands used for I/O, these are set based on chip data */ | 166 | /* SFC commands used for I/O, these are set based on chip data */ |
163 | uint32_t cmd_page_read; | 167 | uint32_t cmd_page_read; |