Lines Matching refs:ret
106 int ret; in ti_sci_get_response() local
110 ret = ti_sci_transport_recv(chan, msg); in ti_sci_get_response()
111 if (ret) { in ti_sci_get_response()
112 ERROR("Message receive failed (%d)\n", ret); in ti_sci_get_response()
113 return ret; in ti_sci_get_response()
156 int ret; in ti_sci_do_xfer() local
161 ret = ti_sci_transport_clear_rx_thread(RX_SECURE_TRANSPORT_CHANNEL_ID); in ti_sci_do_xfer()
162 if (ret) { in ti_sci_do_xfer()
163 ERROR("Could not clear response queue (%d)\n", ret); in ti_sci_do_xfer()
168 ret = ti_sci_transport_send(TX_SECURE_TRANSPORT_CHANNEL_ID, tx_msg); in ti_sci_do_xfer()
169 if (ret) { in ti_sci_do_xfer()
170 ERROR("Message sending failed (%d)\n", ret); in ti_sci_do_xfer()
176 ret = ti_sci_get_response(rx_msg, RX_SECURE_TRANSPORT_CHANNEL_ID); in ti_sci_do_xfer()
177 if (ret != 0U) { in ti_sci_do_xfer()
178 ERROR("Failed to get response (%d)\n", ret); in ti_sci_do_xfer()
186 return ret; in ti_sci_do_xfer()
203 int ret; in ti_sci_get_revision() local
205 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_VERSION, 0x0, in ti_sci_get_revision()
209 if (ret) { in ti_sci_get_revision()
210 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_get_revision()
211 return ret; in ti_sci_get_revision()
214 ret = ti_sci_do_xfer(&xfer); in ti_sci_get_revision()
215 if (ret) { in ti_sci_get_revision()
216 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_get_revision()
217 return ret; in ti_sci_get_revision()
244 int ret; in ti_sci_query_fw_caps() local
246 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_QUERY_FW_CAPS, 0, in ti_sci_query_fw_caps()
250 if (ret != 0U) { in ti_sci_query_fw_caps()
251 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_query_fw_caps()
252 return ret; in ti_sci_query_fw_caps()
255 ret = ti_sci_do_xfer(&xfer); in ti_sci_query_fw_caps()
256 if (ret != 0U) { in ti_sci_query_fw_caps()
257 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_query_fw_caps()
258 return ret; in ti_sci_query_fw_caps()
282 int ret; in ti_sci_device_set_state() local
284 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_SET_DEVICE_STATE, flags, in ti_sci_device_set_state()
288 if (ret) { in ti_sci_device_set_state()
289 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_device_set_state()
290 return ret; in ti_sci_device_set_state()
296 ret = ti_sci_do_xfer(&xfer); in ti_sci_device_set_state()
297 if (ret) { in ti_sci_device_set_state()
298 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_device_set_state()
299 return ret; in ti_sci_device_set_state()
324 int ret; in ti_sci_device_get_state() local
329 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_GET_DEVICE_STATE, 0, in ti_sci_device_get_state()
333 if (ret) { in ti_sci_device_get_state()
334 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_device_get_state()
335 return ret; in ti_sci_device_get_state()
340 ret = ti_sci_do_xfer(&xfer); in ti_sci_device_get_state()
341 if (ret) { in ti_sci_device_get_state()
342 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_device_get_state()
343 return ret; in ti_sci_device_get_state()
468 int ret; in ti_sci_device_put_no_wait() local
470 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_SET_DEVICE_STATE, 0, in ti_sci_device_put_no_wait()
474 if (ret != 0U) { in ti_sci_device_put_no_wait()
475 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_device_put_no_wait()
476 return ret; in ti_sci_device_put_no_wait()
482 ret = ti_sci_do_xfer(&xfer); in ti_sci_device_put_no_wait()
483 if (ret != 0U) { in ti_sci_device_put_no_wait()
484 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_device_put_no_wait()
485 return ret; in ti_sci_device_put_no_wait()
530 int ret; in ti_sci_device_is_idle() local
536 ret = ti_sci_device_get_state(id, NULL, NULL, &state, NULL); in ti_sci_device_is_idle()
537 if (ret) in ti_sci_device_is_idle()
538 return ret; in ti_sci_device_is_idle()
556 int ret; in ti_sci_device_is_stop() local
562 ret = ti_sci_device_get_state(id, NULL, NULL, &p_state, &c_state); in ti_sci_device_is_stop()
563 if (ret) in ti_sci_device_is_stop()
564 return ret; in ti_sci_device_is_stop()
585 int ret; in ti_sci_device_is_on() local
591 ret = in ti_sci_device_is_on()
593 if (ret) in ti_sci_device_is_on()
594 return ret; in ti_sci_device_is_on()
614 int ret; in ti_sci_device_is_trans() local
620 ret = ti_sci_device_get_state(id, NULL, NULL, NULL, &state); in ti_sci_device_is_trans()
621 if (ret) in ti_sci_device_is_trans()
622 return ret; in ti_sci_device_is_trans()
643 int ret; in ti_sci_device_set_resets() local
645 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_SET_DEVICE_RESETS, 0, in ti_sci_device_set_resets()
649 if (ret) { in ti_sci_device_set_resets()
650 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_device_set_resets()
651 return ret; in ti_sci_device_set_resets()
657 ret = ti_sci_do_xfer(&xfer); in ti_sci_device_set_resets()
658 if (ret) { in ti_sci_device_set_resets()
659 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_device_set_resets()
660 return ret; in ti_sci_device_set_resets()
698 int ret; in ti_sci_clock_set_state() local
700 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_SET_CLOCK_STATE, flags, in ti_sci_clock_set_state()
704 if (ret) { in ti_sci_clock_set_state()
705 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_clock_set_state()
706 return ret; in ti_sci_clock_set_state()
713 ret = ti_sci_do_xfer(&xfer); in ti_sci_clock_set_state()
714 if (ret) { in ti_sci_clock_set_state()
715 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_clock_set_state()
716 return ret; in ti_sci_clock_set_state()
742 int ret; in ti_sci_clock_get_state() local
747 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_GET_CLOCK_STATE, 0, in ti_sci_clock_get_state()
751 if (ret) { in ti_sci_clock_get_state()
752 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_clock_get_state()
753 return ret; in ti_sci_clock_get_state()
759 ret = ti_sci_do_xfer(&xfer); in ti_sci_clock_get_state()
760 if (ret) { in ti_sci_clock_get_state()
761 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_clock_get_state()
762 return ret; in ti_sci_clock_get_state()
850 int ret; in ti_sci_clock_is_auto() local
855 ret = ti_sci_clock_get_state(dev_id, clk_id, &state, NULL); in ti_sci_clock_is_auto()
856 if (ret) in ti_sci_clock_is_auto()
857 return ret; in ti_sci_clock_is_auto()
880 int ret; in ti_sci_clock_is_on() local
885 ret = ti_sci_clock_get_state(dev_id, clk_id, &r_state, &c_state); in ti_sci_clock_is_on()
886 if (ret) in ti_sci_clock_is_on()
887 return ret; in ti_sci_clock_is_on()
913 int ret; in ti_sci_clock_is_off() local
918 ret = ti_sci_clock_get_state(dev_id, clk_id, &r_state, &c_state); in ti_sci_clock_is_off()
919 if (ret) in ti_sci_clock_is_off()
920 return ret; in ti_sci_clock_is_off()
947 int ret; in ti_sci_clock_set_parent() local
949 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_SET_CLOCK_PARENT, 0, in ti_sci_clock_set_parent()
953 if (ret) { in ti_sci_clock_set_parent()
954 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_clock_set_parent()
955 return ret; in ti_sci_clock_set_parent()
962 ret = ti_sci_do_xfer(&xfer); in ti_sci_clock_set_parent()
963 if (ret) { in ti_sci_clock_set_parent()
964 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_clock_set_parent()
965 return ret; in ti_sci_clock_set_parent()
988 int ret; in ti_sci_clock_get_parent() local
990 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_GET_CLOCK_PARENT, 0, in ti_sci_clock_get_parent()
994 if (ret) { in ti_sci_clock_get_parent()
995 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_clock_get_parent()
996 return ret; in ti_sci_clock_get_parent()
1002 ret = ti_sci_do_xfer(&xfer); in ti_sci_clock_get_parent()
1003 if (ret) { in ti_sci_clock_get_parent()
1004 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_clock_get_parent()
1005 return ret; in ti_sci_clock_get_parent()
1031 int ret; in ti_sci_clock_get_num_parents() local
1033 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_GET_NUM_CLOCK_PARENTS, 0, in ti_sci_clock_get_num_parents()
1037 if (ret) { in ti_sci_clock_get_num_parents()
1038 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_clock_get_num_parents()
1039 return ret; in ti_sci_clock_get_num_parents()
1045 ret = ti_sci_do_xfer(&xfer); in ti_sci_clock_get_num_parents()
1046 if (ret) { in ti_sci_clock_get_num_parents()
1047 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_clock_get_num_parents()
1048 return ret; in ti_sci_clock_get_num_parents()
1083 int ret; in ti_sci_clock_get_match_freq() local
1085 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_QUERY_CLOCK_FREQ, 0, in ti_sci_clock_get_match_freq()
1089 if (ret) { in ti_sci_clock_get_match_freq()
1090 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_clock_get_match_freq()
1091 return ret; in ti_sci_clock_get_match_freq()
1100 ret = ti_sci_do_xfer(&xfer); in ti_sci_clock_get_match_freq()
1101 if (ret) { in ti_sci_clock_get_match_freq()
1102 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_clock_get_match_freq()
1103 return ret; in ti_sci_clock_get_match_freq()
1136 int ret; in ti_sci_clock_set_freq() local
1138 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_SET_CLOCK_FREQ, 0, in ti_sci_clock_set_freq()
1142 if (ret) { in ti_sci_clock_set_freq()
1143 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_clock_set_freq()
1144 return ret; in ti_sci_clock_set_freq()
1152 ret = ti_sci_do_xfer(&xfer); in ti_sci_clock_set_freq()
1153 if (ret) { in ti_sci_clock_set_freq()
1154 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_clock_set_freq()
1155 return ret; in ti_sci_clock_set_freq()
1178 int ret; in ti_sci_clock_get_freq() local
1180 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_GET_CLOCK_FREQ, 0, in ti_sci_clock_get_freq()
1184 if (ret) { in ti_sci_clock_get_freq()
1185 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_clock_get_freq()
1186 return ret; in ti_sci_clock_get_freq()
1192 ret = ti_sci_do_xfer(&xfer); in ti_sci_clock_get_freq()
1193 if (ret) { in ti_sci_clock_get_freq()
1194 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_clock_get_freq()
1195 return ret; in ti_sci_clock_get_freq()
1214 int ret; in ti_sci_core_reboot() local
1216 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_SYS_RESET, 0, in ti_sci_core_reboot()
1220 if (ret) { in ti_sci_core_reboot()
1221 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_core_reboot()
1222 return ret; in ti_sci_core_reboot()
1226 ret = ti_sci_do_xfer(&xfer); in ti_sci_core_reboot()
1227 if (ret) { in ti_sci_core_reboot()
1228 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_core_reboot()
1229 return ret; in ti_sci_core_reboot()
1248 int ret; in ti_sci_proc_request() local
1250 ret = ti_sci_setup_one_xfer(TISCI_MSG_PROC_REQUEST, 0, in ti_sci_proc_request()
1254 if (ret) { in ti_sci_proc_request()
1255 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_proc_request()
1256 return ret; in ti_sci_proc_request()
1261 ret = ti_sci_do_xfer(&xfer); in ti_sci_proc_request()
1262 if (ret) { in ti_sci_proc_request()
1263 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_proc_request()
1264 return ret; in ti_sci_proc_request()
1283 int ret; in ti_sci_proc_release() local
1285 ret = ti_sci_setup_one_xfer(TISCI_MSG_PROC_RELEASE, 0, in ti_sci_proc_release()
1289 if (ret) { in ti_sci_proc_release()
1290 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_proc_release()
1291 return ret; in ti_sci_proc_release()
1296 ret = ti_sci_do_xfer(&xfer); in ti_sci_proc_release()
1297 if (ret) { in ti_sci_proc_release()
1298 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_proc_release()
1299 return ret; in ti_sci_proc_release()
1320 int ret; in ti_sci_proc_handover() local
1322 ret = ti_sci_setup_one_xfer(TISCI_MSG_PROC_HANDOVER, 0, in ti_sci_proc_handover()
1326 if (ret) { in ti_sci_proc_handover()
1327 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_proc_handover()
1328 return ret; in ti_sci_proc_handover()
1334 ret = ti_sci_do_xfer(&xfer); in ti_sci_proc_handover()
1335 if (ret) { in ti_sci_proc_handover()
1336 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_proc_handover()
1337 return ret; in ti_sci_proc_handover()
1360 int ret; in ti_sci_proc_set_boot_cfg() local
1362 ret = ti_sci_setup_one_xfer(TISCI_MSG_SET_PROC_BOOT_CONFIG, 0, in ti_sci_proc_set_boot_cfg()
1366 if (ret) { in ti_sci_proc_set_boot_cfg()
1367 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_proc_set_boot_cfg()
1368 return ret; in ti_sci_proc_set_boot_cfg()
1378 ret = ti_sci_do_xfer(&xfer); in ti_sci_proc_set_boot_cfg()
1379 if (ret) { in ti_sci_proc_set_boot_cfg()
1380 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_proc_set_boot_cfg()
1381 return ret; in ti_sci_proc_set_boot_cfg()
1403 int ret; in ti_sci_proc_set_boot_ctrl() local
1405 ret = ti_sci_setup_one_xfer(TISCI_MSG_SET_PROC_BOOT_CTRL, 0, in ti_sci_proc_set_boot_ctrl()
1409 if (ret) { in ti_sci_proc_set_boot_ctrl()
1410 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_proc_set_boot_ctrl()
1411 return ret; in ti_sci_proc_set_boot_ctrl()
1418 ret = ti_sci_do_xfer(&xfer); in ti_sci_proc_set_boot_ctrl()
1419 if (ret) { in ti_sci_proc_set_boot_ctrl()
1420 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_proc_set_boot_ctrl()
1421 return ret; in ti_sci_proc_set_boot_ctrl()
1444 int ret; in ti_sci_proc_set_boot_ctrl_no_wait() local
1446 ret = ti_sci_setup_one_xfer(TISCI_MSG_SET_PROC_BOOT_CTRL, 0, in ti_sci_proc_set_boot_ctrl_no_wait()
1450 if (ret != 0U) { in ti_sci_proc_set_boot_ctrl_no_wait()
1451 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_proc_set_boot_ctrl_no_wait()
1452 return ret; in ti_sci_proc_set_boot_ctrl_no_wait()
1459 ret = ti_sci_do_xfer(&xfer); in ti_sci_proc_set_boot_ctrl_no_wait()
1460 if (ret != 0U) { in ti_sci_proc_set_boot_ctrl_no_wait()
1461 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_proc_set_boot_ctrl_no_wait()
1462 return ret; in ti_sci_proc_set_boot_ctrl_no_wait()
1483 int ret; in ti_sci_proc_auth_boot_image() local
1485 ret = ti_sci_setup_one_xfer(TISCI_MSG_PROC_AUTH_BOOT_IMAGE, 0, in ti_sci_proc_auth_boot_image()
1489 if (ret) { in ti_sci_proc_auth_boot_image()
1490 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_proc_auth_boot_image()
1491 return ret; in ti_sci_proc_auth_boot_image()
1499 ret = ti_sci_do_xfer(&xfer); in ti_sci_proc_auth_boot_image()
1500 if (ret) { in ti_sci_proc_auth_boot_image()
1501 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_proc_auth_boot_image()
1502 return ret; in ti_sci_proc_auth_boot_image()
1524 int ret; in ti_sci_proc_get_boot_status() local
1526 ret = ti_sci_setup_one_xfer(TISCI_MSG_GET_PROC_BOOT_STATUS, 0, in ti_sci_proc_get_boot_status()
1530 if (ret) { in ti_sci_proc_get_boot_status()
1531 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_proc_get_boot_status()
1532 return ret; in ti_sci_proc_get_boot_status()
1537 ret = ti_sci_do_xfer(&xfer); in ti_sci_proc_get_boot_status()
1538 if (ret) { in ti_sci_proc_get_boot_status()
1539 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_proc_get_boot_status()
1540 return ret; in ti_sci_proc_get_boot_status()
1600 int ret; in ti_sci_proc_wait_boot_status() local
1602 ret = ti_sci_setup_one_xfer(TISCI_MSG_WAIT_PROC_BOOT_STATUS, 0, in ti_sci_proc_wait_boot_status()
1606 if (ret) { in ti_sci_proc_wait_boot_status()
1607 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_proc_wait_boot_status()
1608 return ret; in ti_sci_proc_wait_boot_status()
1621 ret = ti_sci_do_xfer(&xfer); in ti_sci_proc_wait_boot_status()
1622 if (ret) { in ti_sci_proc_wait_boot_status()
1623 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_proc_wait_boot_status()
1624 return ret; in ti_sci_proc_wait_boot_status()
1678 int ret; in ti_sci_proc_wait_boot_status_no_wait() local
1680 ret = ti_sci_setup_one_xfer(TISCI_MSG_WAIT_PROC_BOOT_STATUS, 0, in ti_sci_proc_wait_boot_status_no_wait()
1684 if (ret != 0U) { in ti_sci_proc_wait_boot_status_no_wait()
1685 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_proc_wait_boot_status_no_wait()
1686 return ret; in ti_sci_proc_wait_boot_status_no_wait()
1699 ret = ti_sci_do_xfer(&xfer); in ti_sci_proc_wait_boot_status_no_wait()
1700 if (ret != 0U) { in ti_sci_proc_wait_boot_status_no_wait()
1701 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_proc_wait_boot_status_no_wait()
1702 return ret; in ti_sci_proc_wait_boot_status_no_wait()
1724 int ret; in ti_sci_enter_sleep() local
1726 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_ENTER_SLEEP, 0, in ti_sci_enter_sleep()
1730 if (ret != 0U) { in ti_sci_enter_sleep()
1731 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_enter_sleep()
1732 return ret; in ti_sci_enter_sleep()
1741 ret = ti_sci_do_xfer(&xfer); in ti_sci_enter_sleep()
1742 if (ret != 0U) { in ti_sci_enter_sleep()
1743 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_enter_sleep()
1744 return ret; in ti_sci_enter_sleep()
1762 int ret; in ti_sci_lpm_get_next_sys_mode() local
1768 ret = ti_sci_setup_one_xfer(TI_SCI_MSG_LPM_GET_NEXT_SYS_MODE, 0, in ti_sci_lpm_get_next_sys_mode()
1772 if (ret != 0) { in ti_sci_lpm_get_next_sys_mode()
1773 ERROR("Message alloc failed (%d)\n", ret); in ti_sci_lpm_get_next_sys_mode()
1774 return ret; in ti_sci_lpm_get_next_sys_mode()
1777 ret = ti_sci_do_xfer(&xfer); in ti_sci_lpm_get_next_sys_mode()
1778 if (ret != 0) { in ti_sci_lpm_get_next_sys_mode()
1779 ERROR("Transfer send failed (%d)\n", ret); in ti_sci_lpm_get_next_sys_mode()
1780 return ret; in ti_sci_lpm_get_next_sys_mode()
1792 int ret; in ti_sci_boot_notification() local
1798 ret = ti_sci_transport_recv(RX_SECURE_TRANSPORT_CHANNEL_ID, &rx_msg); in ti_sci_boot_notification()
1799 if (ret) { in ti_sci_boot_notification()
1800 ERROR("Message receive failed (%d)\n", ret); in ti_sci_boot_notification()
1801 return ret; in ti_sci_boot_notification()