Source
/*
* Driver for Western Digital WD7193, WD7197 and WD7296 SCSI cards
* Copyright 2013 Ondrej Zary
*
* Original driver by
* Aaron Dewell <dewell@woods.net>
* Gaerti <Juergen.Gaertner@mbox.si.uni-hannover.de>
*
* HW documentation available in book:
*
* SPIDER Command Protocol
* by Chandru M. Sippy
* SCSI Storage Products (MCP)
* Western Digital Corporation
* 09-15-95
*
* http://web.archive.org/web/20070717175254/http://sun1.rrzn.uni-hannover.de/gaertner.juergen/wd719x/Linux/Docu/Spider/
*/
/*
* Driver workflow:
* 1. SCSI command is transformed to SCB (Spider Control Block) by the
* queuecommand function.
* 2. The address of the SCB is stored in a list to be able to access it, if
* something goes wrong.
* 3. The address of the SCB is written to the Controller, which loads the SCB
* via BM-DMA and processes it.
* 4. After it has finished, it generates an interrupt, and sets registers.
*
* flaws:
* - abort/reset functions
*
* ToDo:
* - tagged queueing
*/
/* low-level register access */
static inline u8 wd719x_readb(struct wd719x *wd, u8 reg)
{
return ioread8(wd->base + reg);
}
static inline u32 wd719x_readl(struct wd719x *wd, u8 reg)
{
return ioread32(wd->base + reg);
}
static inline void wd719x_writeb(struct wd719x *wd, u8 reg, u8 val)
{
iowrite8(val, wd->base + reg);
}