mempolicy: fix parsing of tmpfs mpol mount option
[deliverable/linux.git] / include / asm-mips / rtlx.h
CommitLineData
e01402b1
RB
1/*
2 * Copyright (C) 2004, 2005 MIPS Technologies, Inc. All rights reserved.
3 *
4 */
5
2600990e
RB
6#ifndef __ASM_RTLX_H
7#define __ASM_RTLX_H_
e01402b1 8
97dcb82d
AN
9#include <irq.h>
10
e01402b1
RB
11#define LX_NODE_BASE 10
12
e01402b1
RB
13#define MIPS_CPU_RTLX_IRQ 0
14
2600990e 15#define RTLX_VERSION 2
e01402b1
RB
16#define RTLX_xID 0x12345600
17#define RTLX_ID (RTLX_xID | RTLX_VERSION)
18#define RTLX_CHANNELS 8
19
2600990e
RB
20#define RTLX_CHANNEL_STDIO 0
21#define RTLX_CHANNEL_DBG 1
22#define RTLX_CHANNEL_SYSIO 2
afc4841d 23
2600990e
RB
24extern int rtlx_open(int index, int can_sleep);
25extern int rtlx_release(int index);
46230aa6
RB
26extern ssize_t rtlx_read(int index, void __user *buff, size_t count);
27extern ssize_t rtlx_write(int index, const void __user *buffer, size_t count);
2600990e
RB
28extern unsigned int rtlx_read_poll(int index, int can_sleep);
29extern unsigned int rtlx_write_poll(int index);
30
31enum rtlx_state {
32 RTLX_STATE_UNUSED,
33 RTLX_STATE_INITIALISED,
34 RTLX_STATE_REMOTE_READY,
35 RTLX_STATE_OPENED
36};
37
38#define RTLX_BUFFER_SIZE 1024
afc4841d 39
e01402b1
RB
40/* each channel supports read and write.
41 linux (vpe0) reads lx_buffer and writes rt_buffer
42 SP (vpe1) reads rt_buffer and writes lx_buffer
43*/
afc4841d 44struct rtlx_channel {
2600990e
RB
45 enum rtlx_state rt_state;
46 enum rtlx_state lx_state;
e01402b1
RB
47
48 int buffer_size;
49
50 /* read and write indexes per buffer */
51 int rt_write, rt_read;
52 char *rt_buffer;
53
54 int lx_write, lx_read;
55 char *lx_buffer;
afc4841d 56};
e01402b1 57
afc4841d 58struct rtlx_info {
e01402b1 59 unsigned long id;
2600990e 60 enum rtlx_state state;
e01402b1
RB
61
62 struct rtlx_channel channel[RTLX_CHANNELS];
afc4841d 63};
e01402b1 64
2600990e 65#endif /* __ASM_RTLX_H_ */
This page took 0.289532 seconds and 5 git commands to generate.