rtlx.h 883 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (C) 2004, 2005 MIPS Technologies, Inc. All rights reserved.
  3. *
  4. */
  5. #ifndef _RTLX_H
  6. #define _RTLX_H_
  7. #define LX_NODE_BASE 10
  8. #define MIPSCPU_INT_BASE 16
  9. #define MIPS_CPU_RTLX_IRQ 0
  10. #define RTLX_VERSION 1
  11. #define RTLX_xID 0x12345600
  12. #define RTLX_ID (RTLX_xID | RTLX_VERSION)
  13. #define RTLX_CHANNELS 8
  14. #define RTLX_BUFFER_SIZE 1024
  15. /*
  16. * lx_state bits
  17. */
  18. #define RTLX_STATE_OPENED 1UL
  19. /* each channel supports read and write.
  20. linux (vpe0) reads lx_buffer and writes rt_buffer
  21. SP (vpe1) reads rt_buffer and writes lx_buffer
  22. */
  23. struct rtlx_channel {
  24. unsigned long lx_state;
  25. int buffer_size;
  26. /* read and write indexes per buffer */
  27. int rt_write, rt_read;
  28. char *rt_buffer;
  29. int lx_write, lx_read;
  30. char *lx_buffer;
  31. void *queues;
  32. };
  33. struct rtlx_info {
  34. unsigned long id;
  35. struct rtlx_channel channel[RTLX_CHANNELS];
  36. };
  37. #endif /* _RTLX_H_ */