Lines Matching refs:adata
70 int acp_machine_select(struct acp_dev_data *adata) in acp_machine_select() argument
75 size = sizeof(*adata->machines); in acp_machine_select()
76 mach = snd_soc_acpi_find_machine(adata->machines); in acp_machine_select()
78 dev_err(adata->dev, "warning: No matching ASoC machine driver found\n"); in acp_machine_select()
82 adata->mach_dev = platform_device_register_data(adata->dev, mach->drv_name, in acp_machine_select()
84 if (IS_ERR(adata->mach_dev)) in acp_machine_select()
85 dev_warn(adata->dev, "Unable to register Machine device\n"); in acp_machine_select()
93 struct acp_dev_data *adata = data; in i2s_irq_handler() local
94 struct acp_resource *rsrc = adata->rsrc; in i2s_irq_handler()
99 if (!adata) in i2s_irq_handler()
102 if (adata->rsrc->no_of_ctrls == 2) in i2s_irq_handler()
103 ext_intr_stat1 = readl(ACP_EXTERNAL_INTR_STAT(adata, (rsrc->irqp_used - 1))); in i2s_irq_handler()
105 ext_intr_stat = readl(ACP_EXTERNAL_INTR_STAT(adata, rsrc->irqp_used)); in i2s_irq_handler()
107 spin_lock(&adata->acp_lock); in i2s_irq_handler()
108 list_for_each_entry(stream, &adata->stream_list, list) { in i2s_irq_handler()
111 ACP_EXTERNAL_INTR_STAT(adata, rsrc->irqp_used)); in i2s_irq_handler()
115 if (adata->rsrc->no_of_ctrls == 2) { in i2s_irq_handler()
117 writel(stream->irq_bit, ACP_EXTERNAL_INTR_STAT(adata, in i2s_irq_handler()
124 spin_unlock(&adata->acp_lock); in i2s_irq_handler()
131 static void config_pte_for_stream(struct acp_dev_data *adata, struct acp_stream *stream) in config_pte_for_stream() argument
133 struct acp_resource *rsrc = adata->rsrc; in config_pte_for_stream()
143 writel(reg_val | BIT(31), adata->acp_base + pte_reg); in config_pte_for_stream()
144 writel(PAGE_SIZE_4K_ENABLE, adata->acp_base + pte_size); in config_pte_for_stream()
145 writel(0x01, adata->acp_base + ACPAXI2AXI_ATU_CTRL); in config_pte_for_stream()
148 static void config_acp_dma(struct acp_dev_data *adata, struct acp_stream *stream, int size) in config_acp_dma() argument
151 struct acp_resource *rsrc = adata->rsrc; in config_acp_dma()
163 writel(low, adata->acp_base + rsrc->scratch_reg_offset + val); in config_acp_dma()
165 writel(high, adata->acp_base + rsrc->scratch_reg_offset + val + 4); in config_acp_dma()
177 struct acp_dev_data *adata = dev_get_drvdata(dev); in acp_dma_open() local
200 writel(1, ACP_EXTERNAL_INTR_ENB(adata)); in acp_dma_open()
202 spin_lock_irq(&adata->acp_lock); in acp_dma_open()
203 list_add_tail(&stream->list, &adata->stream_list); in acp_dma_open()
204 spin_unlock_irq(&adata->acp_lock); in acp_dma_open()
213 struct acp_dev_data *adata = snd_soc_component_get_drvdata(component); in acp_dma_hw_params() local
218 config_pte_for_stream(adata, stream); in acp_dma_hw_params()
219 config_acp_dma(adata, stream, size); in acp_dma_hw_params()
228 struct acp_dev_data *adata = dev_get_drvdata(dev); in acp_dma_pointer() local
236 bytescount = acp_get_byte_count(adata, stream->dai_id, substream->stream); in acp_dma_pointer()
260 struct acp_dev_data *adata = dev_get_drvdata(dev); in acp_dma_close() local
264 spin_lock_irq(&adata->acp_lock); in acp_dma_close()
266 spin_unlock_irq(&adata->acp_lock); in acp_dma_close()
284 struct acp_dev_data *adata = dev_get_drvdata(dev); in acp_platform_register() local
288 status = devm_request_irq(dev, adata->i2s_irq, i2s_irq_handler, in acp_platform_register()
289 IRQF_SHARED, "ACP_I2S_IRQ", adata); in acp_platform_register()
296 adata->dai_driver, in acp_platform_register()
297 adata->num_dai); in acp_platform_register()
303 INIT_LIST_HEAD(&adata->stream_list); in acp_platform_register()
304 spin_lock_init(&adata->acp_lock); in acp_platform_register()
312 struct acp_dev_data *adata = dev_get_drvdata(dev); in acp_platform_unregister() local
314 if (adata->mach_dev) in acp_platform_unregister()
315 platform_device_unregister(adata->mach_dev); in acp_platform_unregister()