Lines Matching refs:sst
159 static void sst_byt_dump_shim(struct sst_dsp *sst) in sst_byt_dump_shim() argument
165 reg = sst_dsp_shim_read64_unlocked(sst, i); in sst_byt_dump_shim()
167 dev_dbg(sst->dev, "shim 0x%2.2x value 0x%16.16llx\n", in sst_byt_dump_shim()
172 reg = readl(sst->addr.pci_cfg + i); in sst_byt_dump_shim()
174 dev_dbg(sst->dev, "pci 0x%2.2x value 0x%8.8x\n", in sst_byt_dump_shim()
181 struct sst_dsp *sst = (struct sst_dsp *) context; in sst_byt_irq() local
185 spin_lock(&sst->spinlock); in sst_byt_irq()
187 isrx = sst_dsp_shim_read64_unlocked(sst, SST_ISRX); in sst_byt_irq()
190 sst_dsp_shim_update_bits64_unlocked(sst, SST_IPCX, in sst_byt_irq()
196 sst_dsp_shim_update_bits64_unlocked(sst, SST_IMRX, in sst_byt_irq()
202 spin_unlock(&sst->spinlock); in sst_byt_irq()
207 static void sst_byt_boot(struct sst_dsp *sst) in sst_byt_boot() argument
215 memcpy_toio(sst->addr.lpe + SST_BYT_MAILBOX_OFFSET, in sst_byt_boot()
216 &sst->pdata->fw_base, sizeof(u32)); in sst_byt_boot()
219 sst_dsp_shim_update_bits64(sst, SST_CSR, SST_BYT_CSR_STALL, 0x0); in sst_byt_boot()
221 if (!(sst_dsp_shim_read64(sst, SST_CSR) & in sst_byt_boot()
227 dev_err(sst->dev, "unable to start DSP\n"); in sst_byt_boot()
228 sst_byt_dump_shim(sst); in sst_byt_boot()
232 static void sst_byt_reset(struct sst_dsp *sst) in sst_byt_reset() argument
235 sst_dsp_shim_update_bits64(sst, SST_CSR, in sst_byt_reset()
242 sst_dsp_shim_update_bits64(sst, SST_CSR, SST_BYT_CSR_RST, 0); in sst_byt_reset()
258 static int sst_byt_resource_map(struct sst_dsp *sst, struct sst_pdata *pdata) in sst_byt_resource_map() argument
260 sst->addr.lpe_base = pdata->lpe_base; in sst_byt_resource_map()
261 sst->addr.lpe = ioremap(pdata->lpe_base, pdata->lpe_size); in sst_byt_resource_map()
262 if (!sst->addr.lpe) in sst_byt_resource_map()
266 sst->addr.pci_cfg = ioremap(pdata->pcicfg_base, pdata->pcicfg_size); in sst_byt_resource_map()
267 if (!sst->addr.pci_cfg) { in sst_byt_resource_map()
268 iounmap(sst->addr.lpe); in sst_byt_resource_map()
273 sst->addr.fw_ext = ioremap(pdata->fw_base, pdata->fw_size); in sst_byt_resource_map()
274 if (!sst->addr.fw_ext) { in sst_byt_resource_map()
275 iounmap(sst->addr.pci_cfg); in sst_byt_resource_map()
276 iounmap(sst->addr.lpe); in sst_byt_resource_map()
281 sst->addr.shim = sst->addr.lpe + sst->addr.shim_offset; in sst_byt_resource_map()
283 sst_dsp_mailbox_init(sst, SST_BYT_MAILBOX_OFFSET + 0x204, in sst_byt_resource_map()
288 sst->irq = pdata->irq; in sst_byt_resource_map()
293 static int sst_byt_init(struct sst_dsp *sst, struct sst_pdata *pdata) in sst_byt_init() argument
300 dev = sst->dev; in sst_byt_init()
302 switch (sst->id) { in sst_byt_init()
306 sst->addr.iram_offset = SST_BYT_IRAM_OFFSET; in sst_byt_init()
307 sst->addr.dram_offset = SST_BYT_DRAM_OFFSET; in sst_byt_init()
308 sst->addr.shim_offset = SST_BYT_SHIM_OFFSET; in sst_byt_init()
315 ret = sst_byt_resource_map(sst, pdata); in sst_byt_init()
321 ret = dma_coerce_mask_and_coherent(sst->dma_dev, DMA_BIT_MASK(32)); in sst_byt_init()
326 sst_dsp_shim_update_bits64(sst, SST_IMRX, 0x3, 0x0); in sst_byt_init()
327 sst_dsp_shim_update_bits64(sst, SST_IMRD, 0x3, 0x0); in sst_byt_init()
336 sst_mem_block_register(sst, offset, size, in sst_byt_init()
337 region[i].type, NULL, j, sst); in sst_byt_init()
345 static void sst_byt_free(struct sst_dsp *sst) in sst_byt_free() argument
347 sst_mem_block_unregister_all(sst); in sst_byt_free()
348 iounmap(sst->addr.lpe); in sst_byt_free()
349 iounmap(sst->addr.pci_cfg); in sst_byt_free()
350 iounmap(sst->addr.fw_ext); in sst_byt_free()