summaryrefslogtreecommitdiff
path: root/include/linux/soc/ti
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2020-10-25 12:10:22 -0700
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>2020-11-01 19:38:05 -0800
commit8c42379e40e2db4199ceeb6a6ef9fff73ff132cf (patch)
treefd84ec35b865247680f382872e69a71da3644a3d /include/linux/soc/ti
parentfed7552f1e69296461fca62ebaa0bb5a06fec0df (diff)
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>
Diffstat (limited to 'include/linux/soc/ti')
-rw-r--r--include/linux/soc/ti/k3-ringacc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/soc/ti/k3-ringacc.h b/include/linux/soc/ti/k3-ringacc.h
index 5a472eca5ee4..658dc71d2901 100644
--- a/include/linux/soc/ti/k3-ringacc.h
+++ b/include/linux/soc/ti/k3-ringacc.h
@@ -67,6 +67,9 @@ struct k3_ring;
* few times. It's usable when the same ring is used as Free Host PD ring
* for different flows, for example.
* Note: Locking should be done by consumer if required
+ * @dma_dev: Master device which is using and accessing to the ring
+ * memory when the mode is K3_RINGACC_RING_MODE_RING. Memory allocations
+ * should be done using this device.
*/
struct k3_ring_cfg {
u32 size;
@@ -74,6 +77,8 @@ struct k3_ring_cfg {
enum k3_ring_mode mode;
#define K3_RINGACC_RING_SHARED BIT(1)
u32 flags;
+
+ struct device *dma_dev;
};
#define K3_RINGACC_RING_ID_ANY (-1)