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>
This commit is contained in:
parent
a8803d7421
commit
8ed82e2387
|
@ -355,7 +355,8 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index)
|
||||||
list_for_each_entry(mbox, &mbox_cons, node)
|
list_for_each_entry(mbox, &mbox_cons, node)
|
||||||
if (mbox->dev->of_node == spec.np) {
|
if (mbox->dev->of_node == spec.np) {
|
||||||
chan = mbox->of_xlate(mbox, &spec);
|
chan = mbox->of_xlate(mbox, &spec);
|
||||||
break;
|
if (!IS_ERR(chan))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
of_node_put(spec.np);
|
of_node_put(spec.np);
|
||||||
|
|
Loading…
Reference in New Issue