sunbpp.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * include/asm/sunbpp.h
  3. */
  4. #ifndef _ASM_SPARC_SUNBPP_H
  5. #define _ASM_SPARC_SUNBPP_H
  6. struct bpp_regs {
  7. /* DMA registers */
  8. __volatile__ __u32 p_csr; /* DMA Control/Status Register */
  9. __volatile__ __u32 p_addr; /* Address Register */
  10. __volatile__ __u32 p_bcnt; /* Byte Count Register */
  11. __volatile__ __u32 p_tst_csr; /* Test Control/Status (DMA2 only) */
  12. /* Parallel Port registers */
  13. __volatile__ __u16 p_hcr; /* Hardware Configuration Register */
  14. __volatile__ __u16 p_ocr; /* Operation Configuration Register */
  15. __volatile__ __u8 p_dr; /* Parallel Data Register */
  16. __volatile__ __u8 p_tcr; /* Transfer Control Register */
  17. __volatile__ __u8 p_or; /* Output Register */
  18. __volatile__ __u8 p_ir; /* Input Register */
  19. __volatile__ __u16 p_icr; /* Interrupt Control Register */
  20. };
  21. /* P_HCR. Time is in increments of SBus clock. */
  22. #define P_HCR_TEST 0x8000 /* Allows buried counters to be read */
  23. #define P_HCR_DSW 0x7f00 /* Data strobe width (in ticks) */
  24. #define P_HCR_DDS 0x007f /* Data setup before strobe (in ticks) */
  25. /* P_OCR. */
  26. #define P_OCR_MEM_CLR 0x8000
  27. #define P_OCR_DATA_SRC 0x4000 /* ) */
  28. #define P_OCR_DS_DSEL 0x2000 /* ) Bidirectional */
  29. #define P_OCR_BUSY_DSEL 0x1000 /* ) selects */
  30. #define P_OCR_ACK_DSEL 0x0800 /* ) */
  31. #define P_OCR_EN_DIAG 0x0400
  32. #define P_OCR_BUSY_OP 0x0200 /* Busy operation */
  33. #define P_OCR_ACK_OP 0x0100 /* Ack operation */
  34. #define P_OCR_SRST 0x0080 /* Reset state machines. Not selfcleaning. */
  35. #define P_OCR_IDLE 0x0008 /* PP data transfer state machine is idle */
  36. #define P_OCR_V_ILCK 0x0002 /* Versatec faded. Zebra only. */
  37. #define P_OCR_EN_VER 0x0001 /* Enable Versatec (0 - enable). Zebra only. */
  38. /* P_TCR */
  39. #define P_TCR_DIR 0x08
  40. #define P_TCR_BUSY 0x04
  41. #define P_TCR_ACK 0x02
  42. #define P_TCR_DS 0x01 /* Strobe */
  43. /* P_OR */
  44. #define P_OR_V3 0x20 /* ) */
  45. #define P_OR_V2 0x10 /* ) on Zebra only */
  46. #define P_OR_V1 0x08 /* ) */
  47. #define P_OR_INIT 0x04
  48. #define P_OR_AFXN 0x02 /* Auto Feed */
  49. #define P_OR_SLCT_IN 0x01
  50. /* P_IR */
  51. #define P_IR_PE 0x04
  52. #define P_IR_SLCT 0x02
  53. #define P_IR_ERR 0x01
  54. /* P_ICR */
  55. #define P_DS_IRQ 0x8000 /* RW1 */
  56. #define P_ACK_IRQ 0x4000 /* RW1 */
  57. #define P_BUSY_IRQ 0x2000 /* RW1 */
  58. #define P_PE_IRQ 0x1000 /* RW1 */
  59. #define P_SLCT_IRQ 0x0800 /* RW1 */
  60. #define P_ERR_IRQ 0x0400 /* RW1 */
  61. #define P_DS_IRQ_EN 0x0200 /* RW Always on rising edge */
  62. #define P_ACK_IRQ_EN 0x0100 /* RW Always on rising edge */
  63. #define P_BUSY_IRP 0x0080 /* RW 1= rising edge */
  64. #define P_BUSY_IRQ_EN 0x0040 /* RW */
  65. #define P_PE_IRP 0x0020 /* RW 1= rising edge */
  66. #define P_PE_IRQ_EN 0x0010 /* RW */
  67. #define P_SLCT_IRP 0x0008 /* RW 1= rising edge */
  68. #define P_SLCT_IRQ_EN 0x0004 /* RW */
  69. #define P_ERR_IRP 0x0002 /* RW1 1= rising edge */
  70. #define P_ERR_IRQ_EN 0x0001 /* RW */
  71. #endif /* !(_ASM_SPARC_SUNBPP_H) */