diff options
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/imx-sdma.c | 8 | ||||
-rw-r--r-- | drivers/dma/pxp/pxp_dma_v2.c | 25 |
2 files changed, 22 insertions, 11 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 9048f469337f..bee75e8c85c5 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -358,7 +358,7 @@ void __iomem *sdma_iram_malloc(size_t size, unsigned long *buf) return sdma_iram_phys_to_virt(*buf); } -void sdma_iram_free(unsigned long *buf, u32 size) +void sdma_iram_free(unsigned long buf, size_t size) { if (!sdma_iram_pool) return; @@ -449,7 +449,7 @@ static int sdma_load_script(struct sdma_engine *sdma, void *buf, int size, int ret; #ifdef CONFIG_SDMA_IRAM - buf_virt = sdma_iram_malloc(size, (unsigned long)&buf_phys); + buf_virt = sdma_iram_malloc(size, (unsigned long *)&buf_phys); #else buf_virt = dma_alloc_coherent(NULL, size, @@ -939,7 +939,7 @@ static int sdma_request_channel(struct sdma_channel *sdmac) #ifdef CONFIG_SDMA_IRAM sdmac->bd = sdma_iram_malloc(sizeof(sdmac->bd), - (unsigned long)&sdmac->bd_phys); + (unsigned long *)&sdmac->bd_phys); #else sdmac->bd = dma_alloc_noncached(NULL, PAGE_SIZE, &sdmac->bd_phys, GFP_KERNEL); #endif @@ -1502,7 +1502,7 @@ static int __init sdma_init(struct sdma_engine *sdma) sdma->channel_control = sdma_iram_malloc(MAX_DMA_CHANNELS * sizeof(struct sdma_channel_control) + sizeof(struct sdma_context_data), - &ccb_phys); + (unsigned long *)&ccb_phys); #else sdma->channel_control = dma_alloc_coherent(NULL, MAX_DMA_CHANNELS * sizeof (struct sdma_channel_control) + diff --git a/drivers/dma/pxp/pxp_dma_v2.c b/drivers/dma/pxp/pxp_dma_v2.c index c6098774ecf2..f0b50b7a1c05 100644 --- a/drivers/dma/pxp/pxp_dma_v2.c +++ b/drivers/dma/pxp/pxp_dma_v2.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 Freescale Semiconductor, Inc. + * Copyright (C) 2010-2013 Freescale Semiconductor, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -800,6 +800,8 @@ static void pxp_clk_enable(struct pxps *pxp) } clk_enable(pxp->clk); + /* Pull PxP out of reset */ + __raw_writel(0, pxp->base + HW_PXP_CTRL); pxp->clk_stat = CLK_STAT_ON; mutex_unlock(&pxp->clk_mutex); @@ -818,6 +820,13 @@ static void pxp_clk_disable(struct pxps *pxp) spin_lock_irqsave(&pxp->lock, flags); if ((pxp->pxp_ongoing == 0) && list_empty(&head)) { + /* Put the PXP into reset as the Display MIX is going + * to be Power gated. + */ + while (__raw_readl(pxp->base + HW_PXP_CTRL) + & BM_PXP_CTRL_ENABLE) + ; + __raw_writel(BM_PXP_CTRL_SFTRST, pxp->base + HW_PXP_CTRL); spin_unlock_irqrestore(&pxp->lock, flags); clk_disable(pxp->clk); pxp->clk_stat = CLK_STAT_OFF; @@ -1627,11 +1636,11 @@ static int pxp_suspend(struct platform_device *pdev, pm_message_t state) { struct pxps *pxp = platform_get_drvdata(pdev); + /* Need to call the enable/disable sequence here to + * ensure that the PXP is in the right state before the + * SOC enters suspend state. + */ pxp_clk_enable(pxp); - while (__raw_readl(pxp->base + HW_PXP_CTRL) & BM_PXP_CTRL_ENABLE) - ; - - __raw_writel(BM_PXP_CTRL_SFTRST, pxp->base + HW_PXP_CTRL); pxp_clk_disable(pxp); return 0; @@ -1641,9 +1650,11 @@ static int pxp_resume(struct platform_device *pdev) { struct pxps *pxp = platform_get_drvdata(pdev); + /* Need to call the enable/disable sequence here to + * ensure that the PXP is in the right state after the + * SOC exits suspend state. + */ pxp_clk_enable(pxp); - /* Pull PxP out of reset */ - __raw_writel(0, pxp->base + HW_PXP_CTRL); pxp_clk_disable(pxp); return 0; |