Lines Matching refs:acp_base

55 	val = rn_readl(rn_pdm_data->acp_base + ACP_EXTERNAL_INTR_STAT);  in pdm_irq_handler()
57 rn_writel(BIT(PDM_DMA_STAT), rn_pdm_data->acp_base + in pdm_irq_handler()
72 void __iomem *acp_base) in init_pdm_ring_buffer() argument
74 rn_writel(physical_addr, acp_base + ACP_WOV_RX_RINGBUFADDR); in init_pdm_ring_buffer()
75 rn_writel(buffer_size, acp_base + ACP_WOV_RX_RINGBUFSIZE); in init_pdm_ring_buffer()
76 rn_writel(watermark_size, acp_base + ACP_WOV_RX_INTR_WATERMARK_SIZE); in init_pdm_ring_buffer()
77 rn_writel(0x01, acp_base + ACPAXI2AXI_ATU_CTRL); in init_pdm_ring_buffer()
80 static void enable_pdm_clock(void __iomem *acp_base) in enable_pdm_clock() argument
86 rn_writel(pdm_clk_enable, acp_base + ACP_WOV_CLK_CTRL); in enable_pdm_clock()
87 pdm_ctrl = rn_readl(acp_base + ACP_WOV_MISC_CTRL); in enable_pdm_clock()
90 rn_writel(pdm_ctrl, acp_base + ACP_WOV_MISC_CTRL); in enable_pdm_clock()
93 static void enable_pdm_interrupts(void __iomem *acp_base) in enable_pdm_interrupts() argument
97 ext_int_ctrl = rn_readl(acp_base + ACP_EXTERNAL_INTR_CNTL); in enable_pdm_interrupts()
99 rn_writel(ext_int_ctrl, acp_base + ACP_EXTERNAL_INTR_CNTL); in enable_pdm_interrupts()
102 static void disable_pdm_interrupts(void __iomem *acp_base) in disable_pdm_interrupts() argument
106 ext_int_ctrl = rn_readl(acp_base + ACP_EXTERNAL_INTR_CNTL); in disable_pdm_interrupts()
108 rn_writel(ext_int_ctrl, acp_base + ACP_EXTERNAL_INTR_CNTL); in disable_pdm_interrupts()
111 static bool check_pdm_dma_status(void __iomem *acp_base) in check_pdm_dma_status() argument
117 pdm_enable = rn_readl(acp_base + ACP_WOV_PDM_ENABLE); in check_pdm_dma_status()
118 pdm_dma_enable = rn_readl(acp_base + ACP_WOV_PDM_DMA_ENABLE); in check_pdm_dma_status()
125 static int start_pdm_dma(void __iomem *acp_base) in start_pdm_dma() argument
134 enable_pdm_clock(acp_base); in start_pdm_dma()
135 rn_writel(pdm_enable, acp_base + ACP_WOV_PDM_ENABLE); in start_pdm_dma()
136 rn_writel(pdm_dma_enable, acp_base + ACP_WOV_PDM_DMA_ENABLE); in start_pdm_dma()
139 pdm_dma_enable = rn_readl(acp_base + ACP_WOV_PDM_DMA_ENABLE); in start_pdm_dma()
147 static int stop_pdm_dma(void __iomem *acp_base) in stop_pdm_dma() argument
152 pdm_enable = rn_readl(acp_base + ACP_WOV_PDM_ENABLE); in stop_pdm_dma()
153 pdm_dma_enable = rn_readl(acp_base + ACP_WOV_PDM_DMA_ENABLE); in stop_pdm_dma()
156 rn_writel(pdm_dma_enable, acp_base + ACP_WOV_PDM_DMA_ENABLE); in stop_pdm_dma()
159 pdm_dma_enable = rn_readl(acp_base + in stop_pdm_dma()
170 rn_writel(pdm_enable, acp_base + ACP_WOV_PDM_ENABLE); in stop_pdm_dma()
172 rn_writel(0x01, acp_base + ACP_WOV_PDM_FIFO_FLUSH); in stop_pdm_dma()
186 rn_writel(ACP_SRAM_PTE_OFFSET | BIT(31), rtd->acp_base + in config_acp_dma()
188 rn_writel(PAGE_SIZE_4K_ENABLE, rtd->acp_base + in config_acp_dma()
196 rn_writel(low, rtd->acp_base + ACP_SCRATCH_REG_0 + val); in config_acp_dma()
198 rn_writel(high, rtd->acp_base + ACP_SCRATCH_REG_0 + val + 4); in config_acp_dma()
229 enable_pdm_interrupts(adata->acp_base); in acp_pdm_dma_open()
234 pdm_data->acp_base = adata->acp_base; in acp_pdm_dma_open()
255 rtd->acp_base); in acp_pdm_dma_hw_params()
265 rn_readl(rtd->acp_base + in acp_pdm_get_byte_count()
268 rn_readl(rtd->acp_base + in acp_pdm_get_byte_count()
305 disable_pdm_interrupts(adata->acp_base); in acp_pdm_dma_close()
331 rn_writel(ch_mask, rtd->acp_base + ACP_WOV_PDM_NO_OF_CHANNELS); in acp_pdm_dai_trigger()
332 rn_writel(PDM_DECIMATION_FACTOR, rtd->acp_base + in acp_pdm_dai_trigger()
336 pdm_status = check_pdm_dma_status(rtd->acp_base); in acp_pdm_dai_trigger()
338 ret = start_pdm_dma(rtd->acp_base); in acp_pdm_dai_trigger()
343 pdm_status = check_pdm_dma_status(rtd->acp_base); in acp_pdm_dai_trigger()
345 ret = stop_pdm_dma(rtd->acp_base); in acp_pdm_dai_trigger()
404 adata->acp_base = devm_ioremap(&pdev->dev, res->start, in acp_pdm_audio_probe()
406 if (!adata->acp_base) in acp_pdm_audio_probe()
459 adata->acp_base); in acp_pdm_resume()
461 enable_pdm_interrupts(adata->acp_base); in acp_pdm_resume()
470 disable_pdm_interrupts(adata->acp_base); in acp_pdm_runtime_suspend()
480 enable_pdm_interrupts(adata->acp_base); in acp_pdm_runtime_resume()