diff options
-rw-r--r-- | arch/arm/plat-omap/dma.c | 6 | ||||
-rw-r--r-- | drivers/dma/omap-dma.c | 7 | ||||
-rw-r--r-- | include/linux/omap-dma.h | 2 |
3 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 01619c2910e3..d4d9a5e62152 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -2000,6 +2000,12 @@ void omap_dma_global_context_restore(void) | |||
2000 | omap_clear_dma(ch); | 2000 | omap_clear_dma(ch); |
2001 | } | 2001 | } |
2002 | 2002 | ||
2003 | struct omap_system_dma_plat_info *omap_get_plat_info(void) | ||
2004 | { | ||
2005 | return p; | ||
2006 | } | ||
2007 | EXPORT_SYMBOL_GPL(omap_get_plat_info); | ||
2008 | |||
2003 | static int omap_system_dma_probe(struct platform_device *pdev) | 2009 | static int omap_system_dma_probe(struct platform_device *pdev) |
2004 | { | 2010 | { |
2005 | int ch, ret = 0; | 2011 | int ch, ret = 0; |
diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index 98034e8c558f..4ac26bf0ad30 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c | |||
@@ -26,11 +26,13 @@ struct omap_dmadev { | |||
26 | spinlock_t lock; | 26 | spinlock_t lock; |
27 | struct tasklet_struct task; | 27 | struct tasklet_struct task; |
28 | struct list_head pending; | 28 | struct list_head pending; |
29 | struct omap_system_dma_plat_info *plat; | ||
29 | }; | 30 | }; |
30 | 31 | ||
31 | struct omap_chan { | 32 | struct omap_chan { |
32 | struct virt_dma_chan vc; | 33 | struct virt_dma_chan vc; |
33 | struct list_head node; | 34 | struct list_head node; |
35 | struct omap_system_dma_plat_info *plat; | ||
34 | 36 | ||
35 | struct dma_slave_config cfg; | 37 | struct dma_slave_config cfg; |
36 | unsigned dma_sig; | 38 | unsigned dma_sig; |
@@ -573,6 +575,7 @@ static int omap_dma_chan_init(struct omap_dmadev *od, int dma_sig) | |||
573 | if (!c) | 575 | if (!c) |
574 | return -ENOMEM; | 576 | return -ENOMEM; |
575 | 577 | ||
578 | c->plat = od->plat; | ||
576 | c->dma_sig = dma_sig; | 579 | c->dma_sig = dma_sig; |
577 | c->vc.desc_free = omap_dma_desc_free; | 580 | c->vc.desc_free = omap_dma_desc_free; |
578 | vchan_init(&c->vc, &od->ddev); | 581 | vchan_init(&c->vc, &od->ddev); |
@@ -605,6 +608,10 @@ static int omap_dma_probe(struct platform_device *pdev) | |||
605 | if (!od) | 608 | if (!od) |
606 | return -ENOMEM; | 609 | return -ENOMEM; |
607 | 610 | ||
611 | od->plat = omap_get_plat_info(); | ||
612 | if (!od->plat) | ||
613 | return -EPROBE_DEFER; | ||
614 | |||
608 | dma_cap_set(DMA_SLAVE, od->ddev.cap_mask); | 615 | dma_cap_set(DMA_SLAVE, od->ddev.cap_mask); |
609 | dma_cap_set(DMA_CYCLIC, od->ddev.cap_mask); | 616 | dma_cap_set(DMA_CYCLIC, od->ddev.cap_mask); |
610 | od->ddev.device_alloc_chan_resources = omap_dma_alloc_chan_resources; | 617 | od->ddev.device_alloc_chan_resources = omap_dma_alloc_chan_resources; |
diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h index 7af25a9c9c51..14742fc2aefe 100644 --- a/include/linux/omap-dma.h +++ b/include/linux/omap-dma.h | |||
@@ -292,6 +292,8 @@ struct omap_system_dma_plat_info { | |||
292 | #define dma_omap15xx() ((dma_omap1() && (d->dev_caps & ENABLE_1510_MODE))) | 292 | #define dma_omap15xx() ((dma_omap1() && (d->dev_caps & ENABLE_1510_MODE))) |
293 | #define dma_omap16xx() ((dma_omap1() && (d->dev_caps & ENABLE_16XX_MODE))) | 293 | #define dma_omap16xx() ((dma_omap1() && (d->dev_caps & ENABLE_16XX_MODE))) |
294 | 294 | ||
295 | extern struct omap_system_dma_plat_info *omap_get_plat_info(void); | ||
296 | |||
295 | extern void omap_set_dma_priority(int lch, int dst_port, int priority); | 297 | extern void omap_set_dma_priority(int lch, int dst_port, int priority); |
296 | extern int omap_request_dma(int dev_id, const char *dev_name, | 298 | extern int omap_request_dma(int dev_id, const char *dev_name, |
297 | void (*callback)(int lch, u16 ch_status, void *data), | 299 | void (*callback)(int lch, u16 ch_status, void *data), |