Lines Matching defs:channel

32 		struct mbox_chan *channel;
46 static bool tegra186_bpmp_is_message_ready(struct tegra_bpmp_channel *channel)
50 err = tegra_ivc_read_get_next_frame(channel->ivc, &channel->ib);
52 iosys_map_clear(&channel->ib);
59 static bool tegra186_bpmp_is_channel_free(struct tegra_bpmp_channel *channel)
63 err = tegra_ivc_write_get_next_frame(channel->ivc, &channel->ob);
65 iosys_map_clear(&channel->ob);
72 static int tegra186_bpmp_ack_message(struct tegra_bpmp_channel *channel)
74 return tegra_ivc_read_advance(channel->ivc);
77 static int tegra186_bpmp_post_message(struct tegra_bpmp_channel *channel)
79 return tegra_ivc_write_advance(channel->ivc);
87 err = mbox_send_message(priv->mbox.channel, NULL);
91 mbox_client_txdone(priv->mbox.channel, 0);
101 if (WARN_ON(priv->mbox.channel == NULL))
107 static int tegra186_bpmp_channel_init(struct tegra_bpmp_channel *channel,
117 channel->ivc = devm_kzalloc(bpmp->dev, sizeof(*channel->ivc),
119 if (!channel->ivc)
134 err = tegra_ivc_init(channel->ivc, NULL, &rx, priv->rx.phys + offset, &tx,
138 dev_err(bpmp->dev, "failed to setup IVC for channel %u: %d\n",
143 init_completion(&channel->completion);
144 channel->bpmp = bpmp;
149 static void tegra186_bpmp_channel_reset(struct tegra_bpmp_channel *channel)
151 /* reset the channel state */
152 tegra_ivc_reset(channel->ivc);
154 /* sync the channel state with BPMP */
155 while (tegra_ivc_notified(channel->ivc))
159 static void tegra186_bpmp_channel_cleanup(struct tegra_bpmp_channel *channel)
161 tegra_ivc_cleanup(channel->ivc);
347 priv->mbox.channel = mbox_request_channel(&priv->mbox.client, 0);
348 if (IS_ERR(priv->mbox.channel)) {
349 err = PTR_ERR(priv->mbox.channel);
364 mbox_free_channel(priv->mbox.channel);