a3000.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #ifndef A3000_H
  2. #define A3000_H
  3. /* $Id: a3000.h,v 1.4 1997/01/19 23:07:10 davem Exp $
  4. *
  5. * Header file for the Amiga 3000 built-in SCSI controller for Linux
  6. *
  7. * Written and (C) 1993, Hamish Macdonald, see a3000.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 A3000_XFER_MASK (0x00000003)
  22. struct a3000_scsiregs {
  23. unsigned char pad1[2];
  24. volatile unsigned short DAWR;
  25. volatile unsigned int WTC;
  26. unsigned char pad2[2];
  27. volatile unsigned short CNTR;
  28. volatile unsigned long ACR;
  29. unsigned char pad3[2];
  30. volatile unsigned short ST_DMA;
  31. unsigned char pad4[2];
  32. volatile unsigned short FLUSH;
  33. unsigned char pad5[2];
  34. volatile unsigned short CINT;
  35. unsigned char pad6[2];
  36. volatile unsigned short ISTR;
  37. unsigned char pad7[30];
  38. volatile unsigned short SP_DMA;
  39. unsigned char pad8;
  40. volatile unsigned char SASR;
  41. unsigned char pad9;
  42. volatile unsigned char SCMD;
  43. };
  44. #define DAWR_A3000 (3)
  45. /* CNTR bits. */
  46. #define CNTR_TCEN (1<<5)
  47. #define CNTR_PREST (1<<4)
  48. #define CNTR_PDMD (1<<3)
  49. #define CNTR_INTEN (1<<2)
  50. #define CNTR_DDIR (1<<1)
  51. #define CNTR_IO_DX (1<<0)
  52. /* ISTR bits. */
  53. #define ISTR_INTX (1<<8)
  54. #define ISTR_INT_F (1<<7)
  55. #define ISTR_INTS (1<<6)
  56. #define ISTR_E_INT (1<<5)
  57. #define ISTR_INT_P (1<<4)
  58. #define ISTR_UE_INT (1<<3)
  59. #define ISTR_OE_INT (1<<2)
  60. #define ISTR_FF_FLG (1<<1)
  61. #define ISTR_FE_FLG (1<<0)
  62. #endif /* A3000_H */