gio.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. * gio.h: Definitions for SGI GIO bus
  7. *
  8. * Copyright (C) 2002 Ladislav Michl
  9. */
  10. #ifndef _SGI_GIO_H
  11. #define _SGI_GIO_H
  12. /*
  13. * GIO bus addresses
  14. *
  15. * The Indigo and Indy have two GIO bus connectors. Indigo2 (all models) have
  16. * three physical connectors, but only two slots, GFX and EXP0.
  17. *
  18. * There is 10MB of GIO address space for GIO64 slot devices
  19. * slot# slot type address range size
  20. * ----- --------- ----------------------- -----
  21. * 0 GFX 0x1f000000 - 0x1f3fffff 4MB
  22. * 1 EXP0 0x1f400000 - 0x1f5fffff 2MB
  23. * 2 EXP1 0x1f600000 - 0x1f9fffff 4MB
  24. *
  25. * There are un-slotted devices, HPC, I/O and misc devices, which are grouped
  26. * into the HPC address space.
  27. * - MISC 0x1fb00000 - 0x1fbfffff 1MB
  28. *
  29. * Following space is reserved and unused
  30. * - RESERVED 0x18000000 - 0x1effffff 112MB
  31. *
  32. * GIO bus IDs
  33. *
  34. * Each GIO bus device identifies itself to the system by answering a
  35. * read with an "ID" value. IDs are either 8 or 32 bits long. IDs less
  36. * than 128 are 8 bits long, with the most significant 24 bits read from
  37. * the slot undefined.
  38. *
  39. * 32-bit IDs are divided into
  40. * bits 0:6 the product ID; ranges from 0x00 to 0x7F.
  41. * bit 7 0=GIO Product ID is 8 bits wide
  42. * 1=GIO Product ID is 32 bits wide.
  43. * bits 8:15 manufacturer version for the product.
  44. * bit 16 0=GIO32 and GIO32-bis, 1=GIO64.
  45. * bit 17 0=no ROM present
  46. * 1=ROM present on this board AND next three words
  47. * space define the ROM.
  48. * bits 18:31 up to manufacturer.
  49. *
  50. * IDs above 0x50/0xd0 are of 3rd party boards.
  51. *
  52. * 8-bit IDs
  53. * 0x01 XPI low cost FDDI
  54. * 0x02 GTR TokenRing
  55. * 0x04 Synchronous ISDN
  56. * 0x05 ATM board [*]
  57. * 0x06 Canon Interface
  58. * 0x07 16 bit SCSI Card [*]
  59. * 0x08 JPEG (Double Wide)
  60. * 0x09 JPEG (Single Wide)
  61. * 0x0a XPI mez. FDDI device 0
  62. * 0x0b XPI mez. FDDI device 1
  63. * 0x0c SMPTE 259M Video [*]
  64. * 0x0d Babblefish Compression [*]
  65. * 0x0e E-Plex 8-port Ethernet
  66. * 0x30 Lyon Lamb IVAS
  67. * 0xb8 GIO 100BaseTX Fast Ethernet (gfe)
  68. *
  69. * [*] Device provide 32-bit ID.
  70. *
  71. */
  72. #define GIO_ID(x) (x & 0x7f)
  73. #define GIO_32BIT_ID 0x80
  74. #define GIO_REV(x) ((x >> 8) & 0xff)
  75. #define GIO_64BIT_IFACE 0x10000
  76. #define GIO_ROM_PRESENT 0x20000
  77. #define GIO_VENDOR_CODE(x) ((x >> 18) & 0x3fff)
  78. #define GIO_SLOT_GFX_BASE 0x1f000000
  79. #define GIO_SLOT_EXP0_BASE 0x1f400000
  80. #define GIO_SLOT_EXP1_BASE 0x1f600000
  81. #endif /* _SGI_GIO_H */