Skip to content

Commit

Permalink
staging: vchiq_arm: children inherit DMA config
Browse files Browse the repository at this point in the history
Although it is no longer necessary for vchiq's children to have a
different DMA configuration to the parent, they do still need to
explicitly to have their DMA configuration set - to be that of the
parent.

Signed-off-by: Phil Elwell <[email protected]>
  • Loading branch information
pelwell authored and popcornmix committed May 19, 2021
1 parent 3a9478a commit 4faff1c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2729,8 +2729,18 @@ vchiq_register_child(struct platform_device *pdev, const char *name)

child->dev.of_node = np;

/*
* We want the dma-ranges etc to be copied from the parent VCHIQ device
* to be passed on to the children without a node of their own.
*/
if (!np)
np = pdev->dev.of_node;

of_dma_configure(&child->dev, np, true);

if (np != pdev->dev.of_node)
of_node_put(np);

return child;
}

Expand Down

0 comments on commit 4faff1c

Please sign in to comment.