summaryrefslogtreecommitdiff
path: root/arch/arm/mach-davinci/dm646x.c
diff options
context:
space:
mode:
authorSekhar Nori <nsekhar@ti.com>2010-06-29 06:05:12 (GMT)
committerKevin Hilman <khilman@deeprootsystems.com>2010-08-05 16:58:24 (GMT)
commitbc3ac9f31642fb4697b313c2eb575c5286f35c2a (patch)
treeabeeaa649da9d69713bf876575b5ba95befb1731 /arch/arm/mach-davinci/dm646x.c
parentf027512db7410ed149422262b07d2c78f0a36282 (diff)
downloadlinux-fsl-qoriq-bc3ac9f31642fb4697b313c2eb575c5286f35c2a.tar.xz
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/dm646x.c')
-rw-r--r--arch/arm/mach-davinci/dm646x.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 9404565..bfc887e 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -529,16 +529,18 @@ dm646x_queue_priority_mapping[][2] = {
{-1, -1},
};
-static struct edma_soc_info dm646x_edma_info[] = {
- {
- .n_channel = 64,
- .n_region = 6, /* 0-1, 4-7 */
- .n_slot = 512,
- .n_tc = 4,
- .n_cc = 1,
- .queue_tc_mapping = dm646x_queue_tc_mapping,
- .queue_priority_mapping = dm646x_queue_priority_mapping,
- },
+static struct edma_soc_info edma_cc0_info = {
+ .n_channel = 64,
+ .n_region = 6, /* 0-1, 4-7 */
+ .n_slot = 512,
+ .n_tc = 4,
+ .n_cc = 1,
+ .queue_tc_mapping = dm646x_queue_tc_mapping,
+ .queue_priority_mapping = dm646x_queue_priority_mapping,
+};
+
+static struct edma_soc_info *dm646x_edma_info[EDMA_MAX_CC] = {
+ &edma_cc0_info,
};
static struct resource edma_resources[] = {