Lines Matching +full:fail +full:- +full:fast

4  * SPDX-License-Identifier: Apache-2.0
249 return -1; in spi_saf_init()
328 /* Write to volatile status is fast, expect BUSY to be clear */ in spi_saf_init()
395 return -1; in spi_saf_init()
427 limit = pr->start + pr->size - 1U; in pr_check_range()
430 if (regs->SAF_PROT_RG[pr->pr_num].START != (pr->start >> 12)) { in pr_check_range()
431 return -1; in pr_check_range()
434 if (regs->SAF_PROT_RG[pr->pr_num].LIMIT != (limit >> 12)) { in pr_check_range()
435 return -1; in pr_check_range()
443 if (pr->flags & MCHP_SAF_PR_FLAG_ENABLE) { in pr_check_enable()
444 if (regs->SAF_PROT_RG[pr->pr_num].LIMIT > regs->SAF_PROT_RG[pr->pr_num].START) { in pr_check_enable()
448 if (regs->SAF_PROT_RG[pr->pr_num].START > regs->SAF_PROT_RG[pr->pr_num].LIMIT) { in pr_check_enable()
453 return -2; in pr_check_enable()
458 if (pr->flags & MCHP_SAF_PR_FLAG_LOCK) { in pr_check_lock()
459 if (regs->SAF_PROT_LOCK & BIT(pr->pr_num)) { in pr_check_lock()
463 if (!(regs->SAF_PROT_LOCK & BIT(pr->pr_num))) { in pr_check_lock()
468 return -3; in pr_check_lock()
472 * NOTE: bit[0] of bit map registers is read-only = 1
476 if (regs->SAF_PROT_RG[pr->pr_num].WEBM != (pr->master_bm_we | BIT(0))) { in pr_check_master_bm()
477 return -4; in pr_check_master_bm()
480 if (regs->SAF_PROT_RG[pr->pr_num].RDBM != (pr->master_bm_rd | BIT(0))) { in pr_check_master_bm()
481 return -4; in pr_check_master_bm()
500 pr = spr->pregions; in espi_saf_test_pr1()
502 for (size_t n = 0U; n < spr->nregions; n++) { in espi_saf_test_pr1()
505 LOG_INF("SAF Protection region %u range fail", pr->pr_num); in espi_saf_test_pr1()
511 LOG_INF("SAF Protection region %u enable fail", pr->pr_num); in espi_saf_test_pr1()
517 LOG_INF("SAF Protection region %u lock check fail", pr->pr_num); in espi_saf_test_pr1()
523 LOG_INF("SAF Protection region %u Master select fail", pr->pr_num); in espi_saf_test_pr1()
542 return -EINVAL; in saf_read()
567 n -= chunk_len; in saf_read()
586 spi_addr &= ~(4096U - 1U); in saf_erase_block()
590 spi_addr &= ~((32U * 1024U) - 1U); in saf_erase_block()
594 spi_addr &= ~((64U * 1024U) - 1U); in saf_erase_block()
597 return -EINVAL; in saf_erase_block()
604 LOG_INF("espi_saf_test1: erase fail = %d", rc); in saf_erase_block()
620 return -EINVAL; in saf_page_prog()
641 LOG_INF("%s: error = %d: erase fail spi_addr = 0x%X", __func__, rc, in saf_page_prog()
648 n -= chunk_len; in saf_page_prog()
665 spi_addr &= ~(4096U - 1U); in espi_saf_test1()
674 while (!erased && (retries-- > 0)) { in espi_saf_test1()
686 rc = -1; in espi_saf_test1()
712 return -1; in espi_saf_test1()
751 LOG_INF("%s: Read back mismatch: FAIL", __func__); in espi_saf_test1()
891 LOG_INF("eSPI test - callbacks initialization... "); in espi_init()
901 LOG_INF("eSPI test - callbacks registration... "); in espi_init()
923 LOG_ERR("Failed to read %x %d", gpio->pin, level); in wait_for_pin()
924 return -EIO; in wait_for_pin()
928 LOG_DBG("PIN %x = %x", gpio->pin, exp_level); in wait_for_pin()
933 loop_cnt--; in wait_for_pin()
937 LOG_ERR("Timeout for %x %x", gpio->pin, level); in wait_for_pin()
938 return -ETIMEDOUT; in wait_for_pin()
956 return -EIO; in wait_for_vwire()
964 loop_cnt--; in wait_for_vwire()
969 return -ETIMEDOUT; in wait_for_vwire()
984 loop_cnt--; in wait_for_espi_reset()
988 return -ETIMEDOUT; in wait_for_espi_reset()
998 LOG_INF("eSPI test - Handshake with eSPI master..."); in espi_handshake()
1157 LOG_WRN("Fail to retrieve target boot done"); in send_target_bootdone()
1177 LOG_ERR("%s: device not ready.", pwrgd_gpio.port->name); in espi_test()
1178 return -ENODEV; in espi_test()
1181 LOG_ERR("%s: device not ready.", rsm_gpio.port->name); in espi_test()
1182 return -ENODEV; in espi_test()
1186 LOG_ERR("%s: device not ready.", espi_dev->name); in espi_test()
1187 return -ENODEV; in espi_test()
1192 LOG_ERR("%s: device not ready.", qspi_dev->name); in espi_test()
1193 return -ENODEV; in espi_test()
1197 LOG_ERR("%s: device not ready.", espi_saf_dev->name); in espi_test()
1198 return -ENODEV; in espi_test()
1220 return -1; in espi_test()
1230 * Host de-asserts ESPI_RESET#. in espi_test()
1234 LOG_ERR("Unable to configure %d:%s", ret, qspi_dev->name); in espi_test()
1240 LOG_ERR("Unable to configure %d:%s", ret, espi_saf_dev->name); in espi_test()
1304 /* eSPI flash test can fail and rest of operation can continue */ in espi_test()
1322 /* System without host-initiated OOB Rx traffic */ in espi_test()
1325 /* System with host-initiated OOB Rx traffic */ in espi_test()