a2091.h 1.5 KB

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