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->tx_message.chan_rx = info->chan_rx;
340 xfer->tx_message.timeout_rx_ms = info->desc->max_rx_timeout_ms;
341 xfer->rx_len = (u8)rx_message_size;
343 reinit_completion(&xfer->done);
350 return xfer;
356 * @xfer: message that was reserved by ti_sci_get_one_xfer
361 struct ti_sci_xfer *xfer)
367 hdr = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
386 * @xfer: Transfer to initiate and wait for response
393 struct ti_sci_xfer *xfer)
400 ret = mbox_send_message(info->chan_tx, &xfer->tx_message);
409 if (!wait_for_completion_timeout(&xfer->done, timeout))
419 false, &xfer->done);
451 struct ti_sci_xfer *xfer;
454 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_VERSION,
458 if (IS_ERR(xfer)) {
459 ret = PTR_ERR(xfer);
464 rev_info = (struct ti_sci_msg_resp_version *)xfer->xfer_buf;
466 ret = ti_sci_do_xfer(info, xfer);
479 ti_sci_put_one_xfer(&info->minfo, xfer);
511 struct ti_sci_xfer *xfer;
523 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_DEVICE_STATE,
526 if (IS_ERR(xfer)) {
527 ret = PTR_ERR(xfer);
531 req = (struct ti_sci_msg_req_set_device_state *)xfer->xfer_buf;
535 ret = ti_sci_do_xfer(info, xfer);
541 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
546 ti_sci_put_one_xfer(&info->minfo, xfer);
569 struct ti_sci_xfer *xfer;
584 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_DEVICE_STATE,
587 if (IS_ERR(xfer)) {
588 ret = PTR_ERR(xfer);
592 req = (struct ti_sci_msg_req_get_device_state *)xfer->xfer_buf;
595 ret = ti_sci_do_xfer(info, xfer);
601 resp = (struct ti_sci_msg_resp_get_device_state *)xfer->xfer_buf;
616 ti_sci_put_one_xfer(&info->minfo, xfer);
874 struct ti_sci_xfer *xfer;
886 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_DEVICE_RESETS,
889 if (IS_ERR(xfer)) {
890 ret = PTR_ERR(xfer);
894 req = (struct ti_sci_msg_req_set_device_resets *)xfer->xfer_buf;
898 ret = ti_sci_do_xfer(info, xfer);
904 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
909 ti_sci_put_one_xfer(&info->minfo, xfer);
949 struct ti_sci_xfer *xfer;
961 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CLOCK_STATE,
964 if (IS_ERR(xfer)) {
965 ret = PTR_ERR(xfer);
969 req = (struct ti_sci_msg_req_set_clock_state *)xfer->xfer_buf;
979 ret = ti_sci_do_xfer(info, xfer);
985 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
990 ti_sci_put_one_xfer(&info->minfo, xfer);
1014 struct ti_sci_xfer *xfer;
1029 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_CLOCK_STATE,
1032 if (IS_ERR(xfer)) {
1033 ret = PTR_ERR(xfer);
1037 req = (struct ti_sci_msg_req_get_clock_state *)xfer->xfer_buf;
1046 ret = ti_sci_do_xfer(info, xfer);
1052 resp = (struct ti_sci_msg_resp_get_clock_state *)xfer->xfer_buf;
1065 ti_sci_put_one_xfer(&info->minfo, xfer);
1248 struct ti_sci_xfer *xfer;
1260 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CLOCK_PARENT,
1263 if (IS_ERR(xfer)) {
1264 ret = PTR_ERR(xfer);
1268 req = (struct ti_sci_msg_req_set_clock_parent *)xfer->xfer_buf;
1283 ret = ti_sci_do_xfer(info, xfer);
1289 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
1294 ti_sci_put_one_xfer(&info->minfo, xfer);
1316 struct ti_sci_xfer *xfer;
1328 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_CLOCK_PARENT,
1331 if (IS_ERR(xfer)) {
1332 ret = PTR_ERR(xfer);
1336 req = (struct ti_sci_msg_req_get_clock_parent *)xfer->xfer_buf;
1345 ret = ti_sci_do_xfer(info, xfer);
1351 resp = (struct ti_sci_msg_resp_get_clock_parent *)xfer->xfer_buf;
1363 ti_sci_put_one_xfer(&info->minfo, xfer);
1386 struct ti_sci_xfer *xfer;
1398 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_NUM_CLOCK_PARENTS,
1401 if (IS_ERR(xfer)) {
1402 ret = PTR_ERR(xfer);
1406 req = (struct ti_sci_msg_req_get_clock_num_parents *)xfer->xfer_buf;
1415 ret = ti_sci_do_xfer(info, xfer);
1421 resp = (struct ti_sci_msg_resp_get_clock_num_parents *)xfer->xfer_buf;
1433 ti_sci_put_one_xfer(&info->minfo, xfer);
1465 struct ti_sci_xfer *xfer;
1477 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_QUERY_CLOCK_FREQ,
1480 if (IS_ERR(xfer)) {
1481 ret = PTR_ERR(xfer);
1485 req = (struct ti_sci_msg_req_query_clock_freq *)xfer->xfer_buf;
1497 ret = ti_sci_do_xfer(info, xfer);
1503 resp = (struct ti_sci_msg_resp_query_clock_freq *)xfer->xfer_buf;
1511 ti_sci_put_one_xfer(&info->minfo, xfer);
1541 struct ti_sci_xfer *xfer;
1553 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CLOCK_FREQ,
1556 if (IS_ERR(xfer)) {
1557 ret = PTR_ERR(xfer);
1561 req = (struct ti_sci_msg_req_set_clock_freq *)xfer->xfer_buf;
1573 ret = ti_sci_do_xfer(info, xfer);
1579 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
1584 ti_sci_put_one_xfer(&info->minfo, xfer);
1606 struct ti_sci_xfer *xfer;
1618 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_CLOCK_FREQ,
1621 if (IS_ERR(xfer)) {
1622 ret = PTR_ERR(xfer);
1626 req = (struct ti_sci_msg_req_get_clock_freq *)xfer->xfer_buf;
1635 ret = ti_sci_do_xfer(info, xfer);
1641 resp = (struct ti_sci_msg_resp_get_clock_freq *)xfer->xfer_buf;
1649 ti_sci_put_one_xfer(&info->minfo, xfer);
1659 struct ti_sci_xfer *xfer;
1671 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SYS_RESET,
1674 if (IS_ERR(xfer)) {
1675 ret = PTR_ERR(xfer);
1679 req = (struct ti_sci_msg_req_reboot *)xfer->xfer_buf;
1681 ret = ti_sci_do_xfer(info, xfer);
1687 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
1695 ti_sci_put_one_xfer(&info->minfo, xfer);
1720 struct ti_sci_xfer *xfer;
1733 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_RESOURCE_RANGE,
1736 if (IS_ERR(xfer)) {
1737 ret = PTR_ERR(xfer);
1742 req = (struct ti_sci_msg_req_get_resource_range *)xfer->xfer_buf;
1747 ret = ti_sci_do_xfer(info, xfer);
1753 resp = (struct ti_sci_msg_resp_get_resource_range *)xfer->xfer_buf;
1768 ti_sci_put_one_xfer(&info->minfo, xfer);
1842 struct ti_sci_xfer *xfer;
1855 xfer = ti_sci_get_one_xfer(info, type, TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
1857 if (IS_ERR(xfer)) {
1858 ret = PTR_ERR(xfer);
1862 req = (struct ti_sci_msg_req_manage_irq *)xfer->xfer_buf;
1874 ret = ti_sci_do_xfer(info, xfer);
1880 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
1885 ti_sci_put_one_xfer(&info->minfo, xfer);
2065 struct ti_sci_xfer *xfer;
2076 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_RING_CFG,
2079 if (IS_ERR(xfer)) {
2080 ret = PTR_ERR(xfer);
2084 req = (struct ti_sci_msg_rm_ring_cfg_req *)xfer->xfer_buf;
2097 ret = ti_sci_do_xfer(info, xfer);
2103 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2107 ti_sci_put_one_xfer(&info->minfo, xfer);
2127 struct ti_sci_xfer *xfer;
2140 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_PSIL_PAIR,
2143 if (IS_ERR(xfer)) {
2144 ret = PTR_ERR(xfer);
2148 req = (struct ti_sci_msg_psil_pair *)xfer->xfer_buf;
2153 ret = ti_sci_do_xfer(info, xfer);
2159 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2163 ti_sci_put_one_xfer(&info->minfo, xfer);
2183 struct ti_sci_xfer *xfer;
2196 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_PSIL_UNPAIR,
2199 if (IS_ERR(xfer)) {
2200 ret = PTR_ERR(xfer);
2204 req = (struct ti_sci_msg_psil_unpair *)xfer->xfer_buf;
2209 ret = ti_sci_do_xfer(info, xfer);
2215 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2219 ti_sci_put_one_xfer(&info->minfo, xfer);
2240 struct ti_sci_xfer *xfer;
2251 xfer = ti_sci_get_one_xfer(info, TISCI_MSG_RM_UDMAP_TX_CH_CFG,
2254 if (IS_ERR(xfer)) {
2255 ret = PTR_ERR(xfer);
2259 req = (struct ti_sci_msg_rm_udmap_tx_ch_cfg_req *)xfer->xfer_buf;
2281 ret = ti_sci_do_xfer(info, xfer);
2287 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2291 ti_sci_put_one_xfer(&info->minfo, xfer);
2312 struct ti_sci_xfer *xfer;
2323 xfer = ti_sci_get_one_xfer(info, TISCI_MSG_RM_UDMAP_RX_CH_CFG,
2326 if (IS_ERR(xfer)) {
2327 ret = PTR_ERR(xfer);
2331 req = (struct ti_sci_msg_rm_udmap_rx_ch_cfg_req *)xfer->xfer_buf;
2350 ret = ti_sci_do_xfer(info, xfer);
2356 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2360 ti_sci_put_one_xfer(&info->minfo, xfer);
2381 struct ti_sci_xfer *xfer;
2392 xfer = ti_sci_get_one_xfer(info, TISCI_MSG_RM_UDMAP_FLOW_CFG,
2395 if (IS_ERR(xfer)) {
2396 ret = PTR_ERR(xfer);
2400 req = (struct ti_sci_msg_rm_udmap_flow_cfg_req *)xfer->xfer_buf;
2424 ret = ti_sci_do_xfer(info, xfer);
2430 resp = (struct ti_sci_msg_hdr *)xfer->xfer_buf;
2434 ti_sci_put_one_xfer(&info->minfo, xfer);
2452 struct ti_sci_xfer *xfer;
2464 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_PROC_REQUEST,
2467 if (IS_ERR(xfer)) {
2468 ret = PTR_ERR(xfer);
2472 req = (struct ti_sci_msg_req_proc_request *)xfer->xfer_buf;
2475 ret = ti_sci_do_xfer(info, xfer);
2481 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2486 ti_sci_put_one_xfer(&info->minfo, xfer);
2504 struct ti_sci_xfer *xfer;
2516 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_PROC_RELEASE,
2519 if (IS_ERR(xfer)) {
2520 ret = PTR_ERR(xfer);
2524 req = (struct ti_sci_msg_req_proc_release *)xfer->xfer_buf;
2527 ret = ti_sci_do_xfer(info, xfer);
2533 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2538 ti_sci_put_one_xfer(&info->minfo, xfer);
2559 struct ti_sci_xfer *xfer;
2571 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_PROC_HANDOVER,
2574 if (IS_ERR(xfer)) {
2575 ret = PTR_ERR(xfer);
2579 req = (struct ti_sci_msg_req_proc_handover *)xfer->xfer_buf;
2583 ret = ti_sci_do_xfer(info, xfer);
2589 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2594 ti_sci_put_one_xfer(&info->minfo, xfer);
2618 struct ti_sci_xfer *xfer;
2630 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CONFIG,
2633 if (IS_ERR(xfer)) {
2634 ret = PTR_ERR(xfer);
2638 req = (struct ti_sci_msg_req_set_config *)xfer->xfer_buf;
2646 ret = ti_sci_do_xfer(info, xfer);
2652 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2657 ti_sci_put_one_xfer(&info->minfo, xfer);
2679 struct ti_sci_xfer *xfer;
2691 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_SET_CTRL,
2694 if (IS_ERR(xfer)) {
2695 ret = PTR_ERR(xfer);
2699 req = (struct ti_sci_msg_req_set_ctrl *)xfer->xfer_buf;
2704 ret = ti_sci_do_xfer(info, xfer);
2710 resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
2715 ti_sci_put_one_xfer(&info->minfo, xfer);
2738 struct ti_sci_xfer *xfer;
2750 xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_GET_STATUS,
2753 if (IS_ERR(xfer)) {
2754 ret = PTR_ERR(xfer);
2758 req = (struct ti_sci_msg_req_get_status *)xfer->xfer_buf;
2761 ret = ti_sci_do_xfer(info, xfer);
2767 resp = (struct ti_sci_msg_resp_get_status *)xfer->tx_message.buf;
2781 ti_sci_put_one_xfer(&info->minfo, xfer);
3302 struct ti_sci_xfer *xfer;
3365 for (i = 0, xfer = minfo->xfer_block; i < desc->max_msgs; i++, xfer++) {
3366 xfer->xfer_buf = devm_kcalloc(dev, 1, desc->max_msg_size,
3368 if (!xfer->xfer_buf)
3371 xfer->tx_message.buf = xfer->xfer_buf;
3372 init_completion(&xfer->done);