qinst 153 drivers/mailbox/ti-msgmgr.c struct ti_queue_inst *qinst) qinst 162 drivers/mailbox/ti-msgmgr.c val = readl(qinst->queue_state) & status_cnt_mask; qinst 176 drivers/mailbox/ti-msgmgr.c struct ti_queue_inst *qinst) qinst 188 drivers/mailbox/ti-msgmgr.c val = readl(qinst->queue_state) & d->status_err_mask; qinst 207 drivers/mailbox/ti-msgmgr.c struct ti_queue_inst *qinst = chan->con_priv; qinst 220 drivers/mailbox/ti-msgmgr.c if (qinst->is_tx) { qinst 222 drivers/mailbox/ti-msgmgr.c qinst->name); qinst 227 drivers/mailbox/ti-msgmgr.c if (ti_msgmgr_queue_is_error(desc, qinst)) { qinst 228 drivers/mailbox/ti-msgmgr.c dev_err(dev, "Error on Rx channel %s\n", qinst->name); qinst 233 drivers/mailbox/ti-msgmgr.c msg_count = ti_msgmgr_queue_get_num_messages(desc, qinst); qinst 247 drivers/mailbox/ti-msgmgr.c message.buf = (u8 *)qinst->rx_buff; qinst 263 drivers/mailbox/ti-msgmgr.c for (data_reg = qinst->queue_buff_start, word_data = qinst->rx_buff, qinst 287 drivers/mailbox/ti-msgmgr.c struct ti_queue_inst *qinst = chan->con_priv; qinst 293 drivers/mailbox/ti-msgmgr.c if (qinst->is_tx) qinst 296 drivers/mailbox/ti-msgmgr.c if (ti_msgmgr_queue_is_error(desc, qinst)) { qinst 297 drivers/mailbox/ti-msgmgr.c dev_err(dev, "Error on channel %s\n", qinst->name); qinst 301 drivers/mailbox/ti-msgmgr.c msg_count = ti_msgmgr_queue_get_num_messages(desc, qinst); qinst 314 drivers/mailbox/ti-msgmgr.c struct ti_queue_inst *qinst = chan->con_priv; qinst 320 drivers/mailbox/ti-msgmgr.c if (!qinst->is_tx) qinst 323 drivers/mailbox/ti-msgmgr.c if (ti_msgmgr_queue_is_error(desc, qinst)) { qinst 324 drivers/mailbox/ti-msgmgr.c dev_err(dev, "Error on channel %s\n", qinst->name); qinst 328 drivers/mailbox/ti-msgmgr.c msg_count = ti_msgmgr_queue_get_num_messages(desc, qinst); qinst 351 drivers/mailbox/ti-msgmgr.c struct ti_queue_inst *qinst = chan->con_priv; qinst 363 drivers/mailbox/ti-msgmgr.c if (ti_msgmgr_queue_is_error(desc, qinst)) { qinst 364 drivers/mailbox/ti-msgmgr.c dev_err(dev, "Error on channel %s\n", qinst->name); qinst 370 drivers/mailbox/ti-msgmgr.c qinst->name, message->len, desc->max_message_size); qinst 375 drivers/mailbox/ti-msgmgr.c for (data_reg = qinst->queue_buff_start, qinst 394 drivers/mailbox/ti-msgmgr.c if (data_reg <= qinst->queue_buff_end) qinst 395 drivers/mailbox/ti-msgmgr.c writel(0, qinst->queue_buff_end); qinst 409 drivers/mailbox/ti-msgmgr.c struct ti_queue_inst *qinst, qinst 417 drivers/mailbox/ti-msgmgr.c "rx_%03d", d->is_sproxy ? qinst->proxy_id : qinst->queue_id); qinst 420 drivers/mailbox/ti-msgmgr.c if (qinst->irq < 0) { qinst 424 drivers/mailbox/ti-msgmgr.c qinst->irq = of_irq_get_byname(np, of_rx_irq_name); qinst 427 drivers/mailbox/ti-msgmgr.c if (qinst->irq < 0) { qinst 430 drivers/mailbox/ti-msgmgr.c qinst->queue_id, qinst->proxy_id, qinst 431 drivers/mailbox/ti-msgmgr.c of_rx_irq_name, qinst->irq); qinst 432 drivers/mailbox/ti-msgmgr.c return qinst->irq; qinst 437 drivers/mailbox/ti-msgmgr.c ret = request_irq(qinst->irq, ti_msgmgr_queue_rx_interrupt, qinst 438 drivers/mailbox/ti-msgmgr.c IRQF_SHARED, qinst->name, chan); qinst 441 drivers/mailbox/ti-msgmgr.c qinst->irq, qinst->name, ret); qinst 457 drivers/mailbox/ti-msgmgr.c struct ti_queue_inst *qinst = chan->con_priv; qinst 467 drivers/mailbox/ti-msgmgr.c qinst->is_tx = (readl(qinst->queue_ctrl) & qinst 470 drivers/mailbox/ti-msgmgr.c msg_count = ti_msgmgr_queue_get_num_messages(d, qinst); qinst 472 drivers/mailbox/ti-msgmgr.c if (!msg_count && qinst->is_tx) { qinst 474 drivers/mailbox/ti-msgmgr.c qinst->name); qinst 479 drivers/mailbox/ti-msgmgr.c if (!qinst->is_tx) { qinst 481 drivers/mailbox/ti-msgmgr.c qinst->rx_buff = kzalloc(d->max_message_size, GFP_KERNEL); qinst 482 drivers/mailbox/ti-msgmgr.c if (!qinst->rx_buff) qinst 485 drivers/mailbox/ti-msgmgr.c ret = ti_msgmgr_queue_rx_irq_req(dev, d, qinst, chan); qinst 487 drivers/mailbox/ti-msgmgr.c kfree(qinst->rx_buff); qinst 501 drivers/mailbox/ti-msgmgr.c struct ti_queue_inst *qinst = chan->con_priv; qinst 503 drivers/mailbox/ti-msgmgr.c if (!qinst->is_tx) { qinst 504 drivers/mailbox/ti-msgmgr.c free_irq(qinst->irq, chan); qinst 505 drivers/mailbox/ti-msgmgr.c kfree(qinst->rx_buff); qinst 522 drivers/mailbox/ti-msgmgr.c struct ti_queue_inst *qinst; qinst 552 drivers/mailbox/ti-msgmgr.c qinst = &inst->qinsts[req_pid]; qinst 553 drivers/mailbox/ti-msgmgr.c return qinst->chan; qinst 556 drivers/mailbox/ti-msgmgr.c for (qinst = inst->qinsts, i = 0; i < inst->num_valid_queues; qinst 557 drivers/mailbox/ti-msgmgr.c i++, qinst++) { qinst 558 drivers/mailbox/ti-msgmgr.c if (req_qid == qinst->queue_id && req_pid == qinst->proxy_id) qinst 559 drivers/mailbox/ti-msgmgr.c return qinst->chan; qinst 586 drivers/mailbox/ti-msgmgr.c struct ti_queue_inst *qinst, qinst 591 drivers/mailbox/ti-msgmgr.c qinst->proxy_id = qd->proxy_id; qinst 592 drivers/mailbox/ti-msgmgr.c qinst->queue_id = qd->queue_id; qinst 594 drivers/mailbox/ti-msgmgr.c if (qinst->queue_id > d->queue_count) { qinst 596 drivers/mailbox/ti-msgmgr.c idx, qinst->queue_id, d->queue_count); qinst 601 drivers/mailbox/ti-msgmgr.c qinst->queue_buff_start = inst->queue_proxy_region + qinst 602 drivers/mailbox/ti-msgmgr.c SPROXY_THREAD_DATA_OFFSET(qinst->proxy_id, qinst 604 drivers/mailbox/ti-msgmgr.c qinst->queue_buff_end = inst->queue_proxy_region + qinst 605 drivers/mailbox/ti-msgmgr.c SPROXY_THREAD_DATA_OFFSET(qinst->proxy_id, qinst 607 drivers/mailbox/ti-msgmgr.c qinst->queue_state = inst->queue_state_debug_region + qinst 608 drivers/mailbox/ti-msgmgr.c SPROXY_THREAD_STATUS_OFFSET(qinst->proxy_id); qinst 609 drivers/mailbox/ti-msgmgr.c qinst->queue_ctrl = inst->queue_ctrl_region + qinst 610 drivers/mailbox/ti-msgmgr.c SPROXY_THREAD_CTRL_OFFSET(qinst->proxy_id); qinst 614 drivers/mailbox/ti-msgmgr.c snprintf(qinst->name, sizeof(qinst->name), "%s %s_%03d", qinst 615 drivers/mailbox/ti-msgmgr.c dev_name(dev), dir, qinst->proxy_id); qinst 617 drivers/mailbox/ti-msgmgr.c qinst->queue_buff_start = inst->queue_proxy_region + qinst 618 drivers/mailbox/ti-msgmgr.c Q_DATA_OFFSET(qinst->proxy_id, qinst->queue_id, qinst 620 drivers/mailbox/ti-msgmgr.c qinst->queue_buff_end = inst->queue_proxy_region + qinst 621 drivers/mailbox/ti-msgmgr.c Q_DATA_OFFSET(qinst->proxy_id, qinst->queue_id, qinst 623 drivers/mailbox/ti-msgmgr.c qinst->queue_state = qinst 625 drivers/mailbox/ti-msgmgr.c Q_STATE_OFFSET(qinst->queue_id); qinst 626 drivers/mailbox/ti-msgmgr.c qinst->is_tx = qd->is_tx; qinst 627 drivers/mailbox/ti-msgmgr.c dir = qinst->is_tx ? "tx" : "rx"; qinst 628 drivers/mailbox/ti-msgmgr.c snprintf(qinst->name, sizeof(qinst->name), "%s %s_%03d_%03d", qinst 629 drivers/mailbox/ti-msgmgr.c dev_name(dev), dir, qinst->queue_id, qinst->proxy_id); qinst 632 drivers/mailbox/ti-msgmgr.c qinst->chan = chan; qinst 635 drivers/mailbox/ti-msgmgr.c qinst->irq = -EINVAL; qinst 637 drivers/mailbox/ti-msgmgr.c chan->con_priv = qinst; qinst 640 drivers/mailbox/ti-msgmgr.c idx, qinst->queue_id, qinst->proxy_id, qinst->irq, qinst 641 drivers/mailbox/ti-msgmgr.c qinst->queue_buff_start, qinst->queue_buff_end); qinst 714 drivers/mailbox/ti-msgmgr.c struct ti_queue_inst *qinst; qinst 773 drivers/mailbox/ti-msgmgr.c qinst = devm_kcalloc(dev, queue_count, sizeof(*qinst), GFP_KERNEL); qinst 774 drivers/mailbox/ti-msgmgr.c if (!qinst) qinst 776 drivers/mailbox/ti-msgmgr.c inst->qinsts = qinst; qinst 787 drivers/mailbox/ti-msgmgr.c for (i = 0; i < queue_count; i++, qinst++, chans++) { qinst 791 drivers/mailbox/ti-msgmgr.c desc, &sproxy_desc, qinst, qinst 799 drivers/mailbox/ti-msgmgr.c i < queue_count; i++, qinst++, chans++, queue_desc++) { qinst 801 drivers/mailbox/ti-msgmgr.c desc, queue_desc, qinst,