freebsd-nq/sys/i386/isa/options.h
Jordan K. Hubbard 05e1d9d455 Changes to incorporate the Matsushita CDROM driver (otherwise known as
the "Sound blaster CDROM").
Submitted by:	Frank Durda IV <bsdmail@nemesis.lonestar.org>
1995-03-02 04:07:03 +00:00

251 lines
9.1 KiB
C

/*options.h--------------------------------------------------------------------
Matsushita(Panasonic) / Creative CD-ROM Driver (matcd)
Authored by Frank Durda IV
Copyright 1994, 1995 Frank Durda IV. All rights reserved.
"FDIV" is a trademark of Frank Durda IV.
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:
1. Redistributions of source code must retain the above copyright
notice positioned at the very beginning of this file without
modification, all copyright strings, all related programming
codes that display the copyright strings, this list of
conditions and the following disclaimer.
2. Redistributions in binary form must contain all copyright strings
and related programming code that display the copyright strings.
3. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
4. All advertising materials mentioning features or use of this
software must display the following acknowledgement:
"The Matsushita/Panasonic CD-ROM driver was developed
by Frank Durda IV for use with "FreeBSD" and similar
operating systems."
"Similar operating systems" includes mainly non-profit oriented
systems for research and education, including but not restricted
to "NetBSD", "386BSD", and "Mach" (by CMU). The wording of the
acknowledgement (in electronic form or printed text) may not be
changed without permission from the author.
5. Absolutely no warranty of function, fitness or purpose is made
by the author Frank Durda IV.
6. Neither the name of the author nor the name "FreeBSD" may
be used to endorse or promote products derived from this software
without specific prior written permission.
(The author can be reached at bsdmail@nemesis.lonestar.org)
7. The product containing this software must meet all of these
conditions even if it is unsupported, not a complete system
and/or does not contain compiled code.
8. These conditions will be in force for the full life of the
copyright.
9. If all the above conditions are met, modifications to other
parts of this file may be freely made, although any person
or persons making changes do not receive the right to add their
name or names to the copyright strings and notices in this
software. Persons making changes are encouraged to insert edit
history in matcd.c and to put your name and details of the
change there.
10. You must have prior written permission from the author to
deviate from these terms.
Vendors who produce product(s) containing this code are encouraged
(but not required) to provide copies of the finished product(s) to
the author and to correspond with the author about development
activity relating to this code. Donations of development hardware
and/or software are also welcome. (This is one of the faster ways
to get a driver developed for a device.)
THIS SOFTWARE IS PROVIDED BY THE DEVELOPER(S) ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE DEVELOPER(S) BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
Conditional compilation flags - change to suit your system
---------------------------------------------------------------------------*/
/* AUTOHUNT Adds extra code that allows the driver to search
for interface cards rather than having to hard-code
the locations in the kernel conf file.
Leaving AUTOHUNT enabled is the recommended setting.
*/
#define AUTOHUNT
/* FULLCONFIG Allows up to four host interface boards for a
total of 16 drives. If disabled, only a single
host interface (of any type) is allowed. The
additional driver size is insignificant.
Leaving FULLCONFIG enabled is the recommended setting.
*/
#define FULLCONFIG
/* FULLDRIVER If not set, the audio, non-data functions and
some error recovery functions are eliminated from
the compiled driver. The resulting driver will be
smaller and may help a kernel fit on a boot floppy.
Leaving FULLDRIVER enabled is the recommended setting.
*/
#define FULLDRIVER
/* RESETONBOOT causes the driver to reset the drive(s) to be
reset during probing. This causes any audio
playback to be aborted and the drives will close
their trays if they are open.
Leaving RESETONBOOT enabled is the recommended setting.
*/
#define RESETONBOOT
/* LOCKDRIVE If enabled, the when the drive is open, the
door is locked. The front panel eject button
is ignored. When the drive is completely closed,
the eject button will be honored.
Leaving LOCKDRIVE disabled is the recommended setting.
*/
/*#define LOCKDRIVE*/
/*<5> FREE2 If enabled, the changes are inserted so this
<5> module will compile in the world of FreeBSD 2.x.
<5> Without this, it is known to work in
<5> FreeBSD 1.1.5.1.
<5>*/
#define FREE2 /*<5>Correct setting for 2.x*/
/*---------------------------------------------------------------------------
This structure contains the hints for where we should look for the
host adapter. If you want to change where we search or reduce the
places we search to avoid confusing some other device, either
specify explicit addresses in the kernel config file (preferred)
or change this array.
If the kernel config fuke has multiple ? entries, the probe routines
will use this table multiple times and will eliminate each failed
entry probe tries.
WARNING: The number of controller entries for this driver in config
must be less than or equal to the number of hints if hints are used.
If you add entries to the table, add them immediately before
the -1 end-of-table marker. The values already present are
the ones found on standard SoundBlaster 16 and standalone cards.
---------------------------------------------------------------------------*/
#ifdef AUTOHUNT
int port_hints[]={
0x230,0x240, /*Ports SB audio boards can use*/
0x250,0x260, /*Ports standalone CD/IF board can*/
-1}; /*use. Table MUST end with -1*/
#endif /*AUTOHUNT*/
/*---------------------------------------------------------------------------
Debugging flags - Turn these on only if you are looking at a
problem.
---------------------------------------------------------------------------*/
/* DEBUGOPEN If enabled, debug messages for open and close
operations.
*/
/*#define DEBUGOPEN*/
/* DEBUGIO If enabled, reports on calls to strategy, start
and other I/O related functions.
*/
/*#define DEBUGIO*/
/* DEBUGQUEUE If enabled, shows activity on disk request queues.
Warning - This debug is VERY VERY NOISY and will
loop endlessly if queues are not null terminated
as they should be.
*/
/*#define DEBUGQUEUE*/
/* DEBUGCMD If enabled, shows the actual commands being issued
to the CD-ROM drives.
*/
/*#define DEBUGCMD*/
/* DEBUGSLEEP If enabled, reports on timeouts, wakeups, dropped
threads, etc.
*/
/*#define DEBUGSLEEP*/
/* DEBUGIOCTL If enabled, reports on the various ioctl-related
calls and operations. You might have to enable
DEBUGCMD as well to get enough debugging information.
*/
/*#define DEBUGIOCTL*/
/* DEBUGPROBE If enabled, reports on the process of locating
adapters and drives. The debugging in matcdprobe()
and matcdattach() routines is enabled with this
flag.
*/
/*#define DEBUGPROBE*/
/* DIAGPORT If enabled, additional code is added to send
debugging state to a debug port. This should
not be enabled in production. The value
can be set to 0x80 or 0x302, depending on what
type of debugging board you own. The global variable
diagloop is used to make looping reports on these
devices.
Some other drivers and possible the kernel fiddle
with the 0x80 debug port, so it may not be usable
for isolating failures that result in a kernel panic.
The 0x302 debug board is recommended in these cases.
It also displays a word of data, so you get more
detail.
<10> It was discovered the 0x302 board was getting set
<10> into a strange state by the probes for other
<10> devices. To resolve this, the display control port
<10> (0x300) is reset in our probe and open routines.
<10> DO NOT use DIAGPORT 0x302 if an adapter is present
<10> at that address. It could ruin the EEPROM settings
<10> on the device.
*/
/*#define DIAGPORT 0x80*/
/*#define DIAGPORT 0x302*/
/*End of options.h*/