aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/fsldma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/fsldma.c')
-rw-r--r--drivers/dma/fsldma.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index b3f3e90054f2..4e898121707b 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -1253,7 +1253,9 @@ static int fsl_dma_chan_probe(struct fsldma_device *fdev,
1253 WARN_ON(fdev->feature != chan->feature); 1253 WARN_ON(fdev->feature != chan->feature);
1254 1254
1255 chan->dev = fdev->dev; 1255 chan->dev = fdev->dev;
1256 chan->id = ((res.start - 0x100) & 0xfff) >> 7; 1256 chan->id = (res.start & 0xfff) < 0x300 ?
1257 ((res.start - 0x100) & 0xfff) >> 7 :
1258 ((res.start - 0x200) & 0xfff) >> 7;
1257 if (chan->id >= FSL_DMA_MAX_CHANS_PER_DEVICE) { 1259 if (chan->id >= FSL_DMA_MAX_CHANS_PER_DEVICE) {
1258 dev_err(fdev->dev, "too many channels for device\n"); 1260 dev_err(fdev->dev, "too many channels for device\n");
1259 err = -EINVAL; 1261 err = -EINVAL;
@@ -1426,6 +1428,7 @@ static int fsldma_of_remove(struct platform_device *op)
1426} 1428}
1427 1429
1428static const struct of_device_id fsldma_of_ids[] = { 1430static const struct of_device_id fsldma_of_ids[] = {
1431 { .compatible = "fsl,elo3-dma", },
1429 { .compatible = "fsl,eloplus-dma", }, 1432 { .compatible = "fsl,eloplus-dma", },
1430 { .compatible = "fsl,elo-dma", }, 1433 { .compatible = "fsl,elo-dma", },
1431 {} 1434 {}
@@ -1447,7 +1450,7 @@ static struct platform_driver fsldma_of_driver = {
1447 1450
1448static __init int fsldma_init(void) 1451static __init int fsldma_init(void)
1449{ 1452{
1450 pr_info("Freescale Elo / Elo Plus DMA driver\n"); 1453 pr_info("Freescale Elo series DMA driver\n");
1451 return platform_driver_register(&fsldma_of_driver); 1454 return platform_driver_register(&fsldma_of_driver);
1452} 1455}
1453 1456
@@ -1459,5 +1462,5 @@ static void __exit fsldma_exit(void)
1459subsys_initcall(fsldma_init); 1462subsys_initcall(fsldma_init);
1460module_exit(fsldma_exit); 1463module_exit(fsldma_exit);
1461 1464
1462MODULE_DESCRIPTION("Freescale Elo / Elo Plus DMA driver"); 1465MODULE_DESCRIPTION("Freescale Elo series DMA driver");
1463MODULE_LICENSE("GPL"); 1466MODULE_LICENSE("GPL");