soc: ti: k3-ringacc: add AM64 DMA rings support.
authorGrygorii Strashko <grygorii.strashko@ti.com>
Tue, 8 Dec 2020 09:04:36 +0000 (11:04 +0200)
committerVinod Koul <vkoul@kernel.org>
Fri, 11 Dec 2020 15:50:09 +0000 (21:20 +0530)
commitd782298c6f6b854452965b56d91616dfb60490c5
treeecb2084422c0fed8141d2a09107f129009183c92
parentfc373e47d72605cc3f5012ddda49d2dca430d51f
soc: ti: k3-ringacc: add AM64 DMA rings support.

The DMAs in AM64 have built in rings compared to AM654/J721e/J7200 where a
separate and generic ringacc is used.

The ring SW interface is similar to ringacc with some major architectural
differences, like

They are part of the DMA (BCDMA or PKTDMA).

They are dual mode rings are modeled as pair of Rings objects which has
common configuration and memory buffer, but separate real-time control
register sets for each direction mem2dev (forward) and dev2mem (reverse).

The ringacc driver must be initialized for DMA rings use with
k3_ringacc_dmarings_init() as it is not an independent device as ringacc
is.

AM64 rings must be requested only using k3_ringacc_request_rings_pair(),
and forward ring must always be initialized/configured. After this any
other Ringacc APIs can be used without any callers changes.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201208090440.31792-17-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soc/ti/k3-ringacc.c
include/linux/soc/ti/k3-ringacc.h