aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ncr53c8xx.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/scsi/ncr53c8xx.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/ncr53c8xx.h')
-rw-r--r--drivers/scsi/ncr53c8xx.h101
1 files changed, 101 insertions, 0 deletions
diff --git a/drivers/scsi/ncr53c8xx.h b/drivers/scsi/ncr53c8xx.h
new file mode 100644
index 000000000000..05c7b83cef09
--- /dev/null
+++ b/drivers/scsi/ncr53c8xx.h
@@ -0,0 +1,101 @@
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.
10**
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.
15**
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.
19**
20**-----------------------------------------------------------------------------
21**
22** This driver has been ported to Linux from the FreeBSD NCR53C8XX driver
23** and is currently maintained by
24**
25** Gerard Roudier <groudier@free.fr>
26**
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.
31**
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>
35**
36** And has been ported to NetBSD by
37** Charles M. Hannum <mycroft@gnu.ai.mit.edu>
38**
39*******************************************************************************
40*/
41
42#ifndef NCR53C8XX_H
43#define NCR53C8XX_H
44
45#include <scsi/scsi_host.h>
46
47#include "sym53c8xx_defs.h"
48
49/*
50 Build a scatter/gather entry.
51 see sym53c8xx_2/sym_hipd.h for more detailed sym_build_sge()
52 implementation ;)
53 */
54
55#define ncr_build_sge(np, data, badd, len) \
56do { \
57 (data)->addr = cpu_to_scr(badd); \
58 (data)->size = cpu_to_scr(len); \
59} while (0)
60
61/*==========================================================
62**
63** Structures used by the detection routine to transmit
64** device configuration to the attach function.
65**
66**==========================================================
67*/
68struct ncr_slot {
69 u_long base;
70 u_long base_2;
71 u_long base_c;
72 u_long base_2_c;
73 void __iomem *base_v;
74 void __iomem *base_2_v;
75 int irq;
76/* port and reg fields to use INB, OUTB macros */
77 volatile struct ncr_reg __iomem *reg;
78};
79
80/*==========================================================
81**
82** Structure used by detection routine to save data on
83** each detected board for attach.
84**
85**==========================================================
86*/
87struct ncr_device {
88 struct device *dev;
89 struct ncr_slot slot;
90 struct ncr_chip chip;
91 u_char host_id;
92 u8 differential;
93};
94
95extern struct Scsi_Host *ncr_attach(struct scsi_host_template *tpnt, int unit, struct ncr_device *device);
96extern int ncr53c8xx_release(struct Scsi_Host *host);
97irqreturn_t ncr53c8xx_intr(int irq, void *dev_id, struct pt_regs * regs);
98extern int ncr53c8xx_init(void);
99extern void ncr53c8xx_exit(void);
100
101#endif /* NCR53C8XX_H */