summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tms320dm320/dsp/ipc.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/tms320dm320/dsp/ipc.h')
-rw-r--r--firmware/target/arm/tms320dm320/dsp/ipc.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/firmware/target/arm/tms320dm320/dsp/ipc.h b/firmware/target/arm/tms320dm320/dsp/ipc.h
new file mode 100644
index 0000000000..ada4f17f61
--- /dev/null
+++ b/firmware/target/arm/tms320dm320/dsp/ipc.h
@@ -0,0 +1,69 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2008 by Catalin Patulea
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef IPC_H
21#define IPC_H
22
23/* Inter-Processor Communication */
24
25/* Meant to be included by both DSP and ARM code. */
26#ifdef __GNUC__
27/* aligned(2) is VERY IMPORTANT. It ensures gcc generates code with "STRH"
28 instead of with "STRB". STRB in the DSP memory range is broken because
29 the HPI is in 16-bit mode. */
30#define PACKED __attribute__((packed)) __attribute__((aligned (2)))
31#else
32#define PACKED
33#endif
34
35#define PCM_SIZE 32768 /* bytes */
36
37struct sdram_buffer {
38 unsigned long addr;
39 unsigned short bytes;
40} PACKED;
41
42#define SDRAM_BUFFERS 4
43
44struct ipc_message {
45 unsigned short msg;
46 union {
47#define MSG_INIT 1
48 struct msg_init {
49 unsigned short sdem_addrl;
50 unsigned short sdem_addrh;
51 } init PACKED;
52#define MSG_DEBUGF 2
53 struct {
54 short buffer[80];
55 } debugf PACKED;
56#define MSG_REFILL 3
57 struct {
58 unsigned short topbottom; /* byte offset to unlocked half-buffer */
59
60 unsigned short _DMA_TRG;
61 unsigned short _SDEM_ADDRH;
62 unsigned short _SDEM_ADDRL;
63 unsigned short _DSP_ADDRH;
64 unsigned short _DSP_ADDRL;
65 unsigned short _DMA_SIZE;
66 } refill PACKED;
67 } payload PACKED;
68} PACKED;
69#endif