linux/drivers/scsi/ppa.h

/* SPDX-License-Identifier: GPL-2.0 */
/*  Driver for the PPA3 parallel port SCSI HBA embedded in 
 * the Iomega ZIP drive
 * 
 * (c) 1996     Grant R. Guenther  [email protected]
 *              David Campbell
 *
 *      All comments to David.
 */

#ifndef _PPA_H
#define _PPA_H

#define PPA_VERSION

/* 
 * this driver has been hacked by Matteo Frigo ([email protected])
 * to support EPP and scatter-gather.                        [0.26-athena]
 *
 * additional hacks by David Campbell
 * in response to this driver "mis-behaving" on his machine.
 *      Fixed EPP to handle "software" changing of EPP port data direction.
 *      Chased down EPP timeouts
 *      Made this driver "kernel version friendly"           [0.28-athena]
 *
 * [ Stuff removed ]
 *
 * Corrected ppa.h for 2.1.x kernels (>=2.1.85)
 * Modified "Nat Semi Kludge" for extended chipsets
 *                                                      [1.41]
 *
 * Fixed id_probe for EPP 1.9 chipsets (misdetected as EPP 1.7)
 *                                                      [1.42]
 *
 * Development solely for 2.1.x kernels from now on!
 *                                                      [2.00]
 *
 * Hack and slash at the init code (EPP device check routine)
 * Added INSANE option.
 *                                                      [2.01]
 *
 * Patch applied to sync against the 2.1.x kernel code
 * Included qboot_zip.sh
 *                                                      [2.02]
 *
 * Cleaned up the mess left by someone else trying to fix the
 * asm section to keep egcc happy. The asm section no longer
 * exists, the nibble code is *almost* as fast as the asm code
 * providing it is compiled with egcc.
 *
 * Other clean ups include the follow changes:
 *    CONFIG_SCSI_PPA_HAVE_PEDANTIC => CONFIG_SCSI_IZIP_EPP16
 *    added CONFIG_SCSI_IZIP_SLOW_CTR option
 *                                                      [2.03]
 *
 * Use ppa_wait() to check for ready AND connected status bits
 * Add ppa_wait() calls to ppa_completion()
 *  by Peter Cherriman <[email protected]> and
 *     Tim Waugh <[email protected]>
 *							[2.04]
 *
 * Fix kernel panic on scsi timeout, 2000-08-18		[2.05]
 *
 * Avoid io_request_lock problems.
 * John Cavan <[email protected]>			[2.06]
 *
 * Busy wait for connected status bit in ppa_completion()
 *  in order to cope with some hardware that has this bit low
 *  for short periods of time.
 * Add udelay() to ppa_select()
 *  by Peter Cherriman <[email protected]> and
 *     Oleg Makarenko <[email protected]>         
 *                                                      [2.07]
 */
/* ------ END OF USER CONFIGURABLE PARAMETERS ----- */

#include  <linux/stddef.h>
#include  <linux/module.h>
#include  <linux/kernel.h>
#include  <linux/ioport.h>
#include  <linux/delay.h>
#include  <linux/proc_fs.h>
#include  <linux/stat.h>
#include  <linux/blkdev.h>
#include  <linux/sched.h>
#include  <linux/interrupt.h>

#include  <asm/io.h>
#include  <scsi/scsi_host.h>
/* batteries not included :-) */

/*
 * modes in which the driver can operate 
 */
#define PPA_AUTODETECT
#define PPA_NIBBLE
#define PPA_PS2
#define PPA_EPP_8
#define PPA_EPP_16
#define PPA_EPP_32
#define PPA_UNKNOWN

static char *PPA_MODE_STRING[] =;

/* other options */
#define PPA_BURST_SIZE
#define PPA_SELECT_TMO
#define PPA_SPIN_TMO
#define PPA_RECON_TMO
#define PPA_DEBUG
#define IN_EPP_MODE(x)

/* args to ppa_connect */
#define CONNECT_EPP_MAYBE
#define CONNECT_NORMAL

#define r_dtr(x)
#define r_str(x)
#define r_ctr(x)
#define r_epp(x)
#define r_fifo(x)
					/* On PCI is base+0x400 != base_hi */
#define r_ecr(x)

#define w_dtr(x,y)
#define w_str(x,y)
#define w_epp(x,y)
#define w_fifo(x,y)
#define w_ecr(x,y)

#ifdef CONFIG_SCSI_IZIP_SLOW_CTR
#define w_ctr(x,y)
#else
#define w_ctr
#endif

static int ppa_engine(ppa_struct *, struct scsi_cmnd *);

#endif				/* _PPA_H */