Skip to content

Commit

Permalink
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Browse files Browse the repository at this point in the history
Pull slave-dmaengine fixes from Vinod Koul:
 "Back from long weekend here in India and now the time to send fixes
  for slave dmaengine.
   - Dan's fix of sirf xlate code
   - Jean's fix for timberland
   - edma fixes by Sekhar for SG handling and Yuan for changing init
     call"

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dma: fix eDMA driver as a subsys_initcall
  dmaengine: sirf: off by one in of_dma_sirfsoc_xlate()
  platform: Fix timberdale dependencies
  dma: edma: fix incorrect SG list handling
  • Loading branch information
torvalds committed Apr 20, 2014
2 parents 5269519 + 8edc51c commit 372feac
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/dma/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ config AMCC_PPC440SPE_ADMA

config TIMB_DMA
tristate "Timberdale FPGA DMA support"
depends on MFD_TIMBERDALE || HAS_IOMEM
depends on MFD_TIMBERDALE
select DMA_ENGINE
help
Enable support for the Timberdale FPGA DMA engine.
Expand Down
6 changes: 4 additions & 2 deletions drivers/dma/edma.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,13 @@ static void edma_execute(struct edma_chan *echan)
echan->ecc->dummy_slot);
}

edma_resume(echan->ch_num);

if (edesc->processed <= MAX_NR_SG) {
dev_dbg(dev, "first transfer starting %d\n", echan->ch_num);
edma_start(echan->ch_num);
} else {
dev_dbg(dev, "chan: %d: completed %d elements, resuming\n",
echan->ch_num, edesc->processed);
edma_resume(echan->ch_num);
}

/*
Expand Down
12 changes: 11 additions & 1 deletion drivers/dma/fsl-edma.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,17 @@ static struct platform_driver fsl_edma_driver = {
.remove = fsl_edma_remove,
};

module_platform_driver(fsl_edma_driver);
static int __init fsl_edma_init(void)
{
return platform_driver_register(&fsl_edma_driver);
}
subsys_initcall(fsl_edma_init);

static void __exit fsl_edma_exit(void)
{
platform_driver_unregister(&fsl_edma_driver);
}
module_exit(fsl_edma_exit);

MODULE_ALIAS("platform:fsl-edma");
MODULE_DESCRIPTION("Freescale eDMA engine driver");
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/sirf-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ static struct dma_chan *of_dma_sirfsoc_xlate(struct of_phandle_args *dma_spec,
struct sirfsoc_dma *sdma = ofdma->of_dma_data;
unsigned int request = dma_spec->args[0];

if (request > SIRFSOC_DMA_CHANNELS)
if (request >= SIRFSOC_DMA_CHANNELS)
return NULL;

return dma_get_slave_channel(&sdma->channels[request].chan);
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ config VIDEO_VIU

config VIDEO_TIMBERDALE
tristate "Support for timberdale Video In/LogiWIN"
depends on VIDEO_V4L2 && I2C && DMADEVICES
depends on MFD_TIMBERDALE && VIDEO_V4L2 && I2C && DMADEVICES
select DMA_ENGINE
select TIMB_DMA
select VIDEO_ADV7180
Expand Down

0 comments on commit 372feac

Please sign in to comment.