aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/rtlx.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips/rtlx.h')
-rw-r--r--include/asm-mips/rtlx.h38
1 files changed, 25 insertions, 13 deletions
diff --git a/include/asm-mips/rtlx.h b/include/asm-mips/rtlx.h
index 1298c3fdf6c9..76cd51c6be39 100644
--- a/include/asm-mips/rtlx.h
+++ b/include/asm-mips/rtlx.h
@@ -3,32 +3,46 @@
3 * 3 *
4 */ 4 */
5 5
6#ifndef _RTLX_H 6#ifndef __ASM_RTLX_H
7#define _RTLX_H_ 7#define __ASM_RTLX_H_
8 8
9#define LX_NODE_BASE 10 9#define LX_NODE_BASE 10
10 10
11#define MIPSCPU_INT_BASE 16 11#define MIPSCPU_INT_BASE 16
12#define MIPS_CPU_RTLX_IRQ 0 12#define MIPS_CPU_RTLX_IRQ 0
13 13
14#define RTLX_VERSION 1 14#define RTLX_VERSION 2
15#define RTLX_xID 0x12345600 15#define RTLX_xID 0x12345600
16#define RTLX_ID (RTLX_xID | RTLX_VERSION) 16#define RTLX_ID (RTLX_xID | RTLX_VERSION)
17#define RTLX_CHANNELS 8 17#define RTLX_CHANNELS 8
18 18
19#define RTLX_BUFFER_SIZE 1024 19#define RTLX_CHANNEL_STDIO 0
20#define RTLX_CHANNEL_DBG 1
21#define RTLX_CHANNEL_SYSIO 2
20 22
21/* 23extern int rtlx_open(int index, int can_sleep);
22 * lx_state bits 24extern int rtlx_release(int index);
23 */ 25extern ssize_t rtlx_read(int index, void *buff, size_t count, int user);
24#define RTLX_STATE_OPENED 1UL 26extern ssize_t rtlx_write(int index, void *buffer, size_t count, int user);
27extern unsigned int rtlx_read_poll(int index, int can_sleep);
28extern unsigned int rtlx_write_poll(int index);
29
30enum rtlx_state {
31 RTLX_STATE_UNUSED,
32 RTLX_STATE_INITIALISED,
33 RTLX_STATE_REMOTE_READY,
34 RTLX_STATE_OPENED
35};
36
37#define RTLX_BUFFER_SIZE 1024
25 38
26/* each channel supports read and write. 39/* each channel supports read and write.
27 linux (vpe0) reads lx_buffer and writes rt_buffer 40 linux (vpe0) reads lx_buffer and writes rt_buffer
28 SP (vpe1) reads rt_buffer and writes lx_buffer 41 SP (vpe1) reads rt_buffer and writes lx_buffer
29*/ 42*/
30struct rtlx_channel { 43struct rtlx_channel {
31 unsigned long lx_state; 44 enum rtlx_state rt_state;
45 enum rtlx_state lx_state;
32 46
33 int buffer_size; 47 int buffer_size;
34 48
@@ -38,15 +52,13 @@ struct rtlx_channel {
38 52
39 int lx_write, lx_read; 53 int lx_write, lx_read;
40 char *lx_buffer; 54 char *lx_buffer;
41
42 void *queues;
43
44}; 55};
45 56
46struct rtlx_info { 57struct rtlx_info {
47 unsigned long id; 58 unsigned long id;
59 enum rtlx_state state;
48 60
49 struct rtlx_channel channel[RTLX_CHANNELS]; 61 struct rtlx_channel channel[RTLX_CHANNELS];
50}; 62};
51 63
52#endif /* _RTLX_H_ */ 64#endif /* __ASM_RTLX_H_ */