Skip to content

Commit e6156fa

Browse files
committed
wmb for dsp
1 parent 8211a40 commit e6156fa

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

dsptrg.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@
99

1010
extern int volatile vector_table[];
1111

12+
static void
13+
wmb (void)
14+
{
15+
/*
16+
* reading any memory mapped reg drains write buffer
17+
* see Cache User's Guide section 2.6
18+
*/
19+
readreg (L1PCFG);
20+
}
21+
22+
1223
/*
1324
* low level communication between arm and dsp
1425
* called on the dsp side by ti's rtssrc/SHARED/trgdrv.c
@@ -37,7 +48,7 @@ writemsg (unsigned char command,
3748

3849
trgbuf->length = p - trgbuf->buf;
3950

40-
/* want to drain write buffers here */
51+
wmb ();
4152

4253
trgbuf->owner = ARMDSP_TRGBUF_OWNER_ARM;
4354
writereg (SYSCFG0_CHIPSIG, 1); /* CHIPINT0 to arm */
@@ -55,7 +66,6 @@ readmsg (unsigned char *params, char *data)
5566
((unsigned char *)vector_table + ARMDSP_COMM_TRGBUF);
5667

5768
while (1) {
58-
/* want to flush cache here */
5969
if (trgbuf->owner == ARMDSP_TRGBUF_OWNER_DSP)
6070
break;
6171
}

0 commit comments

Comments
 (0)