aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm355.c
diff options
context:
space:
mode:
authorSudhakar Rajashekhara <sudhakar.raj@ti.com>2009-05-21 07:41:35 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-08-26 03:56:56 -0400
commit60902a2cb12c3c1682ee7a04ad7448ec16dc0c29 (patch)
treeba754bff7fadd7106dc9f8549136a514177d0fd1 /arch/arm/mach-davinci/dm355.c
parent4c5adde7943b982d22a7bf711654fbb5cb810667 (diff)
davinci: EDMA: multiple CCs, channel mapping and API changes
- restructure to support multiple channel controllers by using additional struct resources for each CC - interface changes visible to EDMA clients Introduce macros to build IDs from controller and channel number, and to extract them. Modify the edma_alloc_slot function to take an extra argument for the controller. Also update ASoC drivers to use API. ASoC changes Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> - Move queue related mappings to dm<soc>.c EDMA in DM355 and DM644x has two transfer controllers while DM646x has four transfer controllers. Moving the queue to tc mapping and queue priority mapping to dm<soc>.c will be helpful to probe these mappings from platform device so that the machine_is_* testing will be avoided. - add channel mapping logic Channel mapping logic is introduced in dm646x EDMA. This implies that there is no fixed association for a channel number to a parameter entry number. In other words, using the DMA channel mapping registers (DCHMAPn), a PaRAM entry can be mapped to any channel. While in the case of dm644x and dm355 there is a fixed mapping between the EDMA channel and Param entry number. Signed-off-by: Naresh Medisetty <naresh@ti.com> Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Reviewed-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/dm355.c')
-rw-r--r--arch/arm/mach-davinci/dm355.c41
1 files changed, 32 insertions, 9 deletions
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index baaaf328de2e..373f0c4003a5 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -558,17 +558,38 @@ static const s8 dma_chan_dm355_no_event[] = {
558 -1 558 -1
559}; 559};
560 560
561static struct edma_soc_info dm355_edma_info = { 561static const s8
562 .n_channel = 64, 562queue_tc_mapping[][2] = {
563 .n_region = 4, 563 /* {event queue no, TC no} */
564 .n_slot = 128, 564 {0, 0},
565 .n_tc = 2, 565 {1, 1},
566 .noevent = dma_chan_dm355_no_event, 566 {-1, -1},
567};
568
569static const s8
570queue_priority_mapping[][2] = {
571 /* {event queue no, Priority} */
572 {0, 3},
573 {1, 7},
574 {-1, -1},
575};
576
577static struct edma_soc_info dm355_edma_info[] = {
578 {
579 .n_channel = 64,
580 .n_region = 4,
581 .n_slot = 128,
582 .n_tc = 2,
583 .n_cc = 1,
584 .noevent = dma_chan_dm355_no_event,
585 .queue_tc_mapping = queue_tc_mapping,
586 .queue_priority_mapping = queue_priority_mapping,
587 },
567}; 588};
568 589
569static struct resource edma_resources[] = { 590static struct resource edma_resources[] = {
570 { 591 {
571 .name = "edma_cc", 592 .name = "edma_cc0",
572 .start = 0x01c00000, 593 .start = 0x01c00000,
573 .end = 0x01c00000 + SZ_64K - 1, 594 .end = 0x01c00000 + SZ_64K - 1,
574 .flags = IORESOURCE_MEM, 595 .flags = IORESOURCE_MEM,
@@ -586,10 +607,12 @@ static struct resource edma_resources[] = {
586 .flags = IORESOURCE_MEM, 607 .flags = IORESOURCE_MEM,
587 }, 608 },
588 { 609 {
610 .name = "edma0",
589 .start = IRQ_CCINT0, 611 .start = IRQ_CCINT0,
590 .flags = IORESOURCE_IRQ, 612 .flags = IORESOURCE_IRQ,
591 }, 613 },
592 { 614 {
615 .name = "edma0_err",
593 .start = IRQ_CCERRINT, 616 .start = IRQ_CCERRINT,
594 .flags = IORESOURCE_IRQ, 617 .flags = IORESOURCE_IRQ,
595 }, 618 },
@@ -598,8 +621,8 @@ static struct resource edma_resources[] = {
598 621
599static struct platform_device dm355_edma_device = { 622static struct platform_device dm355_edma_device = {
600 .name = "edma", 623 .name = "edma",
601 .id = -1, 624 .id = 0,
602 .dev.platform_data = &dm355_edma_info, 625 .dev.platform_data = dm355_edma_info,
603 .num_resources = ARRAY_SIZE(edma_resources), 626 .num_resources = ARRAY_SIZE(edma_resources),
604 .resource = edma_resources, 627 .resource = edma_resources,
605}; 628};