Lines Matching refs:xfer

239 	struct ti_sci_xfer *xfer;
253 xfer = &minfo->xfer_block[xfer_id];
257 dev_err(dev, "Unable to handle %zu xfer(max %d)\n",
262 if (mbox_msg->len < xfer->rx_len) {
263 dev_err(dev, "Recv xfer %zu < expected %d length\n",
264 mbox_msg->len, xfer->rx_len);
271 memcpy(xfer->xfer_buf, mbox_msg->buf, xfer->rx_len);
272 complete(&xfer->done);
298 struct ti_sci_xfer *xfer;
338 xfer = &minfo->xfer_block[xfer_id];
340 hdr = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
341 xfer->tx_message.len = tx_message_size;
342 xfer->tx_message.chan_rx = info->chan_rx;
343 xfer->tx_message.timeout_rx_ms = info->desc->max_rx_timeout_ms;
344 xfer->rx_len = (u8)rx_message_size;
346 reinit_completion(&xfer->done);
353 return xfer;
359 * @xfer: message that was reserved by ti_sci_get_one_xfer
364 struct ti_sci_xfer *xfer)
370 hdr = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
389 * @xfer: Transfer to initiate and wait for response
396 struct ti_sci_xfer *xfer)
403 ret = mbox_send_message(info->chan_tx, &xfer->tx_message);
412 if (!wait_for_completion_timeout(&xfer->done, timeout))
422 false, &xfer->done);
454 struct ti_sci_xfer *xfer;
457 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_VERSION,
461 if (IS_ERR(xfer)) {
462 ret = PTR_ERR(xfer);
467 rev_info = (struct ti_sci_msg_resp_version *)xfer->xfer_buf;
469 ret = ti_sci_do_xfer(info, xfer);
482 ti_sci_put_one_xfer(&info->minfo, xfer);
514 struct ti_sci_xfer *xfer;
526 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_DEVICE_STATE,
529 if (IS_ERR(xfer)) {
530 ret = PTR_ERR(xfer);
534 req = (struct ti_sci_msg_req_set_device_state *)xfer->xfer_buf;
538 ret = ti_sci_do_xfer(info, xfer);
544 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
549 ti_sci_put_one_xfer(&info->minfo, xfer);
572 struct ti_sci_xfer *xfer;
587 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_DEVICE_STATE,
590 if (IS_ERR(xfer)) {
591 ret = PTR_ERR(xfer);
595 req = (struct ti_sci_msg_req_get_device_state *)xfer->xfer_buf;
598 ret = ti_sci_do_xfer(info, xfer);
604 resp = (struct ti_sci_msg_resp_get_device_state *)xfer->xfer_buf;
619 ti_sci_put_one_xfer(&info->minfo, xfer);
877 struct ti_sci_xfer *xfer;
889 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_DEVICE_RESETS,
892 if (IS_ERR(xfer)) {
893 ret = PTR_ERR(xfer);
897 req = (struct ti_sci_msg_req_set_device_resets *)xfer->xfer_buf;
901 ret = ti_sci_do_xfer(info, xfer);
907 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
912 ti_sci_put_one_xfer(&info->minfo, xfer);
952 struct ti_sci_xfer *xfer;
964 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CLOCK_STATE,
967 if (IS_ERR(xfer)) {
968 ret = PTR_ERR(xfer);
972 req = (struct ti_sci_msg_req_set_clock_state *)xfer->xfer_buf;
982 ret = ti_sci_do_xfer(info, xfer);
988 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
993 ti_sci_put_one_xfer(&info->minfo, xfer);
1017 struct ti_sci_xfer *xfer;
1032 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_CLOCK_STATE,
1035 if (IS_ERR(xfer)) {
1036 ret = PTR_ERR(xfer);
1040 req = (struct ti_sci_msg_req_get_clock_state *)xfer->xfer_buf;
1049 ret = ti_sci_do_xfer(info, xfer);
1055 resp = (struct ti_sci_msg_resp_get_clock_state *)xfer->xfer_buf;
1068 ti_sci_put_one_xfer(&info->minfo, xfer);
1251 struct ti_sci_xfer *xfer;
1263 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CLOCK_PARENT,
1266 if (IS_ERR(xfer)) {
1267 ret = PTR_ERR(xfer);
1271 req = (struct ti_sci_msg_req_set_clock_parent *)xfer->xfer_buf;
1286 ret = ti_sci_do_xfer(info, xfer);
1292 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
1297 ti_sci_put_one_xfer(&info->minfo, xfer);
1319 struct ti_sci_xfer *xfer;
1331 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_CLOCK_PARENT,
1334 if (IS_ERR(xfer)) {
1335 ret = PTR_ERR(xfer);
1339 req = (struct ti_sci_msg_req_get_clock_parent *)xfer->xfer_buf;
1348 ret = ti_sci_do_xfer(info, xfer);
1354 resp = (struct ti_sci_msg_resp_get_clock_parent *)xfer->xfer_buf;
1366 ti_sci_put_one_xfer(&info->minfo, xfer);
1389 struct ti_sci_xfer *xfer;
1401 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_NUM_CLOCK_PARENTS,
1404 if (IS_ERR(xfer)) {
1405 ret = PTR_ERR(xfer);
1409 req = (struct ti_sci_msg_req_get_clock_num_parents *)xfer->xfer_buf;
1418 ret = ti_sci_do_xfer(info, xfer);
1424 resp = (struct ti_sci_msg_resp_get_clock_num_parents *)xfer->xfer_buf;
1436 ti_sci_put_one_xfer(&info->minfo, xfer);
1468 struct ti_sci_xfer *xfer;
1480 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_QUERY_CLOCK_FREQ,
1483 if (IS_ERR(xfer)) {
1484 ret = PTR_ERR(xfer);
1488 req = (struct ti_sci_msg_req_query_clock_freq *)xfer->xfer_buf;
1500 ret = ti_sci_do_xfer(info, xfer);
1506 resp = (struct ti_sci_msg_resp_query_clock_freq *)xfer->xfer_buf;
1514 ti_sci_put_one_xfer(&info->minfo, xfer);
1544 struct ti_sci_xfer *xfer;
1556 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CLOCK_FREQ,
1559 if (IS_ERR(xfer)) {
1560 ret = PTR_ERR(xfer);
1564 req = (struct ti_sci_msg_req_set_clock_freq *)xfer->xfer_buf;
1576 ret = ti_sci_do_xfer(info, xfer);
1582 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
1587 ti_sci_put_one_xfer(&info->minfo, xfer);
1609 struct ti_sci_xfer *xfer;
1621 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_CLOCK_FREQ,
1624 if (IS_ERR(xfer)) {
1625 ret = PTR_ERR(xfer);
1629 req = (struct ti_sci_msg_req_get_clock_freq *)xfer->xfer_buf;
1638 ret = ti_sci_do_xfer(info, xfer);
1644 resp = (struct ti_sci_msg_resp_get_clock_freq *)xfer->xfer_buf;
1652 ti_sci_put_one_xfer(&info->minfo, xfer);
1662 struct ti_sci_xfer *xfer;
1674 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SYS_RESET,
1677 if (IS_ERR(xfer)) {
1678 ret = PTR_ERR(xfer);
1682 req = (struct ti_sci_msg_req_reboot *)xfer->xfer_buf;
1684 ret = ti_sci_do_xfer(info, xfer);
1690 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
1698 ti_sci_put_one_xfer(&info->minfo, xfer);
1723 struct ti_sci_xfer *xfer;
1736 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_RESOURCE_RANGE,
1739 if (IS_ERR(xfer)) {
1740 ret = PTR_ERR(xfer);
1745 req = (struct ti_sci_msg_req_get_resource_range *)xfer->xfer_buf;
1750 ret = ti_sci_do_xfer(info, xfer);
1756 resp = (struct ti_sci_msg_resp_get_resource_range *)xfer->xfer_buf;
1771 ti_sci_put_one_xfer(&info->minfo, xfer);
1845 struct ti_sci_xfer *xfer;
1858 xfer = ti_sci_get_one_xfer(info, type, TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
1860 if (IS_ERR(xfer)) {
1861 ret = PTR_ERR(xfer);
1865 req = (struct ti_sci_msg_req_manage_irq *)xfer->xfer_buf;
1877 ret = ti_sci_do_xfer(info, xfer);
1883 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
1888 ti_sci_put_one_xfer(&info->minfo, xfer);
2068 struct ti_sci_xfer *xfer;
2079 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_RING_CFG,
2082 if (IS_ERR(xfer)) {
2083 ret = PTR_ERR(xfer);
2087 req = (struct ti_sci_msg_rm_ring_cfg_req *)xfer->xfer_buf;
2100 ret = ti_sci_do_xfer(info, xfer);
2106 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2110 ti_sci_put_one_xfer(&info->minfo, xfer);
2130 struct ti_sci_xfer *xfer;
2143 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_PSIL_PAIR,
2146 if (IS_ERR(xfer)) {
2147 ret = PTR_ERR(xfer);
2151 req = (struct ti_sci_msg_psil_pair *)xfer->xfer_buf;
2156 ret = ti_sci_do_xfer(info, xfer);
2162 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2166 ti_sci_put_one_xfer(&info->minfo, xfer);
2186 struct ti_sci_xfer *xfer;
2199 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_PSIL_UNPAIR,
2202 if (IS_ERR(xfer)) {
2203 ret = PTR_ERR(xfer);
2207 req = (struct ti_sci_msg_psil_unpair *)xfer->xfer_buf;
2212 ret = ti_sci_do_xfer(info, xfer);
2218 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2222 ti_sci_put_one_xfer(&info->minfo, xfer);
2243 struct ti_sci_xfer *xfer;
2254 xfer = ti_sci_get_one_xfer(info, TISCI_MSG_RM_UDMAP_TX_CH_CFG,
2257 if (IS_ERR(xfer)) {
2258 ret = PTR_ERR(xfer);
2262 req = (struct ti_sci_msg_rm_udmap_tx_ch_cfg_req *)xfer->xfer_buf;
2284 ret = ti_sci_do_xfer(info, xfer);
2290 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2294 ti_sci_put_one_xfer(&info->minfo, xfer);
2315 struct ti_sci_xfer *xfer;
2326 xfer = ti_sci_get_one_xfer(info, TISCI_MSG_RM_UDMAP_RX_CH_CFG,
2329 if (IS_ERR(xfer)) {
2330 ret = PTR_ERR(xfer);
2334 req = (struct ti_sci_msg_rm_udmap_rx_ch_cfg_req *)xfer->xfer_buf;
2353 ret = ti_sci_do_xfer(info, xfer);
2359 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2363 ti_sci_put_one_xfer(&info->minfo, xfer);
2384 struct ti_sci_xfer *xfer;
2395 xfer = ti_sci_get_one_xfer(info, TISCI_MSG_RM_UDMAP_FLOW_CFG,
2398 if (IS_ERR(xfer)) {
2399 ret = PTR_ERR(xfer);
2403 req = (struct ti_sci_msg_rm_udmap_flow_cfg_req *)xfer->xfer_buf;
2427 ret = ti_sci_do_xfer(info, xfer);
2433 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2437 ti_sci_put_one_xfer(&info->minfo, xfer);
2455 struct ti_sci_xfer *xfer;
2467 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_PROC_REQUEST,
2470 if (IS_ERR(xfer)) {
2471 ret = PTR_ERR(xfer);
2475 req = (struct ti_sci_msg_req_proc_request *)xfer->xfer_buf;
2478 ret = ti_sci_do_xfer(info, xfer);
2484 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2489 ti_sci_put_one_xfer(&info->minfo, xfer);
2507 struct ti_sci_xfer *xfer;
2519 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_PROC_RELEASE,
2522 if (IS_ERR(xfer)) {
2523 ret = PTR_ERR(xfer);
2527 req = (struct ti_sci_msg_req_proc_release *)xfer->xfer_buf;
2530 ret = ti_sci_do_xfer(info, xfer);
2536 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2541 ti_sci_put_one_xfer(&info->minfo, xfer);
2562 struct ti_sci_xfer *xfer;
2574 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_PROC_HANDOVER,
2577 if (IS_ERR(xfer)) {
2578 ret = PTR_ERR(xfer);
2582 req = (struct ti_sci_msg_req_proc_handover *)xfer->xfer_buf;
2586 ret = ti_sci_do_xfer(info, xfer);
2592 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2597 ti_sci_put_one_xfer(&info->minfo, xfer);
2621 struct ti_sci_xfer *xfer;
2633 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CONFIG,
2636 if (IS_ERR(xfer)) {
2637 ret = PTR_ERR(xfer);
2641 req = (struct ti_sci_msg_req_set_config *)xfer->xfer_buf;
2649 ret = ti_sci_do_xfer(info, xfer);
2655 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2660 ti_sci_put_one_xfer(&info->minfo, xfer);
2682 struct ti_sci_xfer *xfer;
2694 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CTRL,
2697 if (IS_ERR(xfer)) {
2698 ret = PTR_ERR(xfer);
2702 req = (struct ti_sci_msg_req_set_ctrl *)xfer->xfer_buf;
2707 ret = ti_sci_do_xfer(info, xfer);
2713 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2718 ti_sci_put_one_xfer(&info->minfo, xfer);
2741 struct ti_sci_xfer *xfer;
2753 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_STATUS,
2756 if (IS_ERR(xfer)) {
2757 ret = PTR_ERR(xfer);
2761 req = (struct ti_sci_msg_req_get_status *)xfer->xfer_buf;
2764 ret = ti_sci_do_xfer(info, xfer);
2770 resp = (struct ti_sci_msg_resp_get_status *)xfer->tx_message.buf;
2784 ti_sci_put_one_xfer(&info->minfo, xfer);
3300 struct ti_sci_xfer *xfer;
3358 for (i = 0, xfer = minfo->xfer_block; i < desc->max_msgs; i++, xfer++) {
3359 xfer->xfer_buf = devm_kcalloc(dev, 1, desc->max_msg_size,
3361 if (!xfer->xfer_buf)
3364 xfer->tx_message.buf = xfer->xfer_buf;
3365 init_completion(&xfer->done);