Lines Matching full:esp

2 /* esp_scsi.h: Defines and structures for the ESP driver.
15 #define ESP_STATUS 0x04UL /* ro ESP status register 0x10 */
40 /* ESP config reg 1, read-write, found on all ESP chips */
42 #define ESP_CONFIG1_CHTEST 0x08 /* Enable ESP chip tests */
48 /* ESP config reg 2, read-write, found only on esp100a+esp200+esp236 chips */
63 /* ESP config register 3 read-write, found only esp236+fas236+fas100a+hme chips */
65 #define ESP_CONFIG3_TEM 0x01 /* Enable thresh-8 mode (esp/fas236) */
67 #define ESP_CONFIG3_ADMA 0x02 /* Enable alternate-dma (esp/fas236) */
69 #define ESP_CONFIG3_SRB 0x04 /* Save residual byte (esp/fas236) */
71 #define ESP_CONFIG3_FCLK 0x08 /* Fast SCSI clock rate (esp/fas236) */
73 #define ESP_CONFIG3_FSCSI 0x10 /* Enable FAST SCSI (esp/fas236) */
74 #define ESP_CONFIG3_GTM 0x20 /* group2 SCSI2 support (esp/fas236) */
76 #define ESP_CONFIG3_TBMS 0x40 /* Three-byte msg's ok (esp/fas236) */
78 #define ESP_CONFIG3_IMS 0x80 /* ID msg chk'ng (esp/fas236) */
81 /* ESP config register 4 read-write */
95 /* ESP command register read-write */
96 /* Group 1 commands: These may be sent at any point in time to the ESP
99 * SCSI reset interrupts in the config1 ESP register.
106 /* Group 2 commands: ESP must be an initiator and connected to a target
116 /* Group 3 commands: ESP must be in the MSGOUT or MSGIN state and be connected
131 /* Group 4 commands: The ESP must be in the disconnected state and must
144 /* This bit enables the ESP's DMA on the SBus */
147 /* ESP status register read-only */
157 * bit on other revs of the ESP.
162 * with the following values to determine the current phase the ESP
183 /* ESP interrupt register read-only */
193 /* ESP sequence step register read-only */
203 /* Ho hum, some ESP's set the step register to this as well... */
208 /* ESP chip-test register read-write */
213 /* ESP unique ID register read-only, found on fas236+fas100a only */
214 #define ESP_UID_FAM 0xf8 /* ESP family bitmask */
218 /* Values for the ESP family bits */
219 #define ESP_UID_F100A 0x00 /* ESP FAS100A */
220 #define ESP_UID_F236 0x02 /* ESP FAS236 */
224 /* ESP fifo flags register read-only */
225 /* Note that the following implies a 16 byte FIFO on the ESP. */
230 /* ESP clock conversion factor register write-only */
253 * even run that fast with an ESP even with DMA2 scatter gather pipelining.
365 struct esp;
367 /* Read and write the ESP 8-bit registers. On some
368 * applications of the ESP chip the registers are at 4-byte
371 void (*esp_write8)(struct esp *esp, u8 val, unsigned long reg);
372 u8 (*esp_read8)(struct esp *esp, unsigned long reg);
376 * the ESP. This has to be accurate or else the ESP interrupt
379 int (*irq_pending)(struct esp *esp);
384 u32 (*dma_length_limit)(struct esp *esp, u32 dma_addr,
387 /* Reset the DMA engine entirely. On return, ESP interrupts
391 void (*reset_dma)(struct esp *esp);
396 void (*dma_drain)(struct esp *esp);
399 void (*dma_invalidate)(struct esp *esp);
401 /* Setup an ESP command that will use a DMA transfer.
403 * programmed into the ESP transfer counter registers, whereas
407 * holds the ESP command that should be issued by calling
411 void (*send_dma_cmd)(struct esp *esp, u32 dma_addr, u32 esp_count,
417 int (*dma_error)(struct esp *esp);
426 struct esp { struct
545 /* A front-end driver for the ESP chip should do the following in
548 * with size 'sizeof(struct esp)'. The first argument to argument
551 * 3) Set esp->host to the scsi_host itself, and esp->dev
553 * 4) Hook up esp->ops to the front-end implementation.
554 * 5) If the ESP chip supports wide transfers, set ESP_FLAG_WIDE_CAPABLE
555 * in esp->flags.
556 * 6) Map the DMA and ESP chip registers.
557 * 7) DMA map the ESP command block, store the DMA address
558 * in esp->command_block_dma.
561 * esp->scsi_id (assign to esp->host->this_id too)
562 * esp->scsi_id_mask
563 * If ESP bus is differential, set ESP_FLAG_DIFFERENTIAL
564 * esp->cfreq
565 * DMA burst bit mask in esp->bursts, if necessary
566 * 10) Perform any actions necessary before the ESP device can
568 * example, the DMA engine has to be reset before ESP can
571 * 12) Call scsi_esp_register() with prepared 'esp' structure.
576 extern int scsi_esp_register(struct esp *);
578 extern void scsi_esp_unregister(struct esp *);
580 extern void scsi_esp_cmd(struct esp *, u8);
582 extern void esp_send_pio_cmd(struct esp *esp, u32 dma_addr, u32 esp_count,