aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-10-30 19:30:39 -0500
committerRalf Baechle <ralf@linux-mips.org>2005-11-07 13:05:33 -0500
commitafc4841d8a0118fcce9fd520b21ec1da401603a3 (patch)
tree25e16fdb4c00311e025efcd2ef448a3e97ebba12 /include/asm-mips
parent0b154bb7d0cce80e9c0bcf11d4f9e71b59409d26 (diff)
Turn rtlx upside down.
o Coding style o Race condition on open o Switch to dynamic major o Header file cleanup Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r--include/asm-mips/rtlx.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/include/asm-mips/rtlx.h b/include/asm-mips/rtlx.h
index 83cdf6ab0d1f..1298c3fdf6c9 100644
--- a/include/asm-mips/rtlx.h
+++ b/include/asm-mips/rtlx.h
@@ -16,21 +16,19 @@
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
19enum rtlx_state {
20 RTLX_STATE_UNUSED = 0,
21 RTLX_STATE_INITIALISED,
22 RTLX_STATE_REMOTE_READY,
23 RTLX_STATE_OPENED
24};
25
26#define RTLX_BUFFER_SIZE 1024 19#define RTLX_BUFFER_SIZE 1024
20
21/*
22 * lx_state bits
23 */
24#define RTLX_STATE_OPENED 1UL
25
27/* each channel supports read and write. 26/* each channel supports read and write.
28 linux (vpe0) reads lx_buffer and writes rt_buffer 27 linux (vpe0) reads lx_buffer and writes rt_buffer
29 SP (vpe1) reads rt_buffer and writes lx_buffer 28 SP (vpe1) reads rt_buffer and writes lx_buffer
30*/ 29*/
31typedef struct rtlx_channel { 30struct rtlx_channel {
32 enum rtlx_state rt_state; 31 unsigned long lx_state;
33 enum rtlx_state lx_state;
34 32
35 int buffer_size; 33 int buffer_size;
36 34
@@ -43,14 +41,12 @@ typedef struct rtlx_channel {
43 41
44 void *queues; 42 void *queues;
45 43
46} rtlx_channel_t; 44};
47 45
48typedef struct rtlx_info { 46struct rtlx_info {
49 unsigned long id; 47 unsigned long id;
50 enum rtlx_state state;
51 48
52 struct rtlx_channel channel[RTLX_CHANNELS]; 49 struct rtlx_channel channel[RTLX_CHANNELS];
50};
53 51
54} rtlx_info_t; 52#endif /* _RTLX_H_ */
55
56#endif