Skip to content

Commit

Permalink
xtos: rename DMA_CAP_ usage to SOF_DMA_CAP_
Browse files Browse the repository at this point in the history
Rename the DMA capability usage with SOF_ prefix across all uses
of the XTOS dma.h header.

Signed-off-by: Kai Vehmanen <[email protected]>
  • Loading branch information
kv2019i committed Dec 10, 2024
1 parent bf5a5c4 commit a29c239
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion src/drivers/amd/common/acp_bt_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const struct dai_driver acp_btdai_driver = {
.uid = SOF_UUID(btdai_uuid),
.tctx = &btdai_tr,
.dma_dev = DMA_DEV_BT,
.dma_caps = DMA_CAP_BT,
.dma_caps = SOF_DMA_CAP_BT,
.ops = {
.trigger = btdai_trigger,
.set_config = btdai_set_config,
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/amd/common/acp_dmic_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const struct dai_driver acp_dmic_dai_driver = {
.uid = SOF_UUID(acp_dmic_dai_uuid),
.tctx = &acp_dmic_dai_tr,
.dma_dev = DMA_DEV_DMIC,
.dma_caps = DMA_CAP_DMIC,
.dma_caps = SOF_DMA_CAP_DMIC,
.ops = {
.trigger = acp_dmic_dai_trigger,
.set_config = acp_dmic_dai_set_config,
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/amd/rembrandt/acp_hs_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ const struct dai_driver acp_hsdai_driver = {
.uid = SOF_UUID(hsdai_uuid),
.tctx = &hsdai_tr,
.dma_dev = DMA_DEV_SP,
.dma_caps = DMA_CAP_SP,
.dma_caps = SOF_DMA_CAP_SP,
.ops = {
.trigger = hsdai_trigger,
.set_config = hsdai_set_config,
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/amd/rembrandt/acp_sp_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const struct dai_driver acp_spdai_driver = {
.uid = SOF_UUID(spdai_uuid),
.tctx = &spdai_tr,
.dma_dev = DMA_DEV_SP,
.dma_caps = DMA_CAP_SP,
.dma_caps = SOF_DMA_CAP_SP,
.ops = {
.trigger = spdai_trigger,
.set_config = spdai_set_config,
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/amd/rembrandt/acp_sw_audio_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const struct dai_driver acp_swaudiodai_driver = {
.uid = SOF_UUID(swaudiodai_uuid),
.tctx = &swaudiodai_tr,
.dma_dev = DMA_DEV_SW,
.dma_caps = DMA_CAP_SW,
.dma_caps = SOF_DMA_CAP_SW,
.ops = {
.trigger = swaudiodai_trigger,
.set_config = swaudiodai_set_config,
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/amd/renoir/acp_sp_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const struct dai_driver acp_spdai_driver = {
.uid = SOF_UUID(spdai_uuid),
.tctx = &spdai_tr,
.dma_dev = DMA_DEV_SP,
.dma_caps = DMA_CAP_SP,
.dma_caps = SOF_DMA_CAP_SP,
.ops = {
.trigger = spdai_trigger,
.set_config = spdai_set_config,
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/amd/vangogh/acp_hs_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const struct dai_driver acp_hsdai_driver = {
.uid = SOF_UUID(hsdai_uuid),
.tctx = &hsdai_tr,
.dma_dev = DMA_DEV_HS,
.dma_caps = DMA_CAP_HS,
.dma_caps = SOF_DMA_CAP_HS,
.ops = {
.trigger = hsdai_trigger,
.set_config = hsdai_set_config,
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/amd/vangogh/acp_sp_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const struct dai_driver acp_spdai_driver = {
.uid = SOF_UUID(spdai_uuid),
.tctx = &spdai_tr,
.dma_dev = DMA_DEV_SP,
.dma_caps = DMA_CAP_SP,
.dma_caps = SOF_DMA_CAP_SP,
.ops = {
.trigger = spdai_trigger,
.set_config = spdai_set_config,
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/dw/ssi-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,12 @@ int spi_probe(struct spi *spi)
{
int ret;

spi->dma[SPI_DIR_RX] = dma_get(DMA_DIR_DEV_TO_MEM, DMA_CAP_GP_LP,
spi->dma[SPI_DIR_RX] = dma_get(DMA_DIR_DEV_TO_MEM, SOF_DMA_CAP_GP_LP,
DMA_DEV_SSI, DMA_ACCESS_SHARED);
if (!spi->dma[SPI_DIR_RX])
return -ENODEV;

spi->dma[SPI_DIR_TX] = dma_get(DMA_DIR_MEM_TO_DEV, DMA_CAP_GP_LP,
spi->dma[SPI_DIR_TX] = dma_get(DMA_DIR_MEM_TO_DEV, SOF_DMA_CAP_GP_LP,
DMA_DEV_SSI, DMA_ACCESS_SHARED);
if (!spi->dma[SPI_DIR_TX])
return -ENODEV;
Expand Down
12 changes: 6 additions & 6 deletions src/platform/amd/acp_6_3/lib/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_HS,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_SP,
.caps = DMA_CAP_SP,
.caps = SOF_DMA_CAP_SP,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -58,7 +58,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_SW_AUDIO,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_SW,
.caps = DMA_CAP_SW,
.caps = SOF_DMA_CAP_SW,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -73,7 +73,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_DMIC,
.dir = DMA_DIR_DEV_TO_MEM,
.devs = DMA_DEV_DMIC,
.caps = DMA_CAP_DMIC,
.caps = SOF_DMA_CAP_DMIC,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -87,7 +87,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_SP,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_SP,
.caps = DMA_CAP_SP,
.caps = SOF_DMA_CAP_SP,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -100,7 +100,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_SP_VIRTUAL,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_SP_VIRTUAL,
.caps = DMA_CAP_SP_VIRTUAL,
.caps = SOF_DMA_CAP_SP_VIRTUAL,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -116,7 +116,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_BT,
.caps = DMA_CAP_BT,
.caps = SOF_DMA_CAP_BT,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand Down
10 changes: 5 additions & 5 deletions src/platform/amd/acp_7_0/lib/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_HS,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_SP,
.caps = DMA_CAP_SP,
.caps = SOF_DMA_CAP_SP,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -56,7 +56,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_DMIC,
.dir = DMA_DIR_DEV_TO_MEM,
.devs = DMA_DEV_DMIC,
.caps = DMA_CAP_DMIC,
.caps = SOF_DMA_CAP_DMIC,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -70,7 +70,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_SP,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_SP,
.caps = DMA_CAP_SP,
.caps = SOF_DMA_CAP_SP,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -83,7 +83,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_SP_VIRTUAL,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_SP_VIRTUAL,
.caps = DMA_CAP_SP_VIRTUAL,
.caps = SOF_DMA_CAP_SP_VIRTUAL,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -99,7 +99,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_BT,
.caps = DMA_CAP_BT,
.caps = SOF_DMA_CAP_BT,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand Down
10 changes: 5 additions & 5 deletions src/platform/amd/rembrandt/lib/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_DMIC,
.dir = DMA_DIR_DEV_TO_MEM,
.devs = DMA_DEV_DMIC,
.caps = DMA_CAP_DMIC,
.caps = SOF_DMA_CAP_DMIC,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -55,7 +55,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_HS,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_SP,
.caps = DMA_CAP_SP,
.caps = SOF_DMA_CAP_SP,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -69,7 +69,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_SP,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_SP,
.caps = DMA_CAP_SP,
.caps = SOF_DMA_CAP_SP,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -82,7 +82,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_SP_VIRTUAL,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_SP_VIRTUAL,
.caps = DMA_CAP_SP_VIRTUAL,
.caps = SOF_DMA_CAP_SP_VIRTUAL,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -98,7 +98,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_BT,
.caps = DMA_CAP_BT,
.caps = SOF_DMA_CAP_BT,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand Down
6 changes: 3 additions & 3 deletions src/platform/amd/renoir/lib/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_DMIC,
.dir = DMA_DIR_DEV_TO_MEM,
.devs = DMA_DEV_DMIC,
.caps = DMA_CAP_DMIC,
.caps = SOF_DMA_CAP_DMIC,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -55,7 +55,7 @@ static SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_SP,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_SP,
.caps = DMA_CAP_SP,
.caps = SOF_DMA_CAP_SP,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -69,7 +69,7 @@ static SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_BT,
.caps = DMA_CAP_BT,
.caps = SOF_DMA_CAP_BT,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand Down
6 changes: 3 additions & 3 deletions src/platform/amd/vangogh/lib/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_HS,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_HS,
.caps = DMA_CAP_HS,
.caps = SOF_DMA_CAP_HS,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -55,7 +55,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI_SP,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_SP,
.caps = DMA_CAP_SP,
.caps = SOF_DMA_CAP_SP,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand All @@ -71,7 +71,7 @@ SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
.id = DMA_ID_DAI,
.dir = DMA_DIR_DEV_TO_MEM | DMA_DIR_MEM_TO_DEV,
.devs = DMA_DEV_BT,
.caps = DMA_CAP_BT,
.caps = SOF_DMA_CAP_BT,
.base = DMA0_BASE,
.chan_size = DMA0_SIZE,
.channels = 8,
Expand Down
20 changes: 10 additions & 10 deletions xtos/include/sof/lib/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ struct comp_buffer;
#define DMA_DIR_DEV_TO_DEV BIT(5) /**< dev to dev copy */

/* DMA capabilities bitmasks used to define the type of DMA */
#define DMA_CAP_HDA BIT(0) /**< HDA DMA */
#define DMA_CAP_GP_LP BIT(1) /**< GP LP DMA */
#define DMA_CAP_GP_HP BIT(2) /**< GP HP DMA */
#define DMA_CAP_BT BIT(3) /**< BT DMA */
#define DMA_CAP_SP BIT(4) /**< SP DMA */
#define DMA_CAP_DMIC BIT(5) /**< ACP DMA DMIC > */
#define DMA_CAP_SP_VIRTUAL BIT(6) /**< SP VIRTUAL DMA */
#define DMA_CAP_HS_VIRTUAL BIT(7) /**< HS VIRTUAL DMA */
#define DMA_CAP_HS BIT(8) /**< HS DMA */
#define DMA_CAP_SW BIT(9) /**< SW DMA */
#define SOF_DMA_CAP_HDA BIT(0) /**< HDA DMA */
#define SOF_DMA_CAP_GP_LP BIT(1) /**< GP LP DMA */
#define SOF_DMA_CAP_GP_HP BIT(2) /**< GP HP DMA */
#define SOF_DMA_CAP_BT BIT(3) /**< BT DMA */
#define SOF_DMA_CAP_SP BIT(4) /**< SP DMA */
#define SOF_DMA_CAP_DMIC BIT(5) /**< ACP DMA DMIC > */
#define SOF_DMA_CAP_SP_VIRTUAL BIT(6) /**< SP VIRTUAL DMA */
#define SOF_DMA_CAP_HS_VIRTUAL BIT(7) /**< HS VIRTUAL DMA */
#define SOF_DMA_CAP_HS BIT(8) /**< HS DMA */
#define SOF_DMA_CAP_SW BIT(9) /**< SW DMA */

/* DMA dev type bitmasks used to define the type of DMA */

Expand Down

0 comments on commit a29c239

Please sign in to comment.