@@ -237,6 +237,10 @@ class SPINANDBlockDevice : public mbed::BlockDevice {
237
237
*/
238
238
virtual const char *get_type () const ;
239
239
240
+ virtual bool is_bad_block (uint16_t blk_idx);
241
+
242
+ virtual int mark_bad_block (uint16_t blk_idx);
243
+
240
244
private:
241
245
/* *******************************/
242
246
/* Different Device Csel Mgmt */
@@ -258,6 +262,9 @@ class SPINANDBlockDevice : public mbed::BlockDevice {
258
262
// Send Read command to Driver
259
263
qspi_status_t _qspi_send_read_command (mbed::qspi_inst_t read_instruction, void *buffer, mbed::bd_addr_t addr, mbed::bd_size_t size);
260
264
265
+ // Send Continuous Read command to Driver
266
+ qspi_status_t _qspi_send_continuous_read_command (mbed::qspi_inst_t read_instruction, void *buffer, mbed::bd_addr_t addr, mbed::bd_size_t size);
267
+
261
268
// Send Erase Instruction using command_transfer command to Driver
262
269
qspi_status_t _qspi_send_erase_command (mbed::qspi_inst_t erase_instruction, mbed::bd_addr_t addr, mbed::bd_size_t size);
263
270
@@ -275,6 +282,10 @@ class SPINANDBlockDevice : public mbed::BlockDevice {
275
282
// Read OTP ONFI parameters
276
283
bool _read_otp_onfi ();
277
284
285
+ int _read_oob (void *buffer, bd_addr_t addr, bd_size_t size);
286
+
287
+ int _program_oob (const void *buffer, bd_addr_t addr, bd_size_t size);
288
+
278
289
// Quad Enable in Security Register
279
290
int _set_quad_enable ();
280
291
@@ -284,8 +295,15 @@ class SPINANDBlockDevice : public mbed::BlockDevice {
284
295
// Configure Write Enable in Status Register
285
296
int _set_write_enable ();
286
297
298
+ int _set_conti_read_enable ();
299
+
300
+ int _set_conti_read_disable ();
301
+
302
+ int _conti_read_exit ();
303
+
287
304
// Wait on status register until write not-in-progress
288
305
bool _is_mem_ready ();
306
+
289
307
void _bch_init (uint8_t ecc_bits);
290
308
void _bch_free ();
291
309
int _bch_calculate_ecc (unsigned char *buf, unsigned char *code);
@@ -335,6 +353,7 @@ class SPINANDBlockDevice : public mbed::BlockDevice {
335
353
uint8_t *_ecc_calc;
336
354
uint8_t *_ecc_code;
337
355
uint8_t *_page_buf;
356
+ uint8_t _continuous_read;
338
357
339
358
struct nand_bch_control {
340
359
struct bch_control *bch;
0 commit comments