a3000.h 1.6 KB

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