imx-sdma.c (87a0b2fafc09766d8c55461a18345a1cfb10a7fe) | imx-sdma.c (5b215c28b923539a04587b6a3f78a449f967ae32) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2// 3// drivers/dma/imx-sdma.c 4// 5// This file contains a driver for the Freescale Smart DMA engine 6// 7// Copyright 2010 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> 8// --- 687 unchanged lines hidden (view full) --- 696 697 writel_relaxed(evt, sdma->regs + SDMA_H_EVTOVR); 698 writel_relaxed(mcu, sdma->regs + SDMA_H_HOSTOVR); 699 writel_relaxed(dsp, sdma->regs + SDMA_H_DSPOVR); 700 701 return 0; 702} 703 | 1// SPDX-License-Identifier: GPL-2.0+ 2// 3// drivers/dma/imx-sdma.c 4// 5// This file contains a driver for the Freescale Smart DMA engine 6// 7// Copyright 2010 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> 8// --- 687 unchanged lines hidden (view full) --- 696 697 writel_relaxed(evt, sdma->regs + SDMA_H_EVTOVR); 698 writel_relaxed(mcu, sdma->regs + SDMA_H_HOSTOVR); 699 writel_relaxed(dsp, sdma->regs + SDMA_H_DSPOVR); 700 701 return 0; 702} 703 |
704static int is_sdma_channel_enabled(struct sdma_engine *sdma, int channel) 705{ 706 return !!(readl(sdma->regs + SDMA_H_STATSTOP) & BIT(channel)); 707} 708 |
|
704static void sdma_enable_channel(struct sdma_engine *sdma, int channel) 705{ 706 writel(BIT(channel), sdma->regs + SDMA_H_START); 707} 708 709/* 710 * sdma_run_channel0 - run a channel and wait till it's done 711 */ --- 143 unchanged lines hidden (view full) --- 855 */ 856 spin_unlock(&sdmac->vc.lock); 857 dmaengine_desc_get_callback_invoke(&desc->vd.tx, NULL); 858 spin_lock(&sdmac->vc.lock); 859 860 if (error) 861 sdmac->status = old_status; 862 } | 709static void sdma_enable_channel(struct sdma_engine *sdma, int channel) 710{ 711 writel(BIT(channel), sdma->regs + SDMA_H_START); 712} 713 714/* 715 * sdma_run_channel0 - run a channel and wait till it's done 716 */ --- 143 unchanged lines hidden (view full) --- 860 */ 861 spin_unlock(&sdmac->vc.lock); 862 dmaengine_desc_get_callback_invoke(&desc->vd.tx, NULL); 863 spin_lock(&sdmac->vc.lock); 864 865 if (error) 866 sdmac->status = old_status; 867 } |
868 869 /* 870 * SDMA stops cyclic channel when DMA request triggers a channel and no SDMA 871 * owned buffer is available (i.e. BD_DONE was set too late). 872 */ 873 if (!is_sdma_channel_enabled(sdmac->sdma, sdmac->channel)) { 874 dev_warn(sdmac->sdma->dev, "restart cyclic channel %d\n", sdmac->channel); 875 sdma_enable_channel(sdmac->sdma, sdmac->channel); 876 } |
|
863} 864 865static void mxc_sdma_handle_channel_normal(struct sdma_channel *data) 866{ 867 struct sdma_channel *sdmac = (struct sdma_channel *) data; 868 struct sdma_buffer_descriptor *bd; 869 int i, error = 0; 870 --- 1400 unchanged lines hidden --- | 877} 878 879static void mxc_sdma_handle_channel_normal(struct sdma_channel *data) 880{ 881 struct sdma_channel *sdmac = (struct sdma_channel *) data; 882 struct sdma_buffer_descriptor *bd; 883 int i, error = 0; 884 --- 1400 unchanged lines hidden --- |