Lines Matching refs:xfer
236 struct ti_sci_xfer *xfer;
250 xfer = &minfo->xfer_block[xfer_id];
254 dev_err(dev, "Unable to handle %zu xfer(max %d)\n",
259 if (mbox_msg->len < xfer->rx_len) {
260 dev_err(dev, "Recv xfer %zu < expected %d length\n",
261 mbox_msg->len, xfer->rx_len);
268 memcpy(xfer->xfer_buf, mbox_msg->buf, xfer->rx_len);
269 complete(&xfer->done);
295 struct ti_sci_xfer *xfer;
335 xfer = &minfo->xfer_block[xfer_id];
337 hdr = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
338 xfer->tx_message.len = tx_message_size;
339 xfer->rx_len = (u8)rx_message_size;
341 reinit_completion(&xfer->done);
348 return xfer;
354 * @xfer: message that was reserved by ti_sci_get_one_xfer
359 struct ti_sci_xfer *xfer)
365 hdr = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
384 * @xfer: Transfer to initiate and wait for response
391 struct ti_sci_xfer *xfer)
397 ret = mbox_send_message(info->chan_tx, &xfer->tx_message);
405 if (!wait_for_completion_timeout(&xfer->done, timeout)) {
435 struct ti_sci_xfer *xfer;
438 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_VERSION,
442 if (IS_ERR(xfer)) {
443 ret = PTR_ERR(xfer);
448 rev_info = (struct ti_sci_msg_resp_version *)xfer->xfer_buf;
450 ret = ti_sci_do_xfer(info, xfer);
463 ti_sci_put_one_xfer(&info->minfo, xfer);
495 struct ti_sci_xfer *xfer;
507 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_DEVICE_STATE,
510 if (IS_ERR(xfer)) {
511 ret = PTR_ERR(xfer);
515 req = (struct ti_sci_msg_req_set_device_state *)xfer->xfer_buf;
519 ret = ti_sci_do_xfer(info, xfer);
525 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
530 ti_sci_put_one_xfer(&info->minfo, xfer);
553 struct ti_sci_xfer *xfer;
568 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_DEVICE_STATE,
571 if (IS_ERR(xfer)) {
572 ret = PTR_ERR(xfer);
576 req = (struct ti_sci_msg_req_get_device_state *)xfer->xfer_buf;
579 ret = ti_sci_do_xfer(info, xfer);
585 resp = (struct ti_sci_msg_resp_get_device_state *)xfer->xfer_buf;
600 ti_sci_put_one_xfer(&info->minfo, xfer);
858 struct ti_sci_xfer *xfer;
870 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_DEVICE_RESETS,
873 if (IS_ERR(xfer)) {
874 ret = PTR_ERR(xfer);
878 req = (struct ti_sci_msg_req_set_device_resets *)xfer->xfer_buf;
882 ret = ti_sci_do_xfer(info, xfer);
888 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
893 ti_sci_put_one_xfer(&info->minfo, xfer);
933 struct ti_sci_xfer *xfer;
945 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CLOCK_STATE,
948 if (IS_ERR(xfer)) {
949 ret = PTR_ERR(xfer);
953 req = (struct ti_sci_msg_req_set_clock_state *)xfer->xfer_buf;
963 ret = ti_sci_do_xfer(info, xfer);
969 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
974 ti_sci_put_one_xfer(&info->minfo, xfer);
998 struct ti_sci_xfer *xfer;
1013 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_CLOCK_STATE,
1016 if (IS_ERR(xfer)) {
1017 ret = PTR_ERR(xfer);
1021 req = (struct ti_sci_msg_req_get_clock_state *)xfer->xfer_buf;
1030 ret = ti_sci_do_xfer(info, xfer);
1036 resp = (struct ti_sci_msg_resp_get_clock_state *)xfer->xfer_buf;
1049 ti_sci_put_one_xfer(&info->minfo, xfer);
1232 struct ti_sci_xfer *xfer;
1244 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CLOCK_PARENT,
1247 if (IS_ERR(xfer)) {
1248 ret = PTR_ERR(xfer);
1252 req = (struct ti_sci_msg_req_set_clock_parent *)xfer->xfer_buf;
1267 ret = ti_sci_do_xfer(info, xfer);
1273 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
1278 ti_sci_put_one_xfer(&info->minfo, xfer);
1300 struct ti_sci_xfer *xfer;
1312 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_CLOCK_PARENT,
1315 if (IS_ERR(xfer)) {
1316 ret = PTR_ERR(xfer);
1320 req = (struct ti_sci_msg_req_get_clock_parent *)xfer->xfer_buf;
1329 ret = ti_sci_do_xfer(info, xfer);
1335 resp = (struct ti_sci_msg_resp_get_clock_parent *)xfer->xfer_buf;
1347 ti_sci_put_one_xfer(&info->minfo, xfer);
1370 struct ti_sci_xfer *xfer;
1382 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_NUM_CLOCK_PARENTS,
1385 if (IS_ERR(xfer)) {
1386 ret = PTR_ERR(xfer);
1390 req = (struct ti_sci_msg_req_get_clock_num_parents *)xfer->xfer_buf;
1399 ret = ti_sci_do_xfer(info, xfer);
1405 resp = (struct ti_sci_msg_resp_get_clock_num_parents *)xfer->xfer_buf;
1417 ti_sci_put_one_xfer(&info->minfo, xfer);
1449 struct ti_sci_xfer *xfer;
1461 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_QUERY_CLOCK_FREQ,
1464 if (IS_ERR(xfer)) {
1465 ret = PTR_ERR(xfer);
1469 req = (struct ti_sci_msg_req_query_clock_freq *)xfer->xfer_buf;
1481 ret = ti_sci_do_xfer(info, xfer);
1487 resp = (struct ti_sci_msg_resp_query_clock_freq *)xfer->xfer_buf;
1495 ti_sci_put_one_xfer(&info->minfo, xfer);
1525 struct ti_sci_xfer *xfer;
1537 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CLOCK_FREQ,
1540 if (IS_ERR(xfer)) {
1541 ret = PTR_ERR(xfer);
1545 req = (struct ti_sci_msg_req_set_clock_freq *)xfer->xfer_buf;
1557 ret = ti_sci_do_xfer(info, xfer);
1563 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
1568 ti_sci_put_one_xfer(&info->minfo, xfer);
1590 struct ti_sci_xfer *xfer;
1602 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_CLOCK_FREQ,
1605 if (IS_ERR(xfer)) {
1606 ret = PTR_ERR(xfer);
1610 req = (struct ti_sci_msg_req_get_clock_freq *)xfer->xfer_buf;
1619 ret = ti_sci_do_xfer(info, xfer);
1625 resp = (struct ti_sci_msg_resp_get_clock_freq *)xfer->xfer_buf;
1633 ti_sci_put_one_xfer(&info->minfo, xfer);
1643 struct ti_sci_xfer *xfer;
1655 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SYS_RESET,
1658 if (IS_ERR(xfer)) {
1659 ret = PTR_ERR(xfer);
1663 req = (struct ti_sci_msg_req_reboot *)xfer->xfer_buf;
1665 ret = ti_sci_do_xfer(info, xfer);
1671 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
1679 ti_sci_put_one_xfer(&info->minfo, xfer);
1704 struct ti_sci_xfer *xfer;
1717 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_RESOURCE_RANGE,
1720 if (IS_ERR(xfer)) {
1721 ret = PTR_ERR(xfer);
1726 req = (struct ti_sci_msg_req_get_resource_range *)xfer->xfer_buf;
1731 ret = ti_sci_do_xfer(info, xfer);
1737 resp = (struct ti_sci_msg_resp_get_resource_range *)xfer->xfer_buf;
1749 ti_sci_put_one_xfer(&info->minfo, xfer);
1824 struct ti_sci_xfer *xfer;
1837 xfer = ti_sci_get_one_xfer(info, type, TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
1839 if (IS_ERR(xfer)) {
1840 ret = PTR_ERR(xfer);
1844 req = (struct ti_sci_msg_req_manage_irq *)xfer->xfer_buf;
1856 ret = ti_sci_do_xfer(info, xfer);
1862 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
1867 ti_sci_put_one_xfer(&info->minfo, xfer);
2062 struct ti_sci_xfer *xfer;
2073 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_RING_CFG,
2076 if (IS_ERR(xfer)) {
2077 ret = PTR_ERR(xfer);
2081 req = (struct ti_sci_msg_rm_ring_cfg_req *)xfer->xfer_buf;
2092 ret = ti_sci_do_xfer(info, xfer);
2098 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2102 ti_sci_put_one_xfer(&info->minfo, xfer);
2131 struct ti_sci_xfer *xfer;
2142 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_RING_GET_CFG,
2145 if (IS_ERR(xfer)) {
2146 ret = PTR_ERR(xfer);
2151 req = (struct ti_sci_msg_rm_ring_get_cfg_req *)xfer->xfer_buf;
2155 ret = ti_sci_do_xfer(info, xfer);
2161 resp = (struct ti_sci_msg_rm_ring_get_cfg_resp *)xfer->xfer_buf;
2181 ti_sci_put_one_xfer(&info->minfo, xfer);
2201 struct ti_sci_xfer *xfer;
2214 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_PSIL_PAIR,
2217 if (IS_ERR(xfer)) {
2218 ret = PTR_ERR(xfer);
2222 req = (struct ti_sci_msg_psil_pair *)xfer->xfer_buf;
2227 ret = ti_sci_do_xfer(info, xfer);
2233 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2237 ti_sci_put_one_xfer(&info->minfo, xfer);
2257 struct ti_sci_xfer *xfer;
2270 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_PSIL_UNPAIR,
2273 if (IS_ERR(xfer)) {
2274 ret = PTR_ERR(xfer);
2278 req = (struct ti_sci_msg_psil_unpair *)xfer->xfer_buf;
2283 ret = ti_sci_do_xfer(info, xfer);
2289 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2293 ti_sci_put_one_xfer(&info->minfo, xfer);
2314 struct ti_sci_xfer *xfer;
2325 xfer = ti_sci_get_one_xfer(info, TISCI_MSG_RM_UDMAP_TX_CH_CFG,
2328 if (IS_ERR(xfer)) {
2329 ret = PTR_ERR(xfer);
2333 req = (struct ti_sci_msg_rm_udmap_tx_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_RX_CH_CFG,
2398 if (IS_ERR(xfer)) {
2399 ret = PTR_ERR(xfer);
2403 req = (struct ti_sci_msg_rm_udmap_rx_ch_cfg_req *)xfer->xfer_buf;
2422 ret = ti_sci_do_xfer(info, xfer);
2428 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2432 ti_sci_put_one_xfer(&info->minfo, xfer);
2453 struct ti_sci_xfer *xfer;
2464 xfer = ti_sci_get_one_xfer(info, TISCI_MSG_RM_UDMAP_FLOW_CFG,
2467 if (IS_ERR(xfer)) {
2468 ret = PTR_ERR(xfer);
2472 req = (struct ti_sci_msg_rm_udmap_flow_cfg_req *)xfer->xfer_buf;
2496 ret = ti_sci_do_xfer(info, xfer);
2502 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2506 ti_sci_put_one_xfer(&info->minfo, xfer);
2524 struct ti_sci_xfer *xfer;
2536 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_PROC_REQUEST,
2539 if (IS_ERR(xfer)) {
2540 ret = PTR_ERR(xfer);
2544 req = (struct ti_sci_msg_req_proc_request *)xfer->xfer_buf;
2547 ret = ti_sci_do_xfer(info, xfer);
2553 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2558 ti_sci_put_one_xfer(&info->minfo, xfer);
2576 struct ti_sci_xfer *xfer;
2588 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_PROC_RELEASE,
2591 if (IS_ERR(xfer)) {
2592 ret = PTR_ERR(xfer);
2596 req = (struct ti_sci_msg_req_proc_release *)xfer->xfer_buf;
2599 ret = ti_sci_do_xfer(info, xfer);
2605 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2610 ti_sci_put_one_xfer(&info->minfo, xfer);
2631 struct ti_sci_xfer *xfer;
2643 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_PROC_HANDOVER,
2646 if (IS_ERR(xfer)) {
2647 ret = PTR_ERR(xfer);
2651 req = (struct ti_sci_msg_req_proc_handover *)xfer->xfer_buf;
2655 ret = ti_sci_do_xfer(info, xfer);
2661 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2666 ti_sci_put_one_xfer(&info->minfo, xfer);
2689 struct ti_sci_xfer *xfer;
2701 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CONFIG,
2704 if (IS_ERR(xfer)) {
2705 ret = PTR_ERR(xfer);
2709 req = (struct ti_sci_msg_req_set_config *)xfer->xfer_buf;
2717 ret = ti_sci_do_xfer(info, xfer);
2723 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2728 ti_sci_put_one_xfer(&info->minfo, xfer);
2750 struct ti_sci_xfer *xfer;
2762 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CTRL,
2765 if (IS_ERR(xfer)) {
2766 ret = PTR_ERR(xfer);
2770 req = (struct ti_sci_msg_req_set_ctrl *)xfer->xfer_buf;
2775 ret = ti_sci_do_xfer(info, xfer);
2781 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2786 ti_sci_put_one_xfer(&info->minfo, xfer);
2805 struct ti_sci_xfer *xfer;
2817 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_STATUS,
2820 if (IS_ERR(xfer)) {
2821 ret = PTR_ERR(xfer);
2825 req = (struct ti_sci_msg_req_get_status *)xfer->xfer_buf;
2828 ret = ti_sci_do_xfer(info, xfer);
2834 resp = (struct ti_sci_msg_resp_get_status *)xfer->tx_message.buf;
2848 ti_sci_put_one_xfer(&info->minfo, xfer);
3361 struct ti_sci_xfer *xfer;
3426 for (i = 0, xfer = minfo->xfer_block; i < desc->max_msgs; i++, xfer++) {
3427 xfer->xfer_buf = devm_kcalloc(dev, 1, desc->max_msg_size,
3429 if (!xfer->xfer_buf)
3432 xfer->tx_message.buf = xfer->xfer_buf;
3433 init_completion(&xfer->done);