Lines Matching refs:status
227 int status = 0; in cad_qspi_device_bank_select() local
229 status = cad_qspi_stig_cmd(CAD_QSPI_STIG_OPCODE_WREN, 0); in cad_qspi_device_bank_select()
230 if (status != 0) in cad_qspi_device_bank_select()
231 return status; in cad_qspi_device_bank_select()
233 status = cad_qspi_stig_wr_cmd(CAD_QSPI_STIG_OPCODE_WREN_EXT_REG, in cad_qspi_device_bank_select()
235 if (status != 0) in cad_qspi_device_bank_select()
236 return status; in cad_qspi_device_bank_select()
241 int cad_qspi_device_status(uint32_t *status) in cad_qspi_device_status() argument
243 return cad_qspi_stig_read_cmd(CAD_QSPI_STIG_OPCODE_RDSR, 0, 1, status); in cad_qspi_device_status()
259 uint32_t status, flag_sr; in cad_qspi_n25q_wait_for_program_and_erase() local
263 status = cad_qspi_device_status(&status); in cad_qspi_n25q_wait_for_program_and_erase()
264 if (status != 0) { in cad_qspi_n25q_wait_for_program_and_erase()
268 if (!CAD_QSPI_STIG_SR_BUSY(status)) in cad_qspi_n25q_wait_for_program_and_erase()
281 status = cad_qspi_stig_read_cmd(CAD_QSPI_STIG_OPCODE_RDFLGSR, in cad_qspi_n25q_wait_for_program_and_erase()
283 if (status != 0) { in cad_qspi_n25q_wait_for_program_and_erase()
285 return status; in cad_qspi_n25q_wait_for_program_and_erase()
346 int status; in cad_qspi_enable() local
351 status = cad_qspi_n25q_enable(); in cad_qspi_enable()
352 if (status != 0) in cad_qspi_enable()
353 return status; in cad_qspi_enable()
360 int status = 0; in cad_qspi_enable_subsector_bank() local
362 status = cad_qspi_stig_cmd(CAD_QSPI_STIG_OPCODE_WREN, 0); in cad_qspi_enable_subsector_bank()
363 if (status != 0) in cad_qspi_enable_subsector_bank()
364 return status; in cad_qspi_enable_subsector_bank()
366 status = cad_qspi_stig_addr_cmd(CAD_QSPI_STIG_OPCODE_SUBSEC_ERASE, 0, in cad_qspi_enable_subsector_bank()
368 if (status != 0) in cad_qspi_enable_subsector_bank()
369 return status; in cad_qspi_enable_subsector_bank()
372 status = cad_qspi_n25q_wait_for_program_and_erase(0); in cad_qspi_enable_subsector_bank()
374 return status; in cad_qspi_enable_subsector_bank()
379 int status = 0; in cad_qspi_erase_subsector() local
381 status = cad_qspi_device_bank_select(addr >> 24); in cad_qspi_erase_subsector()
382 if (status != 0) in cad_qspi_erase_subsector()
383 return status; in cad_qspi_erase_subsector()
390 int status = 0; in cad_qspi_erase_sector() local
392 status = cad_qspi_device_bank_select(addr >> 24); in cad_qspi_erase_sector()
393 if (status != 0) in cad_qspi_erase_sector()
394 return status; in cad_qspi_erase_sector()
396 status = cad_qspi_stig_cmd(CAD_QSPI_STIG_OPCODE_WREN, 0); in cad_qspi_erase_sector()
397 if (status != 0) in cad_qspi_erase_sector()
398 return status; in cad_qspi_erase_sector()
400 status = cad_qspi_stig_addr_cmd(CAD_QSPI_STIG_OPCODE_SEC_ERASE, 0, in cad_qspi_erase_sector()
402 if (status != 0) in cad_qspi_erase_sector()
403 return status; in cad_qspi_erase_sector()
406 status = cad_qspi_n25q_wait_for_program_and_erase(0); in cad_qspi_erase_sector()
408 return status; in cad_qspi_erase_sector()
413 int status; in cad_qspi_calibration() local
427 status = cad_qspi_set_baudrate_div(0xf); in cad_qspi_calibration()
429 status = cad_qspi_stig_read_cmd(CAD_QSPI_STIG_OPCODE_RDID, in cad_qspi_calibration()
431 if (status != 0) in cad_qspi_calibration()
443 status = cad_qspi_set_baudrate_div(div_bits); in cad_qspi_calibration()
444 if (status != 0) in cad_qspi_calibration()
452 if (status != 0) in cad_qspi_calibration()
454 status = cad_qspi_stig_read_cmd(CAD_QSPI_STIG_OPCODE_RDID, 0, in cad_qspi_calibration()
456 if (status != 0) in cad_qspi_calibration()
482 status = cad_qspi_stig_read_cmd(CAD_QSPI_STIG_OPCODE_RDID, 0, 3, &rdid); in cad_qspi_calibration()
484 if (status != 0) in cad_qspi_calibration()
509 int status = 0; in cad_qspi_init() local
522 status = cad_qspi_timing_config(clk_phase, clk_pol, csda, csdads, in cad_qspi_init()
525 if (status != 0) { in cad_qspi_init()
527 return status; in cad_qspi_init()
533 status = cad_qspi_int_disable(CAD_QSPI_INT_STATUS_ALL); in cad_qspi_init()
534 if (status != 0) { in cad_qspi_init()
536 return status; in cad_qspi_init()
540 status = cad_qspi_enable(); in cad_qspi_init()
541 if (status != 0) { in cad_qspi_init()
543 return status; in cad_qspi_init()
549 status = cad_qspi_stig_read_cmd(CAD_QSPI_STIG_OPCODE_RDID, 0, 3, in cad_qspi_init()
552 if (status != 0) { in cad_qspi_init()
554 return status; in cad_qspi_init()
598 return status; in cad_qspi_init()
604 int status = 0, i; in cad_qspi_indirect_page_bound_write() local
608 status = cad_qspi_indirect_write_start_bank(offset, len); in cad_qspi_indirect_page_bound_write()
609 if (status != 0) in cad_qspi_indirect_page_bound_write()
610 return status; in cad_qspi_indirect_page_bound_write()
635 int status; in cad_qspi_read_bank() local
639 status = cad_qspi_indirect_read_start_bank(offset, size); in cad_qspi_read_bank()
641 if (status != 0) in cad_qspi_read_bank()
642 return status; in cad_qspi_read_bank()
663 int status = 0; in cad_qspi_write_bank() local
668 status = cad_qspi_indirect_page_bound_write(offset, buffer, in cad_qspi_write_bank()
670 if (status != 0) in cad_qspi_write_bank()
678 return status; in cad_qspi_write_bank()
685 int i, status; in cad_qspi_read() local
687 status = 0; in cad_qspi_read()
719 status = cad_qspi_device_bank_select(CAD_QSPI_BANK_ADDR( in cad_qspi_read()
721 if (status != 0) in cad_qspi_read()
723 status = cad_qspi_read_bank(read_data, bank_offset, copy_len); in cad_qspi_read()
724 if (status != 0) in cad_qspi_read()
734 return status; in cad_qspi_read()
739 int status = 0; in cad_qspi_erase() local
745 status = cad_qspi_erase_subsector(offset); in cad_qspi_erase()
746 if (status != 0) in cad_qspi_erase()
753 return status; in cad_qspi_erase()
758 int status, i; in cad_qspi_write() local
762 status = 0; in cad_qspi_write()
786 status = cad_qspi_device_bank_select( in cad_qspi_write()
788 if (status != 0) in cad_qspi_write()
791 status = cad_qspi_write_bank(bank_offset, write_data, in cad_qspi_write()
793 if (status != 0) in cad_qspi_write()
803 return status; in cad_qspi_write()
808 int status = 0; in cad_qspi_update() local
810 status = cad_qspi_erase(offset, size); in cad_qspi_update()
811 if (status != 0) in cad_qspi_update()
812 return status; in cad_qspi_update()