1
0
Fork 0

mailbox: Allow multiple controllers per device

Look through the whole controller list when mapping device tree
phandles to controllers instead of stopping at the first one.

Each controller is intended to only contain one kind of mailbox,
but some devices (like Tegra HSP) implement multiple kinds and use
the same device tree node for all of them. As such, we need to allow
multiple mbox_controllers per device tree node.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
hifive-unleashed-5.1
Mikko Perttunen 2018-11-28 10:54:11 +01:00 committed by Jassi Brar
parent a8803d7421
commit 8ed82e2387
1 changed files with 2 additions and 1 deletions

View File

@ -355,7 +355,8 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index)
list_for_each_entry(mbox, &mbox_cons, node)
if (mbox->dev->of_node == spec.np) {
chan = mbox->of_xlate(mbox, &spec);
break;
if (!IS_ERR(chan))
break;
}
of_node_put(spec.np);