a2091.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. int a2091_detect(struct scsi_host_template *);
  12. int a2091_release(struct Scsi_Host *);
  13. const char *wd33c93_info(void);
  14. int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
  15. int wd33c93_abort(Scsi_Cmnd *);
  16. int wd33c93_reset(Scsi_Cmnd *, unsigned int);
  17. #ifndef CMD_PER_LUN
  18. #define CMD_PER_LUN 2
  19. #endif
  20. #ifndef CAN_QUEUE
  21. #define CAN_QUEUE 16
  22. #endif
  23. /*
  24. * if the transfer address ANDed with this results in a non-zero
  25. * result, then we can't use DMA.
  26. */
  27. #define A2091_XFER_MASK (0xff000001)
  28. typedef struct {
  29. unsigned char pad1[64];
  30. volatile unsigned short ISTR;
  31. volatile unsigned short CNTR;
  32. unsigned char pad2[60];
  33. volatile unsigned int WTC;
  34. volatile unsigned long ACR;
  35. unsigned char pad3[6];
  36. volatile unsigned short DAWR;
  37. unsigned char pad4;
  38. volatile unsigned char SASR;
  39. unsigned char pad5;
  40. volatile unsigned char SCMD;
  41. unsigned char pad6[76];
  42. volatile unsigned short ST_DMA;
  43. volatile unsigned short SP_DMA;
  44. volatile unsigned short CINT;
  45. unsigned char pad7[2];
  46. volatile unsigned short FLUSH;
  47. } a2091_scsiregs;
  48. #define DAWR_A2091 (3)
  49. /* CNTR bits. */
  50. #define CNTR_TCEN (1<<7)
  51. #define CNTR_PREST (1<<6)
  52. #define CNTR_PDMD (1<<5)
  53. #define CNTR_INTEN (1<<4)
  54. #define CNTR_DDIR (1<<3)
  55. /* ISTR bits. */
  56. #define ISTR_INTX (1<<8)
  57. #define ISTR_INT_F (1<<7)
  58. #define ISTR_INTS (1<<6)
  59. #define ISTR_E_INT (1<<5)
  60. #define ISTR_INT_P (1<<4)
  61. #define ISTR_UE_INT (1<<3)
  62. #define ISTR_OE_INT (1<<2)
  63. #define ISTR_FF_FLG (1<<1)
  64. #define ISTR_FE_FLG (1<<0)
  65. #endif /* A2091_H */