.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright © 2000-2010 David Woodhouse <dwmw2@infradead.org> et al. |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License as published by |
---|
6 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
7 | | - * (at your option) any later version. |
---|
8 | | - * |
---|
9 | | - * This program is distributed in the hope that it will be useful, |
---|
10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | | - * GNU General Public License for more details. |
---|
13 | | - * |
---|
14 | | - * You should have received a copy of the GNU General Public License |
---|
15 | | - * along with this program; if not, write to the Free Software |
---|
16 | | - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
17 | | - * |
---|
18 | 4 | */ |
---|
19 | 5 | |
---|
20 | 6 | #ifndef __MTD_CFI_H__ |
---|
.. | .. |
---|
152 | 138 | uint16_t InterfaceDesc; |
---|
153 | 139 | uint16_t MaxBufWriteSize; |
---|
154 | 140 | uint8_t NumEraseRegions; |
---|
155 | | - uint32_t EraseRegionInfo[0]; /* Not host ordered */ |
---|
| 141 | + uint32_t EraseRegionInfo[]; /* Not host ordered */ |
---|
156 | 142 | } __packed; |
---|
157 | 143 | |
---|
158 | 144 | /* Extended Query Structure for both PRI and ALT */ |
---|
.. | .. |
---|
179 | 165 | uint16_t ProtRegAddr; |
---|
180 | 166 | uint8_t FactProtRegSize; |
---|
181 | 167 | uint8_t UserProtRegSize; |
---|
182 | | - uint8_t extra[0]; |
---|
| 168 | + uint8_t extra[]; |
---|
183 | 169 | } __packed; |
---|
184 | 170 | |
---|
185 | 171 | struct cfi_intelext_otpinfo { |
---|
.. | .. |
---|
233 | 219 | uint8_t VppMin; |
---|
234 | 220 | uint8_t VppMax; |
---|
235 | 221 | uint8_t TopBottom; |
---|
| 222 | + /* Below field are added from version 1.5 */ |
---|
| 223 | + uint8_t ProgramSuspend; |
---|
| 224 | + uint8_t UnlockBypass; |
---|
| 225 | + uint8_t SecureSiliconSector; |
---|
| 226 | + uint8_t SoftwareFeatures; |
---|
| 227 | +#define CFI_POLL_STATUS_REG BIT(0) |
---|
| 228 | +#define CFI_POLL_DQ BIT(1) |
---|
236 | 229 | } __packed; |
---|
237 | 230 | |
---|
238 | 231 | /* Vendor-Specific PRI for Atmel chips (command set 0x0002) */ |
---|
.. | .. |
---|
293 | 286 | map_word sector_erase_cmd; |
---|
294 | 287 | unsigned long chipshift; /* Because they're of the same type */ |
---|
295 | 288 | const char *im_name; /* inter_module name for cmdset_setup */ |
---|
296 | | - struct flchip chips[0]; /* per-chip data structure for each chip */ |
---|
| 289 | + unsigned long quirks; |
---|
| 290 | + struct flchip chips[]; /* per-chip data structure for each chip */ |
---|
297 | 291 | }; |
---|
298 | 292 | |
---|
299 | 293 | uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs, |
---|
.. | .. |
---|
377 | 371 | #define CFI_MFR_SHARP 0x00B0 |
---|
378 | 372 | #define CFI_MFR_SST 0x00BF |
---|
379 | 373 | #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ |
---|
| 374 | +#define CFI_MFR_MICRON 0x002C /* Micron */ |
---|
380 | 375 | #define CFI_MFR_TOSHIBA 0x0098 |
---|
381 | 376 | #define CFI_MFR_WINBOND 0x00DA |
---|
382 | 377 | |
---|