diff options
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r-- | arch/arm/mach-davinci/dma.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c index 5a71f4d1c5c5..97a49f98fe13 100644 --- a/arch/arm/mach-davinci/dma.c +++ b/arch/arm/mach-davinci/dma.c | |||
@@ -243,6 +243,7 @@ struct edma { | |||
243 | }; | 243 | }; |
244 | 244 | ||
245 | static struct edma *edma_info[EDMA_MAX_CC]; | 245 | static struct edma *edma_info[EDMA_MAX_CC]; |
246 | static int arch_num_cc; | ||
246 | 247 | ||
247 | /* dummy param set used to (re)initialize parameter RAM slots */ | 248 | /* dummy param set used to (re)initialize parameter RAM slots */ |
248 | static const struct edmacc_param dummy_paramset = { | 249 | static const struct edmacc_param dummy_paramset = { |
@@ -602,7 +603,7 @@ int edma_alloc_channel(int channel, | |||
602 | } | 603 | } |
603 | 604 | ||
604 | if (channel < 0) { | 605 | if (channel < 0) { |
605 | for (i = 0; i < EDMA_MAX_CC; i++) { | 606 | for (i = 0; i < arch_num_cc; i++) { |
606 | channel = 0; | 607 | channel = 0; |
607 | for (;;) { | 608 | for (;;) { |
608 | channel = find_next_bit(edma_info[i]-> | 609 | channel = find_next_bit(edma_info[i]-> |
@@ -1467,6 +1468,7 @@ static int __init edma_probe(struct platform_device *pdev) | |||
1467 | edma_write_array2(j, EDMA_DRAE, i, 1, 0x0); | 1468 | edma_write_array2(j, EDMA_DRAE, i, 1, 0x0); |
1468 | edma_write_array(j, EDMA_QRAE, i, 0x0); | 1469 | edma_write_array(j, EDMA_QRAE, i, 0x0); |
1469 | } | 1470 | } |
1471 | arch_num_cc++; | ||
1470 | } | 1472 | } |
1471 | 1473 | ||
1472 | if (tc_errs_handled) { | 1474 | if (tc_errs_handled) { |