a2091.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #ifndef A2091_H
  2. #define A2091_H
  3. /* $Id: a2091.h,v 1.4 1997/01/19 23:07:09 davem Exp $
  4. *
  5. * Header file for the Commodore A2091 Zorro II SCSI controller for Linux
  6. *
  7. * Written and (C) 1993, Hamish Macdonald, see a2091.c for more info
  8. *
  9. */
  10. #include <linux/types.h>
  11. #ifndef CMD_PER_LUN
  12. #define CMD_PER_LUN 2
  13. #endif
  14. #ifndef CAN_QUEUE
  15. #define CAN_QUEUE 16
  16. #endif
  17. /*
  18. * if the transfer address ANDed with this results in a non-zero
  19. * result, then we can't use DMA.
  20. */
  21. #define A2091_XFER_MASK (0xff000001)
  22. struct a2091_scsiregs {
  23. unsigned char pad1[64];
  24. volatile unsigned short ISTR;
  25. volatile unsigned short CNTR;
  26. unsigned char pad2[60];
  27. volatile unsigned int WTC;
  28. volatile unsigned long ACR;
  29. unsigned char pad3[6];
  30. volatile unsigned short DAWR;
  31. unsigned char pad4;
  32. volatile unsigned char SASR;
  33. unsigned char pad5;
  34. volatile unsigned char SCMD;
  35. unsigned char pad6[76];
  36. volatile unsigned short ST_DMA;
  37. volatile unsigned short SP_DMA;
  38. volatile unsigned short CINT;
  39. unsigned char pad7[2];
  40. volatile unsigned short FLUSH;
  41. };
  42. #define DAWR_A2091 (3)
  43. /* CNTR bits. */
  44. #define CNTR_TCEN (1<<7)
  45. #define CNTR_PREST (1<<6)
  46. #define CNTR_PDMD (1<<5)
  47. #define CNTR_INTEN (1<<4)
  48. #define CNTR_DDIR (1<<3)
  49. /* ISTR bits. */
  50. #define ISTR_INTX (1<<8)
  51. #define ISTR_INT_F (1<<7)
  52. #define ISTR_INTS (1<<6)
  53. #define ISTR_E_INT (1<<5)
  54. #define ISTR_INT_P (1<<4)
  55. #define ISTR_UE_INT (1<<3)
  56. #define ISTR_OE_INT (1<<2)
  57. #define ISTR_FF_FLG (1<<1)
  58. #define ISTR_FE_FLG (1<<0)
  59. #endif /* A2091_H */