2005-07-14 11:57:16 -04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2004, 2005 MIPS Technologies, Inc. All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _RTLX_H
|
|
|
|
#define _RTLX_H_
|
|
|
|
|
|
|
|
#define LX_NODE_BASE 10
|
|
|
|
|
|
|
|
#define MIPSCPU_INT_BASE 16
|
|
|
|
#define MIPS_CPU_RTLX_IRQ 0
|
|
|
|
|
|
|
|
#define RTLX_VERSION 1
|
|
|
|
#define RTLX_xID 0x12345600
|
|
|
|
#define RTLX_ID (RTLX_xID | RTLX_VERSION)
|
|
|
|
#define RTLX_CHANNELS 8
|
|
|
|
|
|
|
|
#define RTLX_BUFFER_SIZE 1024
|
2005-10-30 19:30:39 -05:00
|
|
|
|
|
|
|
/*
|
|
|
|
* lx_state bits
|
|
|
|
*/
|
|
|
|
#define RTLX_STATE_OPENED 1UL
|
|
|
|
|
2005-07-14 11:57:16 -04:00
|
|
|
/* each channel supports read and write.
|
|
|
|
linux (vpe0) reads lx_buffer and writes rt_buffer
|
|
|
|
SP (vpe1) reads rt_buffer and writes lx_buffer
|
|
|
|
*/
|
2005-10-30 19:30:39 -05:00
|
|
|
struct rtlx_channel {
|
|
|
|
unsigned long lx_state;
|
2005-07-14 11:57:16 -04:00
|
|
|
|
|
|
|
int buffer_size;
|
|
|
|
|
|
|
|
/* read and write indexes per buffer */
|
|
|
|
int rt_write, rt_read;
|
|
|
|
char *rt_buffer;
|
|
|
|
|
|
|
|
int lx_write, lx_read;
|
|
|
|
char *lx_buffer;
|
|
|
|
|
|
|
|
void *queues;
|
|
|
|
|
2005-10-30 19:30:39 -05:00
|
|
|
};
|
2005-07-14 11:57:16 -04:00
|
|
|
|
2005-10-30 19:30:39 -05:00
|
|
|
struct rtlx_info {
|
2005-07-14 11:57:16 -04:00
|
|
|
unsigned long id;
|
|
|
|
|
|
|
|
struct rtlx_channel channel[RTLX_CHANNELS];
|
2005-10-30 19:30:39 -05:00
|
|
|
};
|
2005-07-14 11:57:16 -04:00
|
|
|
|
2005-10-30 19:30:39 -05:00
|
|
|
#endif /* _RTLX_H_ */
|