mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave dmaengine fixes from Vinod Koul: "Here are the fixes in dmaengine subsystem for rc2: - privatecnt fix for slave dma request API by Christopher - warn fix for PM ifdef in usb-dmac by Geert - fix hardware dependency for xgene by Jean" * 'next' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: increment privatecnt when using dma_get_any_slave_channel dmaengine: xgene: Set hardware dependency dmaengine: usb-dmac: Protect PM-only functions to kill warning
This commit is contained in:
commit
3333222484
3 changed files with 7 additions and 0 deletions
|
@ -437,6 +437,7 @@ config IMG_MDC_DMA
|
||||||
|
|
||||||
config XGENE_DMA
|
config XGENE_DMA
|
||||||
tristate "APM X-Gene DMA support"
|
tristate "APM X-Gene DMA support"
|
||||||
|
depends on ARCH_XGENE || COMPILE_TEST
|
||||||
select DMA_ENGINE
|
select DMA_ENGINE
|
||||||
select DMA_ENGINE_RAID
|
select DMA_ENGINE_RAID
|
||||||
select ASYNC_TX_ENABLE_CHANNEL_SWITCH
|
select ASYNC_TX_ENABLE_CHANNEL_SWITCH
|
||||||
|
|
|
@ -571,11 +571,15 @@ struct dma_chan *dma_get_any_slave_channel(struct dma_device *device)
|
||||||
|
|
||||||
chan = private_candidate(&mask, device, NULL, NULL);
|
chan = private_candidate(&mask, device, NULL, NULL);
|
||||||
if (chan) {
|
if (chan) {
|
||||||
|
dma_cap_set(DMA_PRIVATE, device->cap_mask);
|
||||||
|
device->privatecnt++;
|
||||||
err = dma_chan_get(chan);
|
err = dma_chan_get(chan);
|
||||||
if (err) {
|
if (err) {
|
||||||
pr_debug("%s: failed to get %s: (%d)\n",
|
pr_debug("%s: failed to get %s: (%d)\n",
|
||||||
__func__, dma_chan_name(chan), err);
|
__func__, dma_chan_name(chan), err);
|
||||||
chan = NULL;
|
chan = NULL;
|
||||||
|
if (--device->privatecnt == 0)
|
||||||
|
dma_cap_clear(DMA_PRIVATE, device->cap_mask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -673,6 +673,7 @@ static struct dma_chan *usb_dmac_of_xlate(struct of_phandle_args *dma_spec,
|
||||||
* Power management
|
* Power management
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef CONFIG_PM
|
||||||
static int usb_dmac_runtime_suspend(struct device *dev)
|
static int usb_dmac_runtime_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct usb_dmac *dmac = dev_get_drvdata(dev);
|
struct usb_dmac *dmac = dev_get_drvdata(dev);
|
||||||
|
@ -690,6 +691,7 @@ static int usb_dmac_runtime_resume(struct device *dev)
|
||||||
|
|
||||||
return usb_dmac_init(dmac);
|
return usb_dmac_init(dmac);
|
||||||
}
|
}
|
||||||
|
#endif /* CONFIG_PM */
|
||||||
|
|
||||||
static const struct dev_pm_ops usb_dmac_pm = {
|
static const struct dev_pm_ops usb_dmac_pm = {
|
||||||
SET_RUNTIME_PM_OPS(usb_dmac_runtime_suspend, usb_dmac_runtime_resume,
|
SET_RUNTIME_PM_OPS(usb_dmac_runtime_suspend, usb_dmac_runtime_resume,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue