From a29c239d4b66410ffa8b8448669982e9451992cc Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Tue, 10 Dec 2024 16:55:07 +0200 Subject: [PATCH] xtos: rename DMA_CAP_ usage to SOF_DMA_CAP_ Rename the DMA capability usage with SOF_ prefix across all uses of the XTOS dma.h header. Signed-off-by: Kai Vehmanen --- src/drivers/amd/common/acp_bt_dai.c | 2 +- src/drivers/amd/common/acp_dmic_dai.c | 2 +- src/drivers/amd/rembrandt/acp_hs_dai.c | 2 +- src/drivers/amd/rembrandt/acp_sp_dai.c | 2 +- src/drivers/amd/rembrandt/acp_sw_audio_dai.c | 2 +- src/drivers/amd/renoir/acp_sp_dai.c | 2 +- src/drivers/amd/vangogh/acp_hs_dai.c | 2 +- src/drivers/amd/vangogh/acp_sp_dai.c | 2 +- src/drivers/dw/ssi-spi.c | 4 ++-- src/platform/amd/acp_6_3/lib/dma.c | 12 ++++++------ src/platform/amd/acp_7_0/lib/dma.c | 10 +++++----- src/platform/amd/rembrandt/lib/dma.c | 10 +++++----- src/platform/amd/renoir/lib/dma.c | 6 +++--- src/platform/amd/vangogh/lib/dma.c | 6 +++--- xtos/include/sof/lib/dma.h | 20 ++++++++++---------- 15 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/drivers/amd/common/acp_bt_dai.c b/src/drivers/amd/common/acp_bt_dai.c index 0cb751cbbfe8..7ffbf039af7e 100644 --- a/src/drivers/amd/common/acp_bt_dai.c +++ b/src/drivers/amd/common/acp_bt_dai.c @@ -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, diff --git a/src/drivers/amd/common/acp_dmic_dai.c b/src/drivers/amd/common/acp_dmic_dai.c index bce741cd92d3..b494efbee5aa 100644 --- a/src/drivers/amd/common/acp_dmic_dai.c +++ b/src/drivers/amd/common/acp_dmic_dai.c @@ -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, diff --git a/src/drivers/amd/rembrandt/acp_hs_dai.c b/src/drivers/amd/rembrandt/acp_hs_dai.c index 6b51a1a248e5..37b116dab400 100644 --- a/src/drivers/amd/rembrandt/acp_hs_dai.c +++ b/src/drivers/amd/rembrandt/acp_hs_dai.c @@ -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, diff --git a/src/drivers/amd/rembrandt/acp_sp_dai.c b/src/drivers/amd/rembrandt/acp_sp_dai.c index 800fff08efcd..a008a1739ddc 100644 --- a/src/drivers/amd/rembrandt/acp_sp_dai.c +++ b/src/drivers/amd/rembrandt/acp_sp_dai.c @@ -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, diff --git a/src/drivers/amd/rembrandt/acp_sw_audio_dai.c b/src/drivers/amd/rembrandt/acp_sw_audio_dai.c index 5523a5717d20..d88c10be690d 100644 --- a/src/drivers/amd/rembrandt/acp_sw_audio_dai.c +++ b/src/drivers/amd/rembrandt/acp_sw_audio_dai.c @@ -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, diff --git a/src/drivers/amd/renoir/acp_sp_dai.c b/src/drivers/amd/renoir/acp_sp_dai.c index 26932d00044a..b72104c8ef90 100644 --- a/src/drivers/amd/renoir/acp_sp_dai.c +++ b/src/drivers/amd/renoir/acp_sp_dai.c @@ -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, diff --git a/src/drivers/amd/vangogh/acp_hs_dai.c b/src/drivers/amd/vangogh/acp_hs_dai.c index 13c72f5f65ef..0b199a30a824 100644 --- a/src/drivers/amd/vangogh/acp_hs_dai.c +++ b/src/drivers/amd/vangogh/acp_hs_dai.c @@ -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, diff --git a/src/drivers/amd/vangogh/acp_sp_dai.c b/src/drivers/amd/vangogh/acp_sp_dai.c index 04754d2f82aa..512888716df9 100644 --- a/src/drivers/amd/vangogh/acp_sp_dai.c +++ b/src/drivers/amd/vangogh/acp_sp_dai.c @@ -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, diff --git a/src/drivers/dw/ssi-spi.c b/src/drivers/dw/ssi-spi.c index 2ed54fe8ceee..465f8605893e 100644 --- a/src/drivers/dw/ssi-spi.c +++ b/src/drivers/dw/ssi-spi.c @@ -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; diff --git a/src/platform/amd/acp_6_3/lib/dma.c b/src/platform/amd/acp_6_3/lib/dma.c index 01da5ce0b528..c2a9ee7295c3 100644 --- a/src/platform/amd/acp_6_3/lib/dma.c +++ b/src/platform/amd/acp_6_3/lib/dma.c @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, diff --git a/src/platform/amd/acp_7_0/lib/dma.c b/src/platform/amd/acp_7_0/lib/dma.c index 9d840c3f5a6c..10efd8232ab6 100644 --- a/src/platform/amd/acp_7_0/lib/dma.c +++ b/src/platform/amd/acp_7_0/lib/dma.c @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, diff --git a/src/platform/amd/rembrandt/lib/dma.c b/src/platform/amd/rembrandt/lib/dma.c index d739e77bad1b..1f8c1ee456fd 100644 --- a/src/platform/amd/rembrandt/lib/dma.c +++ b/src/platform/amd/rembrandt/lib/dma.c @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, diff --git a/src/platform/amd/renoir/lib/dma.c b/src/platform/amd/renoir/lib/dma.c index e6c75bee3905..999ecb334b96 100644 --- a/src/platform/amd/renoir/lib/dma.c +++ b/src/platform/amd/renoir/lib/dma.c @@ -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, @@ -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, @@ -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, diff --git a/src/platform/amd/vangogh/lib/dma.c b/src/platform/amd/vangogh/lib/dma.c index cd764542dcfa..584281f0a372 100644 --- a/src/platform/amd/vangogh/lib/dma.c +++ b/src/platform/amd/vangogh/lib/dma.c @@ -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, @@ -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, @@ -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, diff --git a/xtos/include/sof/lib/dma.h b/xtos/include/sof/lib/dma.h index fdf359f3ac7a..09b3697d16b1 100644 --- a/xtos/include/sof/lib/dma.h +++ b/xtos/include/sof/lib/dma.h @@ -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 */