static void fdma_reset_all(struct fdma *fdma) { fdma_disable_all_channels(fdma); fdma_reset_channels(fdma); /* reset the CPU program counter and all the * instruction pipeline registers */ writel(5, fdma->io_base + fdma->regs.clk_gate); }
static int fdma_driver_remove(struct platform_device *pdev) { struct fdma *fdma = platform_get_drvdata(pdev); fdma_disable_all_channels(fdma); stm_fdma_clk_disable(fdma); iounmap(fdma->io_base); dma_pool_destroy(fdma->llu_pool); free_irq(fdma->irq, fdma); unregister_dmac(&fdma->dma_info); release_resource(fdma->phys_mem); kfree(fdma); return 0; }
static int fdma_suspend_freeze_noirq(struct device *dev) { struct fdma *fdma = dev_get_drvdata(dev); if (fdma->firmware_loaded != 1) return 0; /* * At this point the channel users are already * suspended this makes safe the 'disable_all_channels' * call. * BTW the channels have to be stopped because * we have to avoid any access on memory while * it is in self-refresh */ fdma_disable_all_channels(fdma); stm_fdma_clk_disable(fdma); return 0; }