Lines Matching refs:acp_base

117 static void acp63_enable_disable_sdw_dma_interrupts(void __iomem *acp_base, bool enable)  in acp63_enable_disable_sdw_dma_interrupts()  argument
124 ext_intr_cntl = readl(acp_base + ACP_EXTERNAL_INTR_CNTL); in acp63_enable_disable_sdw_dma_interrupts()
126 writel(ext_intr_cntl, acp_base + ACP_EXTERNAL_INTR_CNTL); in acp63_enable_disable_sdw_dma_interrupts()
127 ext_intr_cntl1 = readl(acp_base + ACP_EXTERNAL_INTR_CNTL1); in acp63_enable_disable_sdw_dma_interrupts()
129 writel(ext_intr_cntl1, acp_base + ACP_EXTERNAL_INTR_CNTL1); in acp63_enable_disable_sdw_dma_interrupts()
131 ext_intr_cntl = readl(acp_base + ACP_EXTERNAL_INTR_CNTL); in acp63_enable_disable_sdw_dma_interrupts()
133 writel(ext_intr_cntl, acp_base + ACP_EXTERNAL_INTR_CNTL); in acp63_enable_disable_sdw_dma_interrupts()
134 ext_intr_cntl1 = readl(acp_base + ACP_EXTERNAL_INTR_CNTL1); in acp63_enable_disable_sdw_dma_interrupts()
136 writel(ext_intr_cntl1, acp_base + ACP_EXTERNAL_INTR_CNTL1); in acp63_enable_disable_sdw_dma_interrupts()
140 static void acp63_config_dma(struct acp_sdw_dma_stream *stream, void __iomem *acp_base, in acp63_config_dma() argument
153 writel(ACP_SDW_SRAM_PTE_OFFSET | BIT(31), acp_base + ACPAXI2AXI_ATU_BASE_ADDR_GRP_2); in acp63_config_dma()
154 writel(PAGE_SIZE_4K_ENABLE, acp_base + ACPAXI2AXI_ATU_PAGE_SIZE_GRP_2); in acp63_config_dma()
160 writel(low, acp_base + ACP_SCRATCH_REG_0 + val); in acp63_config_dma()
162 writel(high, acp_base + ACP_SCRATCH_REG_0 + val + 4); in acp63_config_dma()
166 writel(0x1, acp_base + ACPAXI2AXI_ATU_CTRL); in acp63_config_dma()
169 static int acp63_configure_sdw_ringbuffer(void __iomem *acp_base, u32 stream_id, u32 size, in acp63_configure_sdw_ringbuffer() argument
206 writel(sdw_ring_buf_size, acp_base + reg_ring_buf_size); in acp63_configure_sdw_ringbuffer()
207 writel(sdw_ring_buf_addr, acp_base + reg_ring_buf_addr); in acp63_configure_sdw_ringbuffer()
208 writel(sdw_fifo_addr, acp_base + reg_fifo_addr); in acp63_configure_sdw_ringbuffer()
209 writel(SDW_DMA_SIZE, acp_base + reg_dma_size); in acp63_configure_sdw_ringbuffer()
210 writel(SDW_FIFO_SIZE, acp_base + reg_fifo_size); in acp63_configure_sdw_ringbuffer()
291 acp63_config_dma(stream, sdw_data->acp_base, stream_id); in acp63_sdw_dma_hw_params()
292 ret = acp63_configure_sdw_ringbuffer(sdw_data->acp_base, stream_id, size, in acp63_sdw_dma_hw_params()
298 ext_intr_ctrl = readl(sdw_data->acp_base + acp_ext_intr_cntl_reg); in acp63_sdw_dma_hw_params()
300 writel(ext_intr_ctrl, sdw_data->acp_base + acp_ext_intr_cntl_reg); in acp63_sdw_dma_hw_params()
301 writel(period_bytes, sdw_data->acp_base + water_mark_size_reg); in acp63_sdw_dma_hw_params()
305 static u64 acp63_sdw_get_byte_count(struct acp_sdw_dma_stream *stream, void __iomem *acp_base) in acp63_sdw_get_byte_count() argument
324 byte_count.bcount.high = readl(acp_base + pos_high_reg); in acp63_sdw_get_byte_count()
325 byte_count.bcount.low = readl(acp_base + pos_low_reg); in acp63_sdw_get_byte_count()
343 bytescount = acp63_sdw_get_byte_count(stream, sdw_data->acp_base); in acp63_sdw_dma_pointer()
385 void __iomem *acp_base, bool sdw_dma_enable) in acp63_sdw_dma_enable() argument
408 writel(dma_enable, acp_base + sdw_dma_en_reg); in acp63_sdw_dma_enable()
409 return readl_poll_timeout(acp_base + sdw_dma_en_stat_reg, sdw_dma_stat, in acp63_sdw_dma_enable()
425 ret = acp63_sdw_dma_enable(substream, sdw_data->acp_base, true); in acp63_sdw_dma_trigger()
430 ret = acp63_sdw_dma_enable(substream, sdw_data->acp_base, false); in acp63_sdw_dma_trigger()
470 sdw_data->acp_base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); in acp63_sdw_platform_probe()
471 if (!sdw_data->acp_base) in acp63_sdw_platform_probe()
527 acp63_config_dma(stream, sdw_data->acp_base, index); in acp_restore_sdw_dma_config()
528 ret = acp63_configure_sdw_ringbuffer(sdw_data->acp_base, index, in acp_restore_sdw_dma_config()
532 writel(period_bytes, sdw_data->acp_base + water_mark_size_reg); in acp_restore_sdw_dma_config()
536 acp63_enable_disable_sdw_dma_interrupts(sdw_data->acp_base, true); in acp_restore_sdw_dma_config()