aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm355.c
diff options
context:
space:
mode:
authorSekhar Nori <nsekhar@ti.com>2010-06-29 02:05:12 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2010-08-05 12:58:24 -0400
commitbc3ac9f31642fb4697b313c2eb575c5286f35c2a (patch)
treeabeeaa649da9d69713bf876575b5ba95befb1731 /arch/arm/mach-davinci/dm355.c
parentf027512db7410ed149422262b07d2c78f0a36282 (diff)
davinci: edma: provide ability to detect insufficient CC info data
This patch modifies the EDMA driver to expect the channel controller (CC) infomation passed on by the platform as a fixed size (EDMA_MAX_CC) array of pointers to structures. Doing so helps catch errors of the sort where the resource structure has information for more channel controllers than the number channel controller info structures defined. Such insufficient platform data would lead to illegal memory accesses. Signed-off-by: Sekhar Nori <nsekhar@ti.com> 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.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index 383478116ef5..3d996b659ff4 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -591,16 +591,18 @@ queue_priority_mapping[][2] = {
591 {-1, -1}, 591 {-1, -1},
592}; 592};
593 593
594static struct edma_soc_info dm355_edma_info[] = { 594static struct edma_soc_info edma_cc0_info = {
595 { 595 .n_channel = 64,
596 .n_channel = 64, 596 .n_region = 4,
597 .n_region = 4, 597 .n_slot = 128,
598 .n_slot = 128, 598 .n_tc = 2,
599 .n_tc = 2, 599 .n_cc = 1,
600 .n_cc = 1, 600 .queue_tc_mapping = queue_tc_mapping,
601 .queue_tc_mapping = queue_tc_mapping, 601 .queue_priority_mapping = queue_priority_mapping,
602 .queue_priority_mapping = queue_priority_mapping, 602};
603 }, 603
604static struct edma_soc_info *dm355_edma_info[EDMA_MAX_CC] = {
605 &edma_cc0_info,
604}; 606};
605 607
606static struct resource edma_resources[] = { 608static struct resource edma_resources[] = {