MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / drivers / scsi / ncr53c8xx.h
blobadbb47c929610fd21531e1b73d2f5d0bac039ca4
1 /******************************************************************************
2 ** Device driver for the PCI-SCSI NCR538XX controller family.
3 **
4 ** Copyright (C) 1994 Wolfgang Stanglmeier
5 **
6 ** This program is free software; you can redistribute it and/or modify
7 ** it under the terms of the GNU General Public License as published by
8 ** the Free Software Foundation; either version 2 of the License, or
9 ** (at your option) any later version.
11 ** This program is distributed in the hope that it will be useful,
12 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ** GNU General Public License for more details.
16 ** You should have received a copy of the GNU General Public License
17 ** along with this program; if not, write to the Free Software
18 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 **-----------------------------------------------------------------------------
22 ** This driver has been ported to Linux from the FreeBSD NCR53C8XX driver
23 ** and is currently maintained by
25 ** Gerard Roudier <groudier@free.fr>
27 ** Being given that this driver originates from the FreeBSD version, and
28 ** in order to keep synergy on both, any suggested enhancements and corrections
29 ** received on Linux are automatically a potential candidate for the FreeBSD
30 ** version.
32 ** The original driver has been written for 386bsd and FreeBSD by
33 ** Wolfgang Stanglmeier <wolf@cologne.de>
34 ** Stefan Esser <se@mi.Uni-Koeln.de>
36 ** And has been ported to NetBSD by
37 ** Charles M. Hannum <mycroft@gnu.ai.mit.edu>
39 *******************************************************************************
42 #ifndef NCR53C8XX_H
43 #define NCR53C8XX_H
45 #include <scsi/scsi_host.h>
47 typedef u_long vm_offset_t;
49 #include "sym53c8xx_defs.h"
52 Build a scatter/gather entry.
53 see sym53c8xx_2/sym_hipd.h for more detailed sym_build_sge()
54 implementation ;)
57 #define ncr_build_sge(np, data, badd, len) \
58 do { \
59 (data)->addr = cpu_to_scr(badd); \
60 (data)->size = cpu_to_scr(len); \
61 } while (0)
63 /*==========================================================
65 ** Structures used by the detection routine to transmit
66 ** device configuration to the attach function.
68 **==========================================================
70 struct ncr_slot {
71 u_long base;
72 u_long base_2;
73 u_long base_c;
74 u_long base_2_c;
75 u_long base_v;
76 u_long base_2_v;
77 int irq;
78 /* port and reg fields to use INB, OUTB macros */
79 volatile struct ncr_reg *reg;
82 /*==========================================================
84 ** Structure used by detection routine to save data on
85 ** each detected board for attach.
87 **==========================================================
89 struct ncr_device {
90 struct device *dev;
91 struct ncr_slot slot;
92 struct ncr_chip chip;
93 u_char host_id;
94 u8 differential;
97 extern struct Scsi_Host *ncr_attach(struct scsi_host_template *tpnt, int unit, struct ncr_device *device);
98 extern int ncr53c8xx_release(struct Scsi_Host *host);
99 irqreturn_t ncr53c8xx_intr(int irq, void *dev_id, struct pt_regs * regs);
101 #endif /* NCR53C8XX_H */