Lines Matching refs:adata

39 static void init_dma_descriptor(struct acp_dev_data *adata)  in init_dma_descriptor()  argument
41 struct snd_sof_dev *sdev = adata->dev; in init_dma_descriptor()
52 static void configure_dma_descriptor(struct acp_dev_data *adata, unsigned short idx, in configure_dma_descriptor() argument
55 struct snd_sof_dev *sdev = adata->dev; in configure_dma_descriptor()
67 static int config_dma_channel(struct acp_dev_data *adata, unsigned int ch, in config_dma_channel() argument
70 struct snd_sof_dev *sdev = adata->dev; in config_dma_channel()
97 static int acpbus_dma_start(struct acp_dev_data *adata, unsigned int ch, in acpbus_dma_start() argument
100 struct snd_sof_dev *sdev = adata->dev; in acpbus_dma_start()
108 configure_dma_descriptor(adata, dscr, dscr_info++); in acpbus_dma_start()
110 ret = config_dma_channel(adata, ch, 0, dscr_count); in acpbus_dma_start()
117 int configure_and_run_dma(struct acp_dev_data *adata, unsigned int src_addr, in configure_and_run_dma() argument
120 struct snd_sof_dev *sdev = adata->dev; in configure_and_run_dma()
126 adata->dscr_info[desc_count].src_addr = src_addr + desc_count * ACP_PAGE_SIZE; in configure_and_run_dma()
127 adata->dscr_info[desc_count].dest_addr = dest_addr + desc_count * ACP_PAGE_SIZE; in configure_and_run_dma()
128 adata->dscr_info[desc_count].tx_cnt.bits.count = ACP_PAGE_SIZE; in configure_and_run_dma()
130 adata->dscr_info[desc_count].tx_cnt.bits.count = dsp_data_size; in configure_and_run_dma()
133 ret = acpbus_dma_start(adata, 0, desc_count, adata->dscr_info); in configure_and_run_dma()
139 memset(&adata->dscr_info[index], 0x00, sizeof(struct dma_descriptor)); in configure_and_run_dma()
150 static int psp_mbox_ready(struct acp_dev_data *adata, bool ack) in psp_mbox_ready() argument
152 struct snd_sof_dev *sdev = adata->dev; in psp_mbox_ready()
158 smn_read(adata->smn_dev, MP0_C2PMSG_114_REG, &data); in psp_mbox_ready()
177 static int psp_send_cmd(struct acp_dev_data *adata, int cmd) in psp_send_cmd() argument
179 struct snd_sof_dev *sdev = adata->dev; in psp_send_cmd()
189 smn_read(adata->smn_dev, MP0_C2PMSG_73_REG, &data); in psp_send_cmd()
200 ret = psp_mbox_ready(adata, 0); in psp_send_cmd()
204 smn_write(adata->smn_dev, MP0_C2PMSG_114_REG, cmd); in psp_send_cmd()
207 smn_write(adata->smn_dev, MP0_C2PMSG_73_REG, data); in psp_send_cmd()
210 ret = psp_mbox_ready(adata, 1); in psp_send_cmd()
215 int configure_and_run_sha_dma(struct acp_dev_data *adata, void *image_addr, in configure_and_run_sha_dma() argument
219 struct snd_sof_dev *sdev = adata->dev; in configure_and_run_sha_dma()
254 ret = psp_send_cmd(adata, MBOX_ACP_SHA_DMA_COMMAND); in configure_and_run_sha_dma()
267 int acp_dma_status(struct acp_dev_data *adata, unsigned char ch) in acp_dma_status() argument
269 struct snd_sof_dev *sdev = adata->dev; in acp_dma_status()
305 struct acp_dev_data *adata = sdev->pdata->hw_pdata; in acp_memory_init() local
310 init_dma_descriptor(adata); in acp_memory_init()
470 struct acp_dev_data *adata; in amd_sof_acp_probe() local
475 adata = devm_kzalloc(sdev->dev, sizeof(struct acp_dev_data), in amd_sof_acp_probe()
477 if (!adata) in amd_sof_acp_probe()
480 adata->dev = sdev; in amd_sof_acp_probe()
490 sdev->pdata->hw_pdata = adata; in amd_sof_acp_probe()
498 adata->smn_dev = pci_get_device(PCI_VENDOR_ID_AMD, chip->host_bridge_id, NULL); in amd_sof_acp_probe()
499 if (!adata->smn_dev) { in amd_sof_acp_probe()
510 pci_dev_put(adata->smn_dev); in amd_sof_acp_probe()
517 pci_dev_put(adata->smn_dev); in amd_sof_acp_probe()
540 struct acp_dev_data *adata = sdev->pdata->hw_pdata; in amd_sof_acp_remove() local
542 if (adata->smn_dev) in amd_sof_acp_remove()
543 pci_dev_put(adata->smn_dev); in amd_sof_acp_remove()