diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/scsi/g_NCR5380.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'drivers/scsi/g_NCR5380.h')
-rw-r--r-- | drivers/scsi/g_NCR5380.h | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/drivers/scsi/g_NCR5380.h b/drivers/scsi/g_NCR5380.h new file mode 100644 index 000000000000..0c04cefb2a88 --- /dev/null +++ b/drivers/scsi/g_NCR5380.h | |||
@@ -0,0 +1,131 @@ | |||
1 | /* | ||
2 | * Generic Generic NCR5380 driver defines | ||
3 | * | ||
4 | * Copyright 1993, Drew Eckhardt | ||
5 | * Visionary Computing | ||
6 | * (Unix and Linux consulting and custom programming) | ||
7 | * drew@colorado.edu | ||
8 | * +1 (303) 440-4894 | ||
9 | * | ||
10 | * NCR53C400 extensions (c) 1994,1995,1996, Kevin Lentin | ||
11 | * K.Lentin@cs.monash.edu.au | ||
12 | * | ||
13 | * ALPHA RELEASE 1. | ||
14 | * | ||
15 | * For more information, please consult | ||
16 | * | ||
17 | * NCR 5380 Family | ||
18 | * SCSI Protocol Controller | ||
19 | * Databook | ||
20 | * | ||
21 | * NCR Microelectronics | ||
22 | * 1635 Aeroplaza Drive | ||
23 | * Colorado Springs, CO 80916 | ||
24 | * 1+ (719) 578-3400 | ||
25 | * 1+ (800) 334-5454 | ||
26 | */ | ||
27 | |||
28 | /* | ||
29 | * $Log: generic_NCR5380.h,v $ | ||
30 | */ | ||
31 | |||
32 | #ifndef GENERIC_NCR5380_H | ||
33 | #define GENERIC_NCR5380_H | ||
34 | |||
35 | #include <linux/config.h> | ||
36 | |||
37 | #define GENERIC_NCR5380_PUBLIC_RELEASE 1 | ||
38 | |||
39 | #ifdef NCR53C400 | ||
40 | #define BIOSPARAM | ||
41 | #define NCR5380_BIOSPARAM generic_NCR5380_biosparam | ||
42 | #else | ||
43 | #define NCR5380_BIOSPARAM NULL | ||
44 | #endif | ||
45 | |||
46 | #ifndef ASM | ||
47 | static int generic_NCR5380_abort(Scsi_Cmnd *); | ||
48 | static int generic_NCR5380_detect(Scsi_Host_Template *); | ||
49 | static int generic_NCR5380_release_resources(struct Scsi_Host *); | ||
50 | static int generic_NCR5380_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); | ||
51 | static int generic_NCR5380_bus_reset(Scsi_Cmnd *); | ||
52 | static int generic_NCR5380_host_reset(Scsi_Cmnd *); | ||
53 | static int generic_NCR5380_device_reset(Scsi_Cmnd *); | ||
54 | static const char* generic_NCR5380_info(struct Scsi_Host *); | ||
55 | |||
56 | #ifndef CMD_PER_LUN | ||
57 | #define CMD_PER_LUN 2 | ||
58 | #endif | ||
59 | |||
60 | #ifndef CAN_QUEUE | ||
61 | #define CAN_QUEUE 16 | ||
62 | #endif | ||
63 | |||
64 | #ifndef HOSTS_C | ||
65 | |||
66 | #define __STRVAL(x) #x | ||
67 | #define STRVAL(x) __STRVAL(x) | ||
68 | |||
69 | #ifndef CONFIG_SCSI_G_NCR5380_MEM | ||
70 | |||
71 | #define NCR5380_map_config port | ||
72 | #define NCR5380_map_type int | ||
73 | #define NCR5380_map_name port | ||
74 | #define NCR5380_instance_name io_port | ||
75 | #define NCR53C400_register_offset 0 | ||
76 | #define NCR53C400_address_adjust 8 | ||
77 | |||
78 | #ifdef NCR53C400 | ||
79 | #define NCR5380_region_size 16 | ||
80 | #else | ||
81 | #define NCR5380_region_size 8 | ||
82 | #endif | ||
83 | |||
84 | #define NCR5380_read(reg) (inb(NCR5380_map_name + (reg))) | ||
85 | #define NCR5380_write(reg, value) (outb((value), (NCR5380_map_name + (reg)))) | ||
86 | |||
87 | #else | ||
88 | /* therefore CONFIG_SCSI_G_NCR5380_MEM */ | ||
89 | |||
90 | #define NCR5380_map_config memory | ||
91 | #define NCR5380_map_type unsigned long | ||
92 | #define NCR5380_map_name base | ||
93 | #define NCR5380_instance_name base | ||
94 | #define NCR53C400_register_offset 0x108 | ||
95 | #define NCR53C400_address_adjust 0 | ||
96 | #define NCR53C400_mem_base 0x3880 | ||
97 | #define NCR53C400_host_buffer 0x3900 | ||
98 | #define NCR5380_region_size 0x3a00 | ||
99 | |||
100 | #define NCR5380_read(reg) isa_readb(NCR5380_map_name + NCR53C400_mem_base + (reg)) | ||
101 | #define NCR5380_write(reg, value) isa_writeb(value, NCR5380_map_name + NCR53C400_mem_base + (reg)) | ||
102 | #endif | ||
103 | |||
104 | #define NCR5380_implementation_fields \ | ||
105 | NCR5380_map_type NCR5380_map_name | ||
106 | |||
107 | #define NCR5380_local_declare() \ | ||
108 | register NCR5380_implementation_fields | ||
109 | |||
110 | #define NCR5380_setup(instance) \ | ||
111 | NCR5380_map_name = (NCR5380_map_type)((instance)->NCR5380_instance_name) | ||
112 | |||
113 | #define NCR5380_intr generic_NCR5380_intr | ||
114 | #define NCR5380_queue_command generic_NCR5380_queue_command | ||
115 | #define NCR5380_abort generic_NCR5380_abort | ||
116 | #define NCR5380_bus_reset generic_NCR5380_bus_reset | ||
117 | #define NCR5380_device_reset generic_NCR5380_device_reset | ||
118 | #define NCR5380_host_reset generic_NCR5380_host_reset | ||
119 | #define NCR5380_pread generic_NCR5380_pread | ||
120 | #define NCR5380_pwrite generic_NCR5380_pwrite | ||
121 | #define NCR5380_proc_info notyet_generic_proc_info | ||
122 | |||
123 | #define BOARD_NCR5380 0 | ||
124 | #define BOARD_NCR53C400 1 | ||
125 | #define BOARD_NCR53C400A 2 | ||
126 | #define BOARD_DTC3181E 3 | ||
127 | |||
128 | #endif /* else def HOSTS_C */ | ||
129 | #endif /* ndef ASM */ | ||
130 | #endif /* GENERIC_NCR5380_H */ | ||
131 | |||