soc: ti: k3-ringacc: Use correct device for allocation in RING mode
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Sun, 25 Oct 2020 19:10:22 +0000 (12:10 -0700)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 2 Nov 2020 03:38:05 +0000 (19:38 -0800)
commit8c42379e40e2db4199ceeb6a6ef9fff73ff132cf
treefd84ec35b865247680f382872e69a71da3644a3d
parentfed7552f1e69296461fca62ebaa0bb5a06fec0df
soc: ti: k3-ringacc: Use correct device for allocation in RING mode

In RING mode the ringacc does not access the ring memory. In this access
mode the ringacc coherency does not have meaning.

If the ring is configured in RING mode, then the ringacc itself will not
access to the ring memory. Only the requester (user) of the ring is going
to read/write to the memory.
Extend the ring configuration parameters with a device pointer to be used
for DMA API when the ring is configured in RING mode.

Extending the ring configuration struct will allow per ring selection of
device to be used for allocation, thus allowing per ring coherency.

To avoid regression, fall back to use the ringacc dev in case the alloc_dev
is not provided.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
drivers/soc/ti/k3-ringacc.c
include/linux/soc/ti/k3-ringacc.h