Lines Matching refs:sst_fw

334 struct sst_fw *sst_fw_new(struct sst_dsp *dsp,   in sst_fw_new()
337 struct sst_fw *sst_fw; in sst_fw_new() local
343 sst_fw = kzalloc(sizeof(*sst_fw), GFP_KERNEL); in sst_fw_new()
344 if (sst_fw == NULL) in sst_fw_new()
347 sst_fw->dsp = dsp; in sst_fw_new()
348 sst_fw->private = private; in sst_fw_new()
349 sst_fw->size = fw->size; in sst_fw_new()
352 sst_fw->dma_buf = dma_alloc_coherent(dsp->dma_dev, sst_fw->size, in sst_fw_new()
353 &sst_fw->dmable_fw_paddr, GFP_DMA | GFP_KERNEL); in sst_fw_new()
354 if (!sst_fw->dma_buf) { in sst_fw_new()
356 kfree(sst_fw); in sst_fw_new()
361 memcpy((void *)sst_fw->dma_buf, (void *)fw->data, fw->size); in sst_fw_new()
370 err = dsp->ops->parse_fw(sst_fw); in sst_fw_new()
380 list_add(&sst_fw->list, &dsp->fw_list); in sst_fw_new()
383 return sst_fw; in sst_fw_new()
389 dma_free_coherent(dsp->dma_dev, sst_fw->size, in sst_fw_new()
390 sst_fw->dma_buf, in sst_fw_new()
391 sst_fw->dmable_fw_paddr); in sst_fw_new()
392 sst_fw->dma_buf = NULL; in sst_fw_new()
393 kfree(sst_fw); in sst_fw_new()
398 int sst_fw_reload(struct sst_fw *sst_fw) in sst_fw_reload() argument
400 struct sst_dsp *dsp = sst_fw->dsp; in sst_fw_reload()
406 ret = dsp->ops->parse_fw(sst_fw); in sst_fw_reload()
414 void sst_fw_unload(struct sst_fw *sst_fw) in sst_fw_unload() argument
416 struct sst_dsp *dsp = sst_fw->dsp; in sst_fw_unload()
426 if (module->sst_fw == sst_fw) { in sst_fw_unload()
451 void sst_fw_free(struct sst_fw *sst_fw) in sst_fw_free() argument
453 struct sst_dsp *dsp = sst_fw->dsp; in sst_fw_free()
456 list_del(&sst_fw->list); in sst_fw_free()
459 if (sst_fw->dma_buf) in sst_fw_free()
460 dma_free_coherent(dsp->dma_dev, sst_fw->size, sst_fw->dma_buf, in sst_fw_free()
461 sst_fw->dmable_fw_paddr); in sst_fw_free()
462 kfree(sst_fw); in sst_fw_free()
469 struct sst_fw *sst_fw, *t; in sst_fw_free_all() local
472 list_for_each_entry_safe(sst_fw, t, &dsp->fw_list, list) { in sst_fw_free_all()
474 list_del(&sst_fw->list); in sst_fw_free_all()
475 dma_free_coherent(dsp->dev, sst_fw->size, sst_fw->dma_buf, in sst_fw_free_all()
476 sst_fw->dmable_fw_paddr); in sst_fw_free_all()
477 kfree(sst_fw); in sst_fw_free_all()
484 struct sst_module *sst_module_new(struct sst_fw *sst_fw, in sst_module_new() argument
487 struct sst_dsp *dsp = sst_fw->dsp; in sst_module_new()
496 sst_module->sst_fw = sst_fw; in sst_module_new()
790 struct sst_fw *sst_fw = module->sst_fw; in sst_module_alloc_blocks() local
825 sst_fw->dmable_fw_paddr + module->data_offset, in sst_module_alloc_blocks()