diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-06-23 16:37:02 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-07-21 11:39:03 +0100 |
commit | 9ab5d311cba93ce9fe1409b9dbb6ed2da24830c9 (patch) | |
tree | 8d4e98082f24d4623fd5f40a337fe1f687da868a /firmware/target/mips/ingenic_x1000/nand-x1000.h | |
parent | 2fce0a98f8b3f0efd15cc1463430023f739dab30 (diff) | |
download | rockbox-9ab5d311cba93ce9fe1409b9dbb6ed2da24830c9.tar.gz rockbox-9ab5d311cba93ce9fe1409b9dbb6ed2da24830c9.zip |
x1000: move NAND commands to chip data
Using predefined commands is too inflexible so allow the chip data
to specify I/O commands directly.
Change-Id: Ie8f943914da4b8299678a59b1063c4c6d226e83e
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/nand-x1000.h')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/nand-x1000.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/firmware/target/mips/ingenic_x1000/nand-x1000.h b/firmware/target/mips/ingenic_x1000/nand-x1000.h index bc80ecce07..b2bf4da358 100644 --- a/firmware/target/mips/ingenic_x1000/nand-x1000.h +++ b/firmware/target/mips/ingenic_x1000/nand-x1000.h | |||
@@ -106,10 +106,6 @@ struct nand_chip { | |||
106 | uint8_t dev_id; | 106 | uint8_t dev_id; |
107 | uint8_t dev_id2; | 107 | uint8_t dev_id2; |
108 | 108 | ||
109 | /* Row/column address width */ | ||
110 | uint8_t row_cycles; | ||
111 | uint8_t col_cycles; | ||
112 | |||
113 | /* Base2 logarithm of the number of pages per block */ | 109 | /* Base2 logarithm of the number of pages per block */ |
114 | unsigned log2_ppb; | 110 | unsigned log2_ppb; |
115 | 111 | ||
@@ -132,6 +128,13 @@ struct nand_chip { | |||
132 | /* Chip specific flags */ | 128 | /* Chip specific flags */ |
133 | uint32_t flags; | 129 | uint32_t flags; |
134 | 130 | ||
131 | /* SFC commands for issuing I/O ops */ | ||
132 | uint32_t cmd_page_read; | ||
133 | uint32_t cmd_program_execute; | ||
134 | uint32_t cmd_block_erase; | ||
135 | uint32_t cmd_read_cache; | ||
136 | uint32_t cmd_program_load; | ||
137 | |||
135 | /* Chip-specific setup routine */ | 138 | /* Chip-specific setup routine */ |
136 | void(*setup_chip)(struct nand_drv* drv); | 139 | void(*setup_chip)(struct nand_drv* drv); |
137 | }; | 140 | }; |
@@ -170,13 +173,6 @@ struct nand_drv { | |||
170 | uint8_t mf_id; | 173 | uint8_t mf_id; |
171 | uint8_t dev_id; | 174 | uint8_t dev_id; |
172 | uint8_t dev_id2; | 175 | uint8_t dev_id2; |
173 | |||
174 | /* SFC commands used for I/O, these are set based on chip data */ | ||
175 | uint32_t cmd_page_read; | ||
176 | uint32_t cmd_read_cache; | ||
177 | uint32_t cmd_program_load; | ||
178 | uint32_t cmd_program_execute; | ||
179 | uint32_t cmd_block_erase; | ||
180 | }; | 176 | }; |
181 | 177 | ||
182 | extern const struct nand_chip supported_nand_chips[]; | 178 | extern const struct nand_chip supported_nand_chips[]; |