嵌入式开发者社区

标题: 在ARM端和DSP端都使用EDMA [打印本页]

作者: lizhaoheng    时间: 2016-3-22 16:21
标题: 在ARM端和DSP端都使用EDMA
我目前使用OMAPL138芯片开发,在ARM端和DSP端都需要使用EDMA,不知道是否可行?是否有什么影响?
6 u# {6 Z) B, C/ o
作者: teddy    时间: 2016-3-22 16:26
可以的,通道分配好,不用两个核使用同一通道就行,本身设计就支持双核,放心使用。
作者: leyiran    时间: 2016-8-18 14:41
teddy 发表于 2016-3-22 16:26
+ U$ o9 a7 `. y/ a! X' w可以的,通道分配好,不用两个核使用同一通道就行,本身设计就支持双核,放心使用。 ...

- P- Q9 o  g- r: U$ t$ o4 |6 Q- P$ @! |具体在内核中怎么修改?哪个文件?
作者: teddy    时间: 2016-8-23 08:59
arch/arm/mach-davinci/devices-da8xx.c:
& A4 V7 D; L" q3 f5 k) C8 n7 ?& g. |) w# D1 ^+ N9 }
static const s8 da8xx_queue_tc_mapping[][2] = {3 H# ?/ T. E0 Z( }
        /* {event queue no, TC no} */9 \: I; b9 {5 \+ C
        {0, 0},
2 J' U- U: ~( P7 I( P7 d. c        {1, 1},
1 k$ D' c5 r' x9 H8 L7 Q3 }        {-1, -1}3 `# H% I7 ]/ H
};( j& U, w) {! t! i
/ C! ]# j5 x$ z0 ^0 S% ~( l
static const s8 da8xx_queue_priority_mapping[][2] = {) x3 y- i2 H  E* x8 h* u5 [
        /* {event queue no, Priority} */
( n# c8 y$ S: h6 Q1 \9 X        {0, 3},3 W! I( K: L: a7 ?4 K" j
        {1, 7},
8 P, O+ h% K: b& H        {-1, -1}
) ?% ~% Z: Q  M; Q* f% R: {};" L, O# U! c% C

2 z+ T+ L, `  istatic const s8 da850_queue_tc_mapping[][2] = {( ?! o- F" K1 H, E
        /* {event queue no, TC no} */
1 I, b, ~2 C8 f7 ]        {0, 0},0 L  a) k6 o! O/ ?- ~6 A( N
        {-1, -1}  c1 |9 ]! @' ^* c
};
6 N9 M8 \' ~1 G$ d! Z# z! |! X2 a" q' J# m, M0 r" O% U
static const s8 da850_queue_priority_mapping[][2] = {+ _5 v- G% a7 A
        /* {event queue no, Priority} */
! Z7 X( X' j/ Z* n  w( [        {0, 3},
- Y# s* f) H9 x* ~9 }6 k. l/ O9 B        {-1, -1}! Q+ U" o: I/ {% P0 l
};
( X6 q0 j8 y* T/ v
作者: teddy    时间: 2016-9-14 10:27
在linux内核源码里面,对edma的通道做了分配,把dsp可能用到的edma通道预留出来,意味着,在dsp里面可以使用到这些通道。
" `, v, s, O2 ?' c( H+ w$ x4 @9 ?4 Oarch/arm/mach-davinci/board-da850-evm.c
$ a, F( |" ?4 [+ Z' t# e/*: C6 U: J. l0 u) Q# a% A
* The following EDMA channels/slots are not being used by drivers (for# I/ c" G8 `8 e. y
* example: Timer, GPIO, UART events etc) on da850/omap-l138 EVM, hence( s! j, X% f/ F5 ]; H% }
* they are being reserved for codecs on the DSP side.0 X" D! s( b, Y1 H# |+ `/ O) k3 @
*/
; s8 q# Z/ x; @7 o& Mstatic const s16 da850_dma0_rsv_chans[][2] = {
5 V1 K, n+ N& w" f( u- p/ }' Z6 Y4 ]        /* (offset, number) */" K& N, K( e1 ^) X3 y( k
        { 8,  6},
2 a0 Y* C$ R' W+ e& B( v! T        {24,  4},
4 M1 R+ u) m' M% }        {30,  2},
: x8 C3 I( E2 {; b5 z: N/ Y1 K        {-1, -1}1 V) Q6 B- A7 v" Q7 ~' |
};/ @- i7 i8 f8 m+ a; y! Y. }

5 d, ]1 U" V' a: y2 ?! x! y. X8 qstatic const s16 da850_dma1_rsv_chans[][2] = {
% u9 j/ G+ ]4 I7 i2 p$ ^        /* (offset, number) *// u9 y& P5 k/ y/ F
        { 0, 28},
, s4 i7 I8 K; `4 Y5 ~$ |        {30,  2},' a" l' f5 c5 @; O2 Y  `
        {-1, -1}' \0 G7 g5 i* P2 i, c- G* G$ U
};
& Z3 p8 x* y6 h  X4 P
! k4 K# R* B$ @/ ]5 Y5 @# O上面的代码表示,如图片,EDMA CC0红色方框的通道预留给dsp,EDMA CC1除开红色椭圆MMCSD1其它通道dsp端都能使用。3 ^6 ?, m/ K9 {& Q7 _





欢迎光临 嵌入式开发者社区 (https://www.51ele.net/) Powered by Discuz! X3.4