Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | #ifndef GVP11_H |
| 3 | |
| 4 | /* $Id: gvp11.h,v 1.4 1997/01/19 23:07:12 davem Exp $ |
| 5 | * |
| 6 | * Header file for the GVP Series II SCSI controller for Linux |
| 7 | * |
| 8 | * Written and (C) 1993, Ralf Baechle, see gvp11.c for more info |
| 9 | * based on a2091.h (C) 1993 by Hamish Macdonald |
| 10 | * |
| 11 | */ |
| 12 | |
| 13 | #include <linux/types.h> |
| 14 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | #ifndef CMD_PER_LUN |
Geert Uytterhoeven | bb17b78 | 2010-04-04 11:00:33 +0200 | [diff] [blame] | 16 | #define CMD_PER_LUN 2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | #endif |
| 18 | |
| 19 | #ifndef CAN_QUEUE |
Geert Uytterhoeven | bb17b78 | 2010-04-04 11:00:33 +0200 | [diff] [blame] | 20 | #define CAN_QUEUE 16 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | #endif |
| 22 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | /* |
| 24 | * if the transfer address ANDed with this results in a non-zero |
| 25 | * result, then we can't use DMA. |
| 26 | */ |
Geert Uytterhoeven | bb17b78 | 2010-04-04 11:00:33 +0200 | [diff] [blame] | 27 | #define GVP11_XFER_MASK (0xff000001) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | |
Geert Uytterhoeven | 349d65f | 2009-05-17 21:05:55 +0200 | [diff] [blame] | 29 | struct gvp11_scsiregs { |
Geert Uytterhoeven | bb17b78 | 2010-04-04 11:00:33 +0200 | [diff] [blame] | 30 | unsigned char pad1[64]; |
| 31 | volatile unsigned short CNTR; |
| 32 | unsigned char pad2[31]; |
| 33 | volatile unsigned char SASR; |
| 34 | unsigned char pad3; |
| 35 | volatile unsigned char SCMD; |
| 36 | unsigned char pad4[4]; |
| 37 | volatile unsigned short BANK; |
| 38 | unsigned char pad5[6]; |
| 39 | volatile unsigned long ACR; |
| 40 | volatile unsigned short secret1; /* store 0 here */ |
| 41 | volatile unsigned short ST_DMA; |
| 42 | volatile unsigned short SP_DMA; |
| 43 | volatile unsigned short secret2; /* store 1 here */ |
| 44 | volatile unsigned short secret3; /* store 15 here */ |
Geert Uytterhoeven | 349d65f | 2009-05-17 21:05:55 +0200 | [diff] [blame] | 45 | }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | |
| 47 | /* bits in CNTR */ |
| 48 | #define GVP11_DMAC_BUSY (1<<0) |
| 49 | #define GVP11_DMAC_INT_PENDING (1<<1) |
| 50 | #define GVP11_DMAC_INT_ENABLE (1<<3) |
| 51 | #define GVP11_DMAC_DIR_WRITE (1<<4) |
| 52 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | #endif /* GVP11_H */ |