auxio_64.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * auxio.h: Definitions and code for the Auxiliary I/O registers.
  3. *
  4. * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  5. *
  6. * Refactoring for unified NCR/PCIO support 2002 Eric Brower (ebrower@usa.net)
  7. */
  8. #ifndef _SPARC64_AUXIO_H
  9. #define _SPARC64_AUXIO_H
  10. /* AUXIO implementations:
  11. * sbus-based NCR89C105 "Slavio"
  12. * LED/Floppy (AUX1) register
  13. * Power (AUX2) register
  14. *
  15. * ebus-based auxio on PCIO
  16. * LED Auxio Register
  17. * Power Auxio Register
  18. *
  19. * Register definitions from NCR _NCR89C105 Chip Specification_
  20. *
  21. * SLAVIO AUX1 @ 0x1900000
  22. * -------------------------------------------------
  23. * | (R) | (R) | D | (R) | E | M | T | L |
  24. * -------------------------------------------------
  25. * (R) - bit 7:6,4 are reserved and should be masked in s/w
  26. * D - Floppy Density Sense (1=high density) R/O
  27. * E - Link Test Enable, directly reflected on AT&T 7213 LTE pin
  28. * M - Monitor/Mouse Mux, directly reflected on MON_MSE_MUX pin
  29. * T - Terminal Count: sends TC pulse to 82077 floppy controller
  30. * L - System LED on front panel (0=off, 1=on)
  31. */
  32. #define AUXIO_AUX1_MASK 0xc0 /* Mask bits */
  33. #define AUXIO_AUX1_FDENS 0x20 /* Floppy Density Sense */
  34. #define AUXIO_AUX1_LTE 0x08 /* Link Test Enable */
  35. #define AUXIO_AUX1_MMUX 0x04 /* Monitor/Mouse Mux */
  36. #define AUXIO_AUX1_FTCNT 0x02 /* Terminal Count, */
  37. #define AUXIO_AUX1_LED 0x01 /* System LED */
  38. /* SLAVIO AUX2 @ 0x1910000
  39. * -------------------------------------------------
  40. * | (R) | (R) | D | (R) | (R) | (R) | C | F |
  41. * -------------------------------------------------
  42. * (R) - bits 7:6,4:2 are reserved and should be masked in s/w
  43. * D - Power Failure Detect (1=power fail)
  44. * C - Clear Power Failure Detect Int (1=clear)
  45. * F - Power Off (1=power off)
  46. */
  47. #define AUXIO_AUX2_MASK 0xdc /* Mask Bits */
  48. #define AUXIO_AUX2_PFAILDET 0x20 /* Power Fail Detect */
  49. #define AUXIO_AUX2_PFAILCLR 0x02 /* Clear Pwr Fail Det Intr */
  50. #define AUXIO_AUX2_PWR_OFF 0x01 /* Power Off */
  51. /* Register definitions from Sun Microsystems _PCIO_ p/n 802-7837
  52. *
  53. * PCIO LED Auxio @ 0x726000
  54. * -------------------------------------------------
  55. * | 31:1 Unused | LED |
  56. * -------------------------------------------------
  57. * Bits 31:1 unused
  58. * LED - System LED on front panel (0=off, 1=on)
  59. */
  60. #define AUXIO_PCIO_LED 0x01 /* System LED */
  61. /* PCIO Power Auxio @ 0x724000
  62. * -------------------------------------------------
  63. * | 31:2 Unused | CPO | SPO |
  64. * -------------------------------------------------
  65. * Bits 31:2 unused
  66. * CPO - Courtesy Power Off (1=off)
  67. * SPO - System Power Off (1=off)
  68. */
  69. #define AUXIO_PCIO_CPWR_OFF 0x02 /* Courtesy Power Off */
  70. #define AUXIO_PCIO_SPWR_OFF 0x01 /* System Power Off */
  71. #ifndef __ASSEMBLY__
  72. #define AUXIO_LTE_ON 1
  73. #define AUXIO_LTE_OFF 0
  74. /* auxio_set_lte - Set Link Test Enable (TPE Link Detect)
  75. *
  76. * on - AUXIO_LTE_ON or AUXIO_LTE_OFF
  77. */
  78. void auxio_set_lte(int on);
  79. #define AUXIO_LED_ON 1
  80. #define AUXIO_LED_OFF 0
  81. /* auxio_set_led - Set system front panel LED
  82. *
  83. * on - AUXIO_LED_ON or AUXIO_LED_OFF
  84. */
  85. void auxio_set_led(int on);
  86. #endif /* ifndef __ASSEMBLY__ */
  87. #endif /* !(_SPARC64_AUXIO_H) */