denali.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. /*
  2. * NAND Flash Controller Device Driver
  3. * Copyright (c) 2009 - 2010, Intel Corporation and its suppliers.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms and conditions of the GNU General Public License,
  7. * version 2, as published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  17. *
  18. */
  19. #include <linux/mtd/nand.h>
  20. #define DEVICE_RESET 0x0
  21. #define DEVICE_RESET__BANK0 0x0001
  22. #define DEVICE_RESET__BANK1 0x0002
  23. #define DEVICE_RESET__BANK2 0x0004
  24. #define DEVICE_RESET__BANK3 0x0008
  25. #define TRANSFER_SPARE_REG 0x10
  26. #define TRANSFER_SPARE_REG__FLAG 0x0001
  27. #define LOAD_WAIT_CNT 0x20
  28. #define LOAD_WAIT_CNT__VALUE 0xffff
  29. #define PROGRAM_WAIT_CNT 0x30
  30. #define PROGRAM_WAIT_CNT__VALUE 0xffff
  31. #define ERASE_WAIT_CNT 0x40
  32. #define ERASE_WAIT_CNT__VALUE 0xffff
  33. #define INT_MON_CYCCNT 0x50
  34. #define INT_MON_CYCCNT__VALUE 0xffff
  35. #define RB_PIN_ENABLED 0x60
  36. #define RB_PIN_ENABLED__BANK0 0x0001
  37. #define RB_PIN_ENABLED__BANK1 0x0002
  38. #define RB_PIN_ENABLED__BANK2 0x0004
  39. #define RB_PIN_ENABLED__BANK3 0x0008
  40. #define MULTIPLANE_OPERATION 0x70
  41. #define MULTIPLANE_OPERATION__FLAG 0x0001
  42. #define MULTIPLANE_READ_ENABLE 0x80
  43. #define MULTIPLANE_READ_ENABLE__FLAG 0x0001
  44. #define COPYBACK_DISABLE 0x90
  45. #define COPYBACK_DISABLE__FLAG 0x0001
  46. #define CACHE_WRITE_ENABLE 0xa0
  47. #define CACHE_WRITE_ENABLE__FLAG 0x0001
  48. #define CACHE_READ_ENABLE 0xb0
  49. #define CACHE_READ_ENABLE__FLAG 0x0001
  50. #define PREFETCH_MODE 0xc0
  51. #define PREFETCH_MODE__PREFETCH_EN 0x0001
  52. #define PREFETCH_MODE__PREFETCH_BURST_LENGTH 0xfff0
  53. #define CHIP_ENABLE_DONT_CARE 0xd0
  54. #define CHIP_EN_DONT_CARE__FLAG 0x01
  55. #define ECC_ENABLE 0xe0
  56. #define ECC_ENABLE__FLAG 0x0001
  57. #define GLOBAL_INT_ENABLE 0xf0
  58. #define GLOBAL_INT_EN_FLAG 0x01
  59. #define WE_2_RE 0x100
  60. #define WE_2_RE__VALUE 0x003f
  61. #define ADDR_2_DATA 0x110
  62. #define ADDR_2_DATA__VALUE 0x003f
  63. #define RE_2_WE 0x120
  64. #define RE_2_WE__VALUE 0x003f
  65. #define ACC_CLKS 0x130
  66. #define ACC_CLKS__VALUE 0x000f
  67. #define NUMBER_OF_PLANES 0x140
  68. #define NUMBER_OF_PLANES__VALUE 0x0007
  69. #define PAGES_PER_BLOCK 0x150
  70. #define PAGES_PER_BLOCK__VALUE 0xffff
  71. #define DEVICE_WIDTH 0x160
  72. #define DEVICE_WIDTH__VALUE 0x0003
  73. #define DEVICE_MAIN_AREA_SIZE 0x170
  74. #define DEVICE_MAIN_AREA_SIZE__VALUE 0xffff
  75. #define DEVICE_SPARE_AREA_SIZE 0x180
  76. #define DEVICE_SPARE_AREA_SIZE__VALUE 0xffff
  77. #define TWO_ROW_ADDR_CYCLES 0x190
  78. #define TWO_ROW_ADDR_CYCLES__FLAG 0x0001
  79. #define MULTIPLANE_ADDR_RESTRICT 0x1a0
  80. #define MULTIPLANE_ADDR_RESTRICT__FLAG 0x0001
  81. #define ECC_CORRECTION 0x1b0
  82. #define ECC_CORRECTION__VALUE 0x001f
  83. #define READ_MODE 0x1c0
  84. #define READ_MODE__VALUE 0x000f
  85. #define WRITE_MODE 0x1d0
  86. #define WRITE_MODE__VALUE 0x000f
  87. #define COPYBACK_MODE 0x1e0
  88. #define COPYBACK_MODE__VALUE 0x000f
  89. #define RDWR_EN_LO_CNT 0x1f0
  90. #define RDWR_EN_LO_CNT__VALUE 0x001f
  91. #define RDWR_EN_HI_CNT 0x200
  92. #define RDWR_EN_HI_CNT__VALUE 0x001f
  93. #define MAX_RD_DELAY 0x210
  94. #define MAX_RD_DELAY__VALUE 0x000f
  95. #define CS_SETUP_CNT 0x220
  96. #define CS_SETUP_CNT__VALUE 0x001f
  97. #define SPARE_AREA_SKIP_BYTES 0x230
  98. #define SPARE_AREA_SKIP_BYTES__VALUE 0x003f
  99. #define SPARE_AREA_MARKER 0x240
  100. #define SPARE_AREA_MARKER__VALUE 0xffff
  101. #define DEVICES_CONNECTED 0x250
  102. #define DEVICES_CONNECTED__VALUE 0x0007
  103. #define DIE_MASK 0x260
  104. #define DIE_MASK__VALUE 0x00ff
  105. #define FIRST_BLOCK_OF_NEXT_PLANE 0x270
  106. #define FIRST_BLOCK_OF_NEXT_PLANE__VALUE 0xffff
  107. #define WRITE_PROTECT 0x280
  108. #define WRITE_PROTECT__FLAG 0x0001
  109. #define RE_2_RE 0x290
  110. #define RE_2_RE__VALUE 0x003f
  111. #define MANUFACTURER_ID 0x300
  112. #define MANUFACTURER_ID__VALUE 0x00ff
  113. #define DEVICE_ID 0x310
  114. #define DEVICE_ID__VALUE 0x00ff
  115. #define DEVICE_PARAM_0 0x320
  116. #define DEVICE_PARAM_0__VALUE 0x00ff
  117. #define DEVICE_PARAM_1 0x330
  118. #define DEVICE_PARAM_1__VALUE 0x00ff
  119. #define DEVICE_PARAM_2 0x340
  120. #define DEVICE_PARAM_2__VALUE 0x00ff
  121. #define LOGICAL_PAGE_DATA_SIZE 0x350
  122. #define LOGICAL_PAGE_DATA_SIZE__VALUE 0xffff
  123. #define LOGICAL_PAGE_SPARE_SIZE 0x360
  124. #define LOGICAL_PAGE_SPARE_SIZE__VALUE 0xffff
  125. #define REVISION 0x370
  126. #define REVISION__VALUE 0xffff
  127. #define ONFI_DEVICE_FEATURES 0x380
  128. #define ONFI_DEVICE_FEATURES__VALUE 0x003f
  129. #define ONFI_OPTIONAL_COMMANDS 0x390
  130. #define ONFI_OPTIONAL_COMMANDS__VALUE 0x003f
  131. #define ONFI_TIMING_MODE 0x3a0
  132. #define ONFI_TIMING_MODE__VALUE 0x003f
  133. #define ONFI_PGM_CACHE_TIMING_MODE 0x3b0
  134. #define ONFI_PGM_CACHE_TIMING_MODE__VALUE 0x003f
  135. #define ONFI_DEVICE_NO_OF_LUNS 0x3c0
  136. #define ONFI_DEVICE_NO_OF_LUNS__NO_OF_LUNS 0x00ff
  137. #define ONFI_DEVICE_NO_OF_LUNS__ONFI_DEVICE 0x0100
  138. #define ONFI_DEVICE_NO_OF_BLOCKS_PER_LUN_L 0x3d0
  139. #define ONFI_DEVICE_NO_OF_BLOCKS_PER_LUN_L__VALUE 0xffff
  140. #define ONFI_DEVICE_NO_OF_BLOCKS_PER_LUN_U 0x3e0
  141. #define ONFI_DEVICE_NO_OF_BLOCKS_PER_LUN_U__VALUE 0xffff
  142. #define FEATURES 0x3f0
  143. #define FEATURES__N_BANKS 0x0003
  144. #define FEATURES__ECC_MAX_ERR 0x003c
  145. #define FEATURES__DMA 0x0040
  146. #define FEATURES__CMD_DMA 0x0080
  147. #define FEATURES__PARTITION 0x0100
  148. #define FEATURES__XDMA_SIDEBAND 0x0200
  149. #define FEATURES__GPREG 0x0400
  150. #define FEATURES__INDEX_ADDR 0x0800
  151. #define TRANSFER_MODE 0x400
  152. #define TRANSFER_MODE__VALUE 0x0003
  153. #define INTR_STATUS(__bank) (0x410 + ((__bank) * 0x50))
  154. #define INTR_EN(__bank) (0x420 + ((__bank) * 0x50))
  155. #define INTR_STATUS__ECC_TRANSACTION_DONE 0x0001
  156. #define INTR_STATUS__ECC_ERR 0x0002
  157. #define INTR_STATUS__DMA_CMD_COMP 0x0004
  158. #define INTR_STATUS__TIME_OUT 0x0008
  159. #define INTR_STATUS__PROGRAM_FAIL 0x0010
  160. #define INTR_STATUS__ERASE_FAIL 0x0020
  161. #define INTR_STATUS__LOAD_COMP 0x0040
  162. #define INTR_STATUS__PROGRAM_COMP 0x0080
  163. #define INTR_STATUS__ERASE_COMP 0x0100
  164. #define INTR_STATUS__PIPE_CPYBCK_CMD_COMP 0x0200
  165. #define INTR_STATUS__LOCKED_BLK 0x0400
  166. #define INTR_STATUS__UNSUP_CMD 0x0800
  167. #define INTR_STATUS__INT_ACT 0x1000
  168. #define INTR_STATUS__RST_COMP 0x2000
  169. #define INTR_STATUS__PIPE_CMD_ERR 0x4000
  170. #define INTR_STATUS__PAGE_XFER_INC 0x8000
  171. #define INTR_EN__ECC_TRANSACTION_DONE 0x0001
  172. #define INTR_EN__ECC_ERR 0x0002
  173. #define INTR_EN__DMA_CMD_COMP 0x0004
  174. #define INTR_EN__TIME_OUT 0x0008
  175. #define INTR_EN__PROGRAM_FAIL 0x0010
  176. #define INTR_EN__ERASE_FAIL 0x0020
  177. #define INTR_EN__LOAD_COMP 0x0040
  178. #define INTR_EN__PROGRAM_COMP 0x0080
  179. #define INTR_EN__ERASE_COMP 0x0100
  180. #define INTR_EN__PIPE_CPYBCK_CMD_COMP 0x0200
  181. #define INTR_EN__LOCKED_BLK 0x0400
  182. #define INTR_EN__UNSUP_CMD 0x0800
  183. #define INTR_EN__INT_ACT 0x1000
  184. #define INTR_EN__RST_COMP 0x2000
  185. #define INTR_EN__PIPE_CMD_ERR 0x4000
  186. #define INTR_EN__PAGE_XFER_INC 0x8000
  187. #define PAGE_CNT(__bank) (0x430 + ((__bank) * 0x50))
  188. #define ERR_PAGE_ADDR(__bank) (0x440 + ((__bank) * 0x50))
  189. #define ERR_BLOCK_ADDR(__bank) (0x450 + ((__bank) * 0x50))
  190. #define DATA_INTR 0x550
  191. #define DATA_INTR__WRITE_SPACE_AV 0x0001
  192. #define DATA_INTR__READ_DATA_AV 0x0002
  193. #define DATA_INTR_EN 0x560
  194. #define DATA_INTR_EN__WRITE_SPACE_AV 0x0001
  195. #define DATA_INTR_EN__READ_DATA_AV 0x0002
  196. #define GPREG_0 0x570
  197. #define GPREG_0__VALUE 0xffff
  198. #define GPREG_1 0x580
  199. #define GPREG_1__VALUE 0xffff
  200. #define GPREG_2 0x590
  201. #define GPREG_2__VALUE 0xffff
  202. #define GPREG_3 0x5a0
  203. #define GPREG_3__VALUE 0xffff
  204. #define ECC_THRESHOLD 0x600
  205. #define ECC_THRESHOLD__VALUE 0x03ff
  206. #define ECC_ERROR_BLOCK_ADDRESS 0x610
  207. #define ECC_ERROR_BLOCK_ADDRESS__VALUE 0xffff
  208. #define ECC_ERROR_PAGE_ADDRESS 0x620
  209. #define ECC_ERROR_PAGE_ADDRESS__VALUE 0x0fff
  210. #define ECC_ERROR_PAGE_ADDRESS__BANK 0xf000
  211. #define ECC_ERROR_ADDRESS 0x630
  212. #define ECC_ERROR_ADDRESS__OFFSET 0x0fff
  213. #define ECC_ERROR_ADDRESS__SECTOR_NR 0xf000
  214. #define ERR_CORRECTION_INFO 0x640
  215. #define ERR_CORRECTION_INFO__BYTEMASK 0x00ff
  216. #define ERR_CORRECTION_INFO__DEVICE_NR 0x0f00
  217. #define ERR_CORRECTION_INFO__ERROR_TYPE 0x4000
  218. #define ERR_CORRECTION_INFO__LAST_ERR_INFO 0x8000
  219. #define DMA_ENABLE 0x700
  220. #define DMA_ENABLE__FLAG 0x0001
  221. #define IGNORE_ECC_DONE 0x710
  222. #define IGNORE_ECC_DONE__FLAG 0x0001
  223. #define DMA_INTR 0x720
  224. #define DMA_INTR__TARGET_ERROR 0x0001
  225. #define DMA_INTR__DESC_COMP_CHANNEL0 0x0002
  226. #define DMA_INTR__DESC_COMP_CHANNEL1 0x0004
  227. #define DMA_INTR__DESC_COMP_CHANNEL2 0x0008
  228. #define DMA_INTR__DESC_COMP_CHANNEL3 0x0010
  229. #define DMA_INTR__MEMCOPY_DESC_COMP 0x0020
  230. #define DMA_INTR_EN 0x730
  231. #define DMA_INTR_EN__TARGET_ERROR 0x0001
  232. #define DMA_INTR_EN__DESC_COMP_CHANNEL0 0x0002
  233. #define DMA_INTR_EN__DESC_COMP_CHANNEL1 0x0004
  234. #define DMA_INTR_EN__DESC_COMP_CHANNEL2 0x0008
  235. #define DMA_INTR_EN__DESC_COMP_CHANNEL3 0x0010
  236. #define DMA_INTR_EN__MEMCOPY_DESC_COMP 0x0020
  237. #define TARGET_ERR_ADDR_LO 0x740
  238. #define TARGET_ERR_ADDR_LO__VALUE 0xffff
  239. #define TARGET_ERR_ADDR_HI 0x750
  240. #define TARGET_ERR_ADDR_HI__VALUE 0xffff
  241. #define CHNL_ACTIVE 0x760
  242. #define CHNL_ACTIVE__CHANNEL0 0x0001
  243. #define CHNL_ACTIVE__CHANNEL1 0x0002
  244. #define CHNL_ACTIVE__CHANNEL2 0x0004
  245. #define CHNL_ACTIVE__CHANNEL3 0x0008
  246. #define ACTIVE_SRC_ID 0x800
  247. #define ACTIVE_SRC_ID__VALUE 0x00ff
  248. #define PTN_INTR 0x810
  249. #define PTN_INTR__CONFIG_ERROR 0x0001
  250. #define PTN_INTR__ACCESS_ERROR_BANK0 0x0002
  251. #define PTN_INTR__ACCESS_ERROR_BANK1 0x0004
  252. #define PTN_INTR__ACCESS_ERROR_BANK2 0x0008
  253. #define PTN_INTR__ACCESS_ERROR_BANK3 0x0010
  254. #define PTN_INTR__REG_ACCESS_ERROR 0x0020
  255. #define PTN_INTR_EN 0x820
  256. #define PTN_INTR_EN__CONFIG_ERROR 0x0001
  257. #define PTN_INTR_EN__ACCESS_ERROR_BANK0 0x0002
  258. #define PTN_INTR_EN__ACCESS_ERROR_BANK1 0x0004
  259. #define PTN_INTR_EN__ACCESS_ERROR_BANK2 0x0008
  260. #define PTN_INTR_EN__ACCESS_ERROR_BANK3 0x0010
  261. #define PTN_INTR_EN__REG_ACCESS_ERROR 0x0020
  262. #define PERM_SRC_ID(__bank) (0x830 + ((__bank) * 0x40))
  263. #define PERM_SRC_ID__SRCID 0x00ff
  264. #define PERM_SRC_ID__DIRECT_ACCESS_ACTIVE 0x0800
  265. #define PERM_SRC_ID__WRITE_ACTIVE 0x2000
  266. #define PERM_SRC_ID__READ_ACTIVE 0x4000
  267. #define PERM_SRC_ID__PARTITION_VALID 0x8000
  268. #define MIN_BLK_ADDR(__bank) (0x840 + ((__bank) * 0x40))
  269. #define MIN_BLK_ADDR__VALUE 0xffff
  270. #define MAX_BLK_ADDR(__bank) (0x850 + ((__bank) * 0x40))
  271. #define MAX_BLK_ADDR__VALUE 0xffff
  272. #define MIN_MAX_BANK(__bank) (0x860 + ((__bank) * 0x40))
  273. #define MIN_MAX_BANK__MIN_VALUE 0x0003
  274. #define MIN_MAX_BANK__MAX_VALUE 0x000c
  275. /* ffsdefs.h */
  276. #define CLEAR 0 /*use this to clear a field instead of "fail"*/
  277. #define SET 1 /*use this to set a field instead of "pass"*/
  278. #define FAIL 1 /*failed flag*/
  279. #define PASS 0 /*success flag*/
  280. #define ERR -1 /*error flag*/
  281. /* lld.h */
  282. #define GOOD_BLOCK 0
  283. #define DEFECTIVE_BLOCK 1
  284. #define READ_ERROR 2
  285. #define CLK_X 5
  286. #define CLK_MULTI 4
  287. /* spectraswconfig.h */
  288. #define CMD_DMA 0
  289. #define SPECTRA_PARTITION_ID 0
  290. /**** Block Table and Reserved Block Parameters *****/
  291. #define SPECTRA_START_BLOCK 3
  292. #define NUM_FREE_BLOCKS_GATE 30
  293. /* KBV - Updated to LNW scratch register address */
  294. #define SCRATCH_REG_ADDR CONFIG_MTD_NAND_DENALI_SCRATCH_REG_ADDR
  295. #define SCRATCH_REG_SIZE 64
  296. #define GLOB_HWCTL_DEFAULT_BLKS 2048
  297. #define SUPPORT_15BITECC 1
  298. #define SUPPORT_8BITECC 1
  299. #define CUSTOM_CONF_PARAMS 0
  300. #define ONFI_BLOOM_TIME 1
  301. #define MODE5_WORKAROUND 0
  302. /* lld_nand.h */
  303. /*
  304. * NAND Flash Controller Device Driver
  305. * Copyright (c) 2009, Intel Corporation and its suppliers.
  306. *
  307. * This program is free software; you can redistribute it and/or modify it
  308. * under the terms and conditions of the GNU General Public License,
  309. * version 2, as published by the Free Software Foundation.
  310. *
  311. * This program is distributed in the hope it will be useful, but WITHOUT
  312. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  313. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  314. * more details.
  315. *
  316. * You should have received a copy of the GNU General Public License along with
  317. * this program; if not, write to the Free Software Foundation, Inc.,
  318. * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  319. *
  320. */
  321. #ifndef _LLD_NAND_
  322. #define _LLD_NAND_
  323. #define MODE_00 0x00000000
  324. #define MODE_01 0x04000000
  325. #define MODE_10 0x08000000
  326. #define MODE_11 0x0C000000
  327. #define DATA_TRANSFER_MODE 0
  328. #define PROTECTION_PER_BLOCK 1
  329. #define LOAD_WAIT_COUNT 2
  330. #define PROGRAM_WAIT_COUNT 3
  331. #define ERASE_WAIT_COUNT 4
  332. #define INT_MONITOR_CYCLE_COUNT 5
  333. #define READ_BUSY_PIN_ENABLED 6
  334. #define MULTIPLANE_OPERATION_SUPPORT 7
  335. #define PRE_FETCH_MODE 8
  336. #define CE_DONT_CARE_SUPPORT 9
  337. #define COPYBACK_SUPPORT 10
  338. #define CACHE_WRITE_SUPPORT 11
  339. #define CACHE_READ_SUPPORT 12
  340. #define NUM_PAGES_IN_BLOCK 13
  341. #define ECC_ENABLE_SELECT 14
  342. #define WRITE_ENABLE_2_READ_ENABLE 15
  343. #define ADDRESS_2_DATA 16
  344. #define READ_ENABLE_2_WRITE_ENABLE 17
  345. #define TWO_ROW_ADDRESS_CYCLES 18
  346. #define MULTIPLANE_ADDRESS_RESTRICT 19
  347. #define ACC_CLOCKS 20
  348. #define READ_WRITE_ENABLE_LOW_COUNT 21
  349. #define READ_WRITE_ENABLE_HIGH_COUNT 22
  350. #define ECC_SECTOR_SIZE 512
  351. #define DENALI_BUF_SIZE (NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE)
  352. struct nand_buf {
  353. int head;
  354. int tail;
  355. uint8_t buf[DENALI_BUF_SIZE];
  356. dma_addr_t dma_buf;
  357. };
  358. #define INTEL_CE4100 1
  359. #define INTEL_MRST 2
  360. struct denali_nand_info {
  361. struct mtd_info mtd;
  362. struct nand_chip nand;
  363. int flash_bank; /* currently selected chip */
  364. int status;
  365. int platform;
  366. struct nand_buf buf;
  367. struct device *dev;
  368. int total_used_banks;
  369. uint32_t block; /* stored for future use */
  370. uint16_t page;
  371. void __iomem *flash_reg; /* Mapped io reg base address */
  372. void __iomem *flash_mem; /* Mapped io reg base address */
  373. /* elements used by ISR */
  374. struct completion complete;
  375. spinlock_t irq_lock;
  376. uint32_t irq_status;
  377. int irq_debug_array[32];
  378. int idx;
  379. uint32_t devnum; /* represent how many nands connected */
  380. uint32_t fwblks; /* represent how many blocks FW used */
  381. uint32_t totalblks;
  382. uint32_t blksperchip;
  383. uint32_t bbtskipbytes;
  384. uint32_t max_banks;
  385. };
  386. #endif /*_LLD_NAND_*/