aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm644x.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/dm644x.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/dm644x.c')
-rw-r--r--arch/arm/mach-davinci/dm644x.c41
1 files changed, 32 insertions, 9 deletions
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index fb5449b3c97b..d145c0cbfe6a 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -484,17 +484,38 @@ static const s8 dma_chan_dm644x_no_event[] = {
484 -1 484 -1
485}; 485};
486 486
487static struct edma_soc_info dm644x_edma_info = { 487static const s8
488 .n_channel = 64, 488queue_tc_mapping[][2] = {
489 .n_region = 4, 489 /* {event queue no, TC no} */
490 .n_slot = 128, 490 {0, 0},
491 .n_tc = 2, 491 {1, 1},
492 .noevent = dma_chan_dm644x_no_event, 492 {-1, -1},
493};
494
495static const s8
496queue_priority_mapping[][2] = {
497 /* {event queue no, Priority} */
498 {0, 3},
499 {1, 7},
500 {-1, -1},
501};
502
503static struct edma_soc_info dm644x_edma_info[] = {
504 {
505 .n_channel = 64,
506 .n_region = 4,
507 .n_slot = 128,
508 .n_tc = 2,
509 .n_cc = 1,
510 .noevent = dma_chan_dm644x_no_event,
511 .queue_tc_mapping = queue_tc_mapping,
512 .queue_priority_mapping = queue_priority_mapping,
513 },
493}; 514};
494 515
495static struct resource edma_resources[] = { 516static struct resource edma_resources[] = {
496 { 517 {
497 .name = "edma_cc", 518 .name = "edma_cc0",
498 .start = 0x01c00000, 519 .start = 0x01c00000,
499 .end = 0x01c00000 + SZ_64K - 1, 520 .end = 0x01c00000 + SZ_64K - 1,
500 .flags = IORESOURCE_MEM, 521 .flags = IORESOURCE_MEM,
@@ -512,10 +533,12 @@ static struct resource edma_resources[] = {
512 .flags = IORESOURCE_MEM, 533 .flags = IORESOURCE_MEM,
513 }, 534 },
514 { 535 {
536 .name = "edma0",
515 .start = IRQ_CCINT0, 537 .start = IRQ_CCINT0,
516 .flags = IORESOURCE_IRQ, 538 .flags = IORESOURCE_IRQ,
517 }, 539 },
518 { 540 {
541 .name = "edma0_err",
519 .start = IRQ_CCERRINT, 542 .start = IRQ_CCERRINT,
520 .flags = IORESOURCE_IRQ, 543 .flags = IORESOURCE_IRQ,
521 }, 544 },
@@ -524,8 +547,8 @@ static struct resource edma_resources[] = {
524 547
525static struct platform_device dm644x_edma_device = { 548static struct platform_device dm644x_edma_device = {
526 .name = "edma", 549 .name = "edma",
527 .id = -1, 550 .id = 0,
528 .dev.platform_data = &dm644x_edma_info, 551 .dev.platform_data = dm644x_edma_info,
529 .num_resources = ARRAY_SIZE(edma_resources), 552 .num_resources = ARRAY_SIZE(edma_resources),
530 .resource = edma_resources, 553 .resource = edma_resources,
531}; 554};