analysisOfLiquidLevelDataOperation.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * ARC firmware interface defines.
  7. *
  8. * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
  9. * Copyright (C) 1999, 2001 Ralf Baechle (ralf@gnu.org)
  10. * Copyright (C) 1999 Silicon Graphics, Inc.
  11. */
  12. #ifndef _ASM_SGIARCS_H
  13. #define _ASM_SGIARCS_H
  14. #include <asm/types.h>
  15. #include <asm/fw/arc/types.h>
  16. /* Various ARCS error codes. */
  17. #define PROM_ESUCCESS 0x00
  18. #define PROM_E2BIG 0x01
  19. #define PROM_EACCESS 0x02
  20. #define PROM_EAGAIN 0x03
  21. #define PROM_EBADF 0x04
  22. #define PROM_EBUSY 0x05
  23. #define PROM_EFAULT 0x06
  24. #define PROM_EINVAL 0x07
  25. #define PROM_EIO 0x08
  26. #define PROM_EISDIR 0x09
  27. #define PROM_EMFILE 0x0a
  28. #define PROM_EMLINK 0x0b
  29. #define PROM_ENAMETOOLONG 0x0c
  30. #define PROM_ENODEV 0x0d
  31. #define PROM_ENOENT 0x0e
  32. #define PROM_ENOEXEC 0x0f
  33. #define PROM_ENOMEM 0x10
  34. #define PROM_ENOSPC 0x11
  35. #define PROM_ENOTDIR 0x12
  36. #define PROM_ENOTTY 0x13
  37. #define PROM_ENXIO 0x14
  38. #define PROM_EROFS 0x15
  39. /* SGI ARCS specific errno's. */
  40. #define PROM_EADDRNOTAVAIL 0x1f
  41. #define PROM_ETIMEDOUT 0x20
  42. #define PROM_ECONNABORTED 0x21
  43. #define PROM_ENOCONNECT 0x22
  44. /* Device classes, types, and identifiers for prom
  45. * device inventory queries.
  46. */
  47. enum linux_devclass {
  48. system, processor, cache, adapter, controller, peripheral, memory
  49. };
  50. enum linux_devtypes {
  51. /* Generic stuff. */
  52. Arc, Cpu, Fpu,
  53. /* Primary insn and data caches. */
  54. picache, pdcache,
  55. /* Secondary insn, data, and combined caches. */
  56. sicache, sdcache, sccache,
  57. memdev, eisa_adapter, tc_adapter, scsi_adapter, dti_adapter,
  58. multifunc_adapter, dsk_controller, tp_controller, cdrom_controller,
  59. worm_controller, serial_controller, net_controller, disp_controller,
  60. parallel_controller, ptr_controller, kbd_controller, audio_controller,
  61. misc_controller, disk_peripheral, flpy_peripheral, tp_peripheral,
  62. modem_peripheral, monitor_peripheral, printer_peripheral,
  63. ptr_peripheral, kbd_peripheral, term_peripheral, line_peripheral,
  64. net_peripheral, misc_peripheral, anon
  65. };
  66. enum linux_identifier {
  67. bogus, ronly, removable, consin, consout, input, output
  68. };
  69. /* A prom device tree component. */
  70. struct linux_component {
  71. enum linux_devclass class; /* node class */
  72. enum linux_devtypes type; /* node type */
  73. enum linux_identifier iflags; /* node flags */
  74. USHORT vers; /* node version */
  75. USHORT rev; /* node revision */
  76. ULONG key; /* completely magic */
  77. ULONG amask; /* XXX affinity mask??? */
  78. ULONG cdsize; /* size of configuration data */
  79. ULONG ilen; /* length of string identifier */
  80. _PULONG iname; /* string identifier */
  81. };
  82. typedef struct linux_component pcomponent;
  83. struct linux_sysid {
  84. char vend[8], prod[8];
  85. };
  86. /* ARCS prom memory descriptors. */
  87. enum arcs_memtypes {
  88. arcs_eblock, /* exception block */
  89. arcs_rvpage, /* ARCS romvec page */
  90. arcs_fcontig, /* Contiguous and free */
  91. arcs_free, /* Generic free memory */
  92. arcs_bmem, /* Borken memory, don't use */
  93. arcs_prog, /* A loaded program resides here */
  94. arcs_atmp, /* ARCS temporary storage area, wish Sparc OpenBoot told this */
  95. arcs_aperm, /* ARCS permanent storage... */
  96. };
  97. /* ARC has slightly different types than ARCS */
  98. enum arc_memtypes {
  99. arc_eblock, /* exception block */
  100. arc_rvpage, /* romvec page */
  101. arc_free, /* Generic free memory */
  102. arc_bmem, /* Borken memory, don't use */
  103. arc_prog, /* A loaded program resides here */
  104. arc_atmp, /* temporary storage area */
  105. arc_aperm, /* permanent storage */
  106. arc_fcontig, /* Contiguous and free */
  107. };
  108. union linux_memtypes {
  109. enum arcs_memtypes arcs;
  110. enum arc_memtypes arc;
  111. };
  112. struct linux_mdesc {
  113. union linux_memtypes type;
  114. ULONG base;
  115. ULONG pages;
  116. };
  117. /* Time of day descriptor. */
  118. struct linux_tinfo {
  119. unsigned short yr;
  120. unsigned short mnth;
  121. unsigned short day;
  122. unsigned short hr;
  123. unsigned short min;
  124. unsigned short sec;
  125. unsigned short msec;
  126. };
  127. /* ARCS virtual dirents. */
  128. struct linux_vdirent {
  129. ULONG namelen;
  130. unsigned char attr;
  131. char fname[32]; /* XXX imperical, should be a define */
  132. };
  133. /* Other stuff for files. */
  134. enum linux_omode {
  135. rdonly, wronly, rdwr, wronly_creat, rdwr_creat,
  136. wronly_ssede, rdwr_ssede, dirent, dirent_creat
  137. };
  138. enum linux_seekmode {
  139. absolute, relative
  140. };
  141. enum linux_mountops {
  142. media_load, media_unload
  143. };
  144. /* This prom has a bolixed design. */
  145. struct linux_bigint {
  146. #ifdef __MIPSEL__
  147. u32 lo;
  148. s32 hi;