Lines Matching refs:status

262 	int status = 0;  in cad_qspi_device_bank_select()  local
269 status = cad_qspi_stig_cmd(cad_params, CAD_QSPI_STIG_OPCODE_WREN, 0); in cad_qspi_device_bank_select()
271 if (status != 0) { in cad_qspi_device_bank_select()
272 return status; in cad_qspi_device_bank_select()
275 status = cad_qspi_stig_wr_cmd(cad_params, CAD_QSPI_STIG_OPCODE_WREN_EXT_REG, 0, 1, &bank); in cad_qspi_device_bank_select()
277 if (status != 0) { in cad_qspi_device_bank_select()
278 return status; in cad_qspi_device_bank_select()
284 int cad_qspi_device_status(struct cad_qspi_params *cad_params, uint32_t *status) in cad_qspi_device_status() argument
286 return cad_qspi_stig_read_cmd(cad_params, CAD_QSPI_STIG_OPCODE_RDSR, 0, 1, status); in cad_qspi_device_status()
301 uint32_t status, flag_sr; in cad_qspi_n25q_wait_for_program_and_erase() local
305 status = cad_qspi_device_status(cad_params, &status); in cad_qspi_n25q_wait_for_program_and_erase()
306 if (status != 0) { in cad_qspi_n25q_wait_for_program_and_erase()
310 if (!CAD_QSPI_STIG_SR_BUSY(status)) { in cad_qspi_n25q_wait_for_program_and_erase()
324 status = cad_qspi_stig_read_cmd(cad_params, CAD_QSPI_STIG_OPCODE_RDFLGSR, 0, 1, in cad_qspi_n25q_wait_for_program_and_erase()
326 if (status != 0) { in cad_qspi_n25q_wait_for_program_and_erase()
328 return status; in cad_qspi_n25q_wait_for_program_and_erase()
401 int status; in cad_qspi_enable() local
411 status = cad_qspi_n25q_enable(cad_params); in cad_qspi_enable()
412 if (status != 0) { in cad_qspi_enable()
413 return status; in cad_qspi_enable()
421 int status = 0; in cad_qspi_enable_subsector_bank() local
428 status = cad_qspi_stig_cmd(cad_params, CAD_QSPI_STIG_OPCODE_WREN, 0); in cad_qspi_enable_subsector_bank()
430 if (status != 0) { in cad_qspi_enable_subsector_bank()
431 return status; in cad_qspi_enable_subsector_bank()
434 status = cad_qspi_stig_addr_cmd(cad_params, CAD_QSPI_STIG_OPCODE_SUBSEC_ERASE, 0, addr); in cad_qspi_enable_subsector_bank()
435 if (status != 0) { in cad_qspi_enable_subsector_bank()
436 return status; in cad_qspi_enable_subsector_bank()
440 status = cad_qspi_n25q_wait_for_program_and_erase(cad_params, 0); in cad_qspi_enable_subsector_bank()
442 return status; in cad_qspi_enable_subsector_bank()
447 int status = 0; in cad_qspi_erase_subsector() local
454 status = cad_qspi_device_bank_select(cad_params, addr >> 24); in cad_qspi_erase_subsector()
455 if (status != 0) { in cad_qspi_erase_subsector()
456 return status; in cad_qspi_erase_subsector()
464 int status = 0; in cad_qspi_erase_sector() local
471 status = cad_qspi_device_bank_select(cad_params, addr >> 24); in cad_qspi_erase_sector()
473 if (status != 0) { in cad_qspi_erase_sector()
474 return status; in cad_qspi_erase_sector()
477 status = cad_qspi_stig_cmd(cad_params, CAD_QSPI_STIG_OPCODE_WREN, 0); in cad_qspi_erase_sector()
479 if (status != 0) { in cad_qspi_erase_sector()
480 return status; in cad_qspi_erase_sector()
483 status = cad_qspi_stig_addr_cmd(cad_params, CAD_QSPI_STIG_OPCODE_SEC_ERASE, 0, addr); in cad_qspi_erase_sector()
484 if (status != 0) { in cad_qspi_erase_sector()
485 return status; in cad_qspi_erase_sector()
489 status = cad_qspi_n25q_wait_for_program_and_erase(cad_params, 0); in cad_qspi_erase_sector()
491 return status; in cad_qspi_erase_sector()
497 int status; in cad_qspi_calibration() local
515 status = cad_qspi_set_baudrate_div(cad_params, 0xf); in cad_qspi_calibration()
517 status = cad_qspi_stig_read_cmd(cad_params, CAD_QSPI_STIG_OPCODE_RDID, 0, 3, &sample_rdid); in cad_qspi_calibration()
518 if (status != 0) { in cad_qspi_calibration()
531 status = cad_qspi_set_baudrate_div(cad_params, div_bits); in cad_qspi_calibration()
533 if (status != 0) { in cad_qspi_calibration()
542 if (status != 0) { in cad_qspi_calibration()
546 status = cad_qspi_stig_read_cmd(cad_params, CAD_QSPI_STIG_OPCODE_RDID, 0, 3, &rdid); in cad_qspi_calibration()
547 if (status != 0) { in cad_qspi_calibration()
574 status = cad_qspi_stig_read_cmd(cad_params, CAD_QSPI_STIG_OPCODE_RDID, 0, 3, &rdid); in cad_qspi_calibration()
576 if (status != 0) { in cad_qspi_calibration()
614 int status = 0; in cad_qspi_init() local
629 status = cad_qspi_timing_config(cad_params, clk_phase, clk_pol, csda, csdads, cseot, cssot, in cad_qspi_init()
632 if (status != 0) { in cad_qspi_init()
634 return status; in cad_qspi_init()
639 status = cad_qspi_int_disable(cad_params, CAD_QSPI_INT_STATUS_ALL); in cad_qspi_init()
640 if (status != 0) { in cad_qspi_init()
642 return status; in cad_qspi_init()
646 status = cad_qspi_enable(cad_params); in cad_qspi_init()
647 if (status != 0) { in cad_qspi_init()
649 return status; in cad_qspi_init()
655 status = cad_qspi_stig_read_cmd(cad_params, CAD_QSPI_STIG_OPCODE_RDID, 0, 3, &rdid); in cad_qspi_init()
657 if (status != 0) { in cad_qspi_init()
659 return status; in cad_qspi_init()
701 return status; in cad_qspi_init()
707 int status = 0, i; in cad_qspi_indirect_page_bound_write() local
715 status = cad_qspi_indirect_write_start_bank(cad_params, offset, len); in cad_qspi_indirect_page_bound_write()
717 if (status != 0) { in cad_qspi_indirect_page_bound_write()
718 return status; in cad_qspi_indirect_page_bound_write()
744 int status; in cad_qspi_read_bank() local
753 status = cad_qspi_indirect_read_start_bank(cad_params, offset, size); in cad_qspi_read_bank()
755 if (status != 0) { in cad_qspi_read_bank()
756 return status; in cad_qspi_read_bank()
779 int status = 0; in cad_qspi_write_bank() local
789 status = cad_qspi_indirect_page_bound_write(cad_params, offset, buffer, write_size); in cad_qspi_write_bank()
790 if (status != 0) { in cad_qspi_write_bank()
799 return status; in cad_qspi_write_bank()
806 int i, status; in cad_qspi_read() local
808 status = 0; in cad_qspi_read()
842 status = cad_qspi_device_bank_select(cad_params, CAD_QSPI_BANK_ADDR(bank_addr)); in cad_qspi_read()
843 if (status != 0) { in cad_qspi_read()
847 status = cad_qspi_read_bank(cad_params, read_data, bank_offset, copy_len); in cad_qspi_read()
849 if (status != 0) { in cad_qspi_read()
860 return status; in cad_qspi_read()
865 int status = 0; in cad_qspi_erase() local
875 status = cad_qspi_erase_subsector(cad_params, offset); in cad_qspi_erase()
877 if (status != 0) { in cad_qspi_erase()
885 return status; in cad_qspi_erase()
890 int status, i; in cad_qspi_write() local
894 status = 0; in cad_qspi_write()
920 status = cad_qspi_device_bank_select(cad_params, CAD_QSPI_BANK_ADDR(bank_addr)); in cad_qspi_write()
922 if (status != 0) { in cad_qspi_write()
926 status = cad_qspi_write_bank(cad_params, bank_offset, write_data, copy_len); in cad_qspi_write()
927 if (status != 0) { in cad_qspi_write()
938 return status; in cad_qspi_write()
944 int status = 0; in cad_qspi_update() local
951 status = cad_qspi_erase(cad_params, offset, size); in cad_qspi_update()
953 if (status != 0) { in cad_qspi_update()
954 return status; in cad_qspi_update()