Import 2.3.18pre1
[davej-history.git] / drivers / scsi / fastlane.h
blob6acf6f0d1b551aa14e271927c6635ac79ac86d05
1 /* fastlane.h: Defines and structures for the Fastlane SCSI driver.
3 * Copyright (C) 1996 Jesper Skov (jskov@cygnus.co.uk)
4 */
6 #include "NCR53C9x.h"
8 #ifndef FASTLANE_H
9 #define FASTLANE_H
11 /* The controller registers can be found in the Z2 config area at these
12 * offsets:
14 #define FASTLANE_ESP_ADDR 0x1000001
15 #define FASTLANE_DMA_ADDR 0x1000041
18 /* The Fastlane DMA interface */
19 struct fastlane_dma_registers {
20 volatile unsigned char cond_reg; /* DMA status (ro) [0x0000] */
21 #define ctrl_reg cond_reg /* DMA control (wo) [0x0000] */
22 unsigned char dmapad1[0x3f];
23 volatile unsigned char clear_strobe; /* DMA clear (wo) [0x0040] */
27 /* DMA status bits */
28 #define FASTLANE_DMA_MINT 0x80
29 #define FASTLANE_DMA_IACT 0x40
30 #define FASTLANE_DMA_CREQ 0x20
32 /* DMA control bits */
33 #define FASTLANE_DMA_FCODE 0xa0
34 #define FASTLANE_DMA_MASK 0xf3
35 #define FASTLANE_DMA_LED 0x10 /* HD led control 1 = on */
36 #define FASTLANE_DMA_WRITE 0x08 /* 1 = write */
37 #define FASTLANE_DMA_ENABLE 0x04 /* Enable DMA */
38 #define FASTLANE_DMA_EDI 0x02 /* Enable DMA IRQ ? */
39 #define FASTLANE_DMA_ESI 0x01 /* Enable SCSI IRQ */
41 extern int fastlane_esp_detect(struct SHT *);
42 extern int fastlane_esp_release(struct Scsi_Host *);
43 extern const char *esp_info(struct Scsi_Host *);
44 extern int esp_queue(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
45 extern int esp_command(Scsi_Cmnd *);
46 extern int esp_abort(Scsi_Cmnd *);
47 extern int esp_reset(Scsi_Cmnd *, unsigned int);
48 extern int esp_proc_info(char *buffer, char **start, off_t offset, int length,
49 int hostno, int inout);
51 #define SCSI_FASTLANE { proc_dir: &proc_scsi_esp, \
52 proc_info: esp_proc_info, \
53 name: "Fastlane SCSI", \
54 detect: fastlane_esp_detect, \
55 release: fastlane_esp_release, \
56 queuecommand: esp_queue, \
57 abort: esp_abort, \
58 reset: esp_reset, \
59 can_queue: 7, \
60 this_id: 7, \
61 sg_tablesize: SG_ALL, \
62 cmd_per_lun: 1, \
63 use_clustering: ENABLE_CLUSTERING }
65 #endif /* FASTLANE_H */