/Zephyr-Core-3.5.0/drivers/espi/ |
D | espi_handlers.c | 126 struct espi_oob_packet *pckt) in z_vrfy_espi_send_oob() argument 132 Z_OOPS(Z_SYSCALL_MEMORY_READ(pckt->buf, pckt->len)); in z_vrfy_espi_send_oob() 133 Z_OOPS(z_user_from_copy(&pckt_copy, pckt, in z_vrfy_espi_send_oob() 143 struct espi_oob_packet *pckt) in z_vrfy_espi_receive_oob() argument 149 Z_OOPS(z_user_from_copy(&pckt_copy, pckt, in z_vrfy_espi_receive_oob() 151 Z_OOPS(Z_SYSCALL_MEMORY_WRITE(pckt->buf, pckt->len)); in z_vrfy_espi_receive_oob() 154 Z_OOPS(z_user_to_copy(pckt, &pckt_copy, in z_vrfy_espi_receive_oob() 162 struct espi_flash_packet *pckt) in z_vrfy_espi_read_flash() argument 168 Z_OOPS(z_user_from_copy(&pckt_copy, pckt, in z_vrfy_espi_read_flash() 170 Z_OOPS(Z_SYSCALL_MEMORY_WRITE(pckt->buf, pckt->len)); in z_vrfy_espi_read_flash() [all …]
|
D | espi_npcx.c | 751 struct espi_oob_packet *pckt) in espi_npcx_send_oob() argument 754 uint8_t *oob_buf = pckt->buf; in espi_npcx_send_oob() 755 int sz_oob_tx = pckt->len; in espi_npcx_send_oob() 819 struct espi_oob_packet *pckt) in espi_npcx_receive_oob() argument 823 uint8_t *oob_buf = pckt->buf; in espi_npcx_receive_oob() 863 pckt->len = sz_oob_rx; in espi_npcx_receive_oob() 941 struct espi_flash_packet *pckt) in espi_npcx_flash_parse_completion_with_data() argument 961 uint8_t *buf = pckt->buf; in espi_npcx_flash_parse_completion_with_data() 989 struct espi_flash_packet *pckt) in espi_npcx_flash_read() argument 996 if (pckt->len > NPCX_ESPI_FLASH_MAX_RX_PAYLOAD) { in espi_npcx_flash_read() [all …]
|
D | espi_saf_mchp_xec.c | 668 struct espi_saf_packet *pckt, uint8_t cmd) in saf_ecp_access() argument 693 rc = check_ecp_access_size(pckt->len); in saf_ecp_access() 700 memcpy(slave_mem, pckt->buf, pckt->len); in saf_ecp_access() 703 n = pckt->len; in saf_ecp_access() 705 n = get_erase_size_encoding(pckt->len); in saf_ecp_access() 729 regs->SAF_ECP_FLAR = pckt->flash_addr; in saf_ecp_access() 762 memcpy(pckt->buf, slave_mem, pckt->len); in saf_ecp_access() 773 struct espi_saf_packet *pckt) in saf_xec_flash_read() argument 776 return saf_ecp_access(dev, pckt, MCHP_SAF_ECP_CMD_CTYPE_READ0); in saf_xec_flash_read() 781 struct espi_saf_packet *pckt) in saf_xec_flash_write() argument [all …]
|
D | espi_mchp_xec.c | 501 struct espi_oob_packet *pckt) in espi_xec_send_oob() argument 521 if (pckt->len > CONFIG_ESPI_OOB_BUFFER_SIZE) { in espi_xec_send_oob() 526 memcpy(target_tx_mem, pckt->buf, pckt->len); in espi_xec_send_oob() 528 ESPI_OOB_REGS->TX_LEN = pckt->len; in espi_xec_send_oob() 548 struct espi_oob_packet *pckt) in espi_xec_receive_oob() argument 570 if (rcvd_len > pckt->len) { in espi_xec_receive_oob() 571 LOG_ERR("space rcvd %d vs %d", rcvd_len, pckt->len); in espi_xec_receive_oob() 575 pckt->len = rcvd_len; in espi_xec_receive_oob() 576 memcpy(pckt->buf, target_rx_mem, pckt->len); in espi_xec_receive_oob() 577 memset(target_rx_mem, 0, pckt->len); in espi_xec_receive_oob() [all …]
|
D | espi_mchp_xec_v2.c | 374 struct espi_oob_packet *pckt) in espi_xec_send_oob() argument 395 if (pckt->len > CONFIG_ESPI_OOB_BUFFER_SIZE) { in espi_xec_send_oob() 400 memcpy(target_tx_mem, pckt->buf, pckt->len); in espi_xec_send_oob() 402 regs->OOBTXL = pckt->len; in espi_xec_send_oob() 422 struct espi_oob_packet *pckt) in espi_xec_receive_oob() argument 445 if (rcvd_len > pckt->len) { in espi_xec_receive_oob() 446 LOG_ERR("space rcvd %d vs %d", rcvd_len, pckt->len); in espi_xec_receive_oob() 450 pckt->len = rcvd_len; in espi_xec_receive_oob() 451 memcpy(pckt->buf, target_rx_mem, pckt->len); in espi_xec_receive_oob() 452 memset(target_rx_mem, 0, pckt->len); in espi_xec_receive_oob() [all …]
|
D | espi_saf_mchp_xec_v2.c | 844 struct espi_saf_packet *pckt, uint8_t cmd) in saf_ecp_access() argument 872 rc = check_ecp_access_size(pckt->len); in saf_ecp_access() 879 memcpy(slave_mem, pckt->buf, pckt->len); in saf_ecp_access() 882 n = pckt->len; in saf_ecp_access() 885 n = get_erase_size_encoding(dev, pckt->len); in saf_ecp_access() 893 rc = check_ecp_access_size(pckt->len); in saf_ecp_access() 902 n = pckt->len; in saf_ecp_access() 906 rc = check_ecp_access_size(pckt->len); in saf_ecp_access() 915 n = pckt->len; in saf_ecp_access() 930 regs->SAF_ECP_FLAR = pckt->flash_addr; in saf_ecp_access() [all …]
|
D | espi_it8xxx2.c | 943 struct espi_oob_packet *pckt) in espi_it8xxx2_send_oob() argument 951 (struct espi_oob_msg_packet *)pckt->buf; in espi_it8xxx2_send_oob() 963 if (pckt->len > ESPI_IT8XXX2_OOB_MAX_PAYLOAD_SIZE) { in espi_it8xxx2_send_oob() 971 slave_reg->ESUCTRL2 = ESPI_TAG_LEN_FIELD(0, pckt->len); in espi_it8xxx2_send_oob() 973 slave_reg->ESUCTRL3 = pckt->len & 0xff; in espi_it8xxx2_send_oob() 976 for (int i = 0; i < pckt->len; i++) { in espi_it8xxx2_send_oob() 989 struct espi_oob_packet *pckt) in espi_it8xxx2_receive_oob() argument 997 (struct espi_oob_msg_packet *)pckt->buf; in espi_it8xxx2_receive_oob() 1023 if (oob_len > pckt->len) { in espi_it8xxx2_receive_oob() 1025 oob_len, pckt->len); in espi_it8xxx2_receive_oob() [all …]
|
/Zephyr-Core-3.5.0/include/zephyr/drivers/ |
D | espi_saf.h | 143 struct espi_saf_packet *pckt); 145 struct espi_saf_packet *pckt); 147 struct espi_saf_packet *pckt); 313 struct espi_saf_packet *pckt); 316 struct espi_saf_packet *pckt) in z_impl_espi_saf_flash_read() argument 325 return api->flash_read(dev, pckt); in z_impl_espi_saf_flash_read() 342 struct espi_saf_packet *pckt); 345 struct espi_saf_packet *pckt) in z_impl_espi_saf_flash_write() argument 354 return api->flash_write(dev, pckt); in z_impl_espi_saf_flash_write() 371 struct espi_saf_packet *pckt); [all …]
|
D | espi.h | 443 struct espi_oob_packet *pckt); 445 struct espi_oob_packet *pckt); 448 struct espi_flash_packet *pckt); 450 struct espi_flash_packet *pckt); 452 struct espi_flash_packet *pckt); 754 struct espi_oob_packet *pckt); 757 struct espi_oob_packet *pckt) in z_impl_espi_send_oob() argument 766 return api->send_oob(dev, pckt); in z_impl_espi_send_oob() 781 struct espi_oob_packet *pckt); 784 struct espi_oob_packet *pckt) in z_impl_espi_receive_oob() argument [all …]
|
/Zephyr-Core-3.5.0/samples/drivers/espi/src/ |
D | main.c | 1096 struct espi_flash_packet pckt; in read_test_block() local 1099 pckt.buf = buf; in read_test_block() 1100 pckt.flash_addr = flash_addr; in read_test_block() 1101 pckt.len = MAX_FLASH_REQUEST; in read_test_block() 1103 ret = espi_read_flash(espi_dev, &pckt); in read_test_block() 1123 struct espi_flash_packet pckt; in write_test_block() local 1127 pckt.buf = buf; in write_test_block() 1128 pckt.flash_addr = flash_addr; in write_test_block() 1129 pckt.len = MAX_FLASH_REQUEST; in write_test_block() 1131 ret = espi_write_flash(espi_dev, &pckt); in write_test_block()
|