Reserve channels 0,1,12,13 and
slots 78-109 for dsp use on dm644x.
Signed-off-by: Troy Kisky <[email protected]>
I've only verified that channels 0, and 78-101 need
reserved, but reserving a little extra seems like
a good idea.
---
arch/arm/mach-davinci/dm644x.c | 6 ++++++
arch/arm/mach-davinci/dma.c | 8 ++++++++
arch/arm/mach-davinci/include/mach/edma.h | 7 ++++++-
3 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index 6a08568..86eb9ef 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -403,6 +403,12 @@ static struct edma_soc_info dm644x_edma_info = {
.n_slot = 128,
.n_tc = 2,
.noevent = dma_chan_dm644x_no_event,
+/* reserve slots 78-109 for dsp use */
+ .dsp_reserve_slot_min = 78,
+ .dsp_reserve_slot_max = 78 + 31,
+/* reserve channels 0, 1, 12, 13 for dsp use */
+ .dsp_reserve_channel_min = 0,
+ .dsp_reserve_channel_max = 13,
};
static struct resource edma_resources[] = {
diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c
index 1f58631..f2e6b8a 100644
--- a/arch/arm/mach-davinci/dma.c
+++ b/arch/arm/mach-davinci/dma.c
@@ -1051,6 +1051,14 @@ static int __init edma_probe(struct platform_device
*pdev)
while (*noevent != -1)
set_bit(*noevent++, edma_noevent);
}
+ for (i = info->dsp_reserve_slot_min;
+ i <= info->dsp_reserve_slot_max; i++)
+ set_bit(i, edma_inuse);
+
+ for (i = info->dsp_reserve_channel_min;
+ i <= info->dsp_reserve_channel_max; i++)
+ if (test_bit(i, edma_noevent))
+ set_bit(i, edma_inuse);
irq = platform_get_irq(pdev, 0);
status = request_irq(irq, dma_irq_handler, 0, "edma", &pdev->dev);
diff --git a/arch/arm/mach-davinci/include/mach/edma.h
b/arch/arm/mach-davinci/include/mach/edma.h
index b467358..cb45960 100644
--- a/arch/arm/mach-davinci/include/mach/edma.h
+++ b/arch/arm/mach-davinci/include/mach/edma.h
@@ -222,8 +222,13 @@ struct edma_soc_info {
unsigned n_slot;
unsigned n_tc;
- /* list of channels with no even trigger; terminated by "-1" */
+ /* list of channels with no event trigger; terminated by "-1" */
const s8 *noevent;
+ u16 dsp_reserve_slot_min;
+ u16 dsp_reserve_slot_max;
+ /* only "no event" channels in range below are reserved */
+ u16 dsp_reserve_channel_min;
+ u16 dsp_reserve_channel_max;
};
#endif
--
1.5.4.3
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source