blz2060.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* blz2060.h: Defines and structures for the Blizzard 2060 SCSI driver.
  2.  *
  3.  * Copyright (C) 1996 Jesper Skov (jskov@cygnus.co.uk)
  4.  *
  5.  * This file is based on cyber_esp.h (hence the occasional reference to
  6.  * CyberStorm).
  7.  */
  8. #include "NCR53C9x.h"
  9. #ifndef BLZ2060_H
  10. #define BLZ2060_H
  11. /* The controller registers can be found in the Z2 config area at these
  12.  * offsets:
  13.  */
  14. #define BLZ2060_ESP_ADDR 0x1ff00
  15. #define BLZ2060_DMA_ADDR 0x1ffe0
  16. /* The Blizzard 2060 DMA interface
  17.  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18.  * Only two things can be programmed in the Blizzard DMA:
  19.  *  1) The data direction is controlled by the status of bit 31 (1 = write)
  20.  *  2) The source/dest address (word aligned, shifted one right) in bits 30-0
  21.  *
  22.  * Figure out interrupt status by reading the ESP status byte.
  23.  */
  24. struct blz2060_dma_registers {
  25. volatile unsigned char dma_led_ctrl; /* DMA led control   [0x000] */
  26. unsigned char dmapad1[0x0f];
  27. volatile unsigned char dma_addr0;  /* DMA address (MSB) [0x010] */
  28. unsigned char dmapad2[0x03];
  29. volatile unsigned char dma_addr1;  /* DMA address       [0x014] */
  30. unsigned char dmapad3[0x03];
  31. volatile unsigned char dma_addr2;  /* DMA address       [0x018] */
  32. unsigned char dmapad4[0x03];
  33. volatile unsigned char dma_addr3;  /* DMA address (LSB) [0x01c] */
  34. };
  35. #define BLZ2060_DMA_WRITE 0x80000000
  36. /* DMA control bits */
  37. #define BLZ2060_DMA_LED    0x02 /* HD led control 1 = off */
  38. extern int blz2060_esp_detect(struct SHT *);
  39. extern int blz2060_esp_release(struct Scsi_Host *);
  40. extern const char *esp_info(struct Scsi_Host *);
  41. extern int esp_queue(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
  42. extern int esp_command(Scsi_Cmnd *);
  43. extern int esp_abort(Scsi_Cmnd *);
  44. extern int esp_reset(Scsi_Cmnd *, unsigned int);
  45. extern int esp_proc_info(char *buffer, char **start, off_t offset, int length,
  46.  int hostno, int inout);
  47. #define SCSI_BLZ2060      { proc_name: "esp-blz2060", 
  48.     proc_info: esp_proc_info, 
  49.     name: "Blizzard2060 SCSI", 
  50.     detect: blz2060_esp_detect, 
  51.     release: blz2060_esp_release, 
  52.     queuecommand: esp_queue, 
  53.     abort: esp_abort, 
  54.     reset: esp_reset, 
  55.     can_queue:          7, 
  56.     this_id: 7, 
  57.     sg_tablesize: SG_ALL, 
  58.     cmd_per_lun: 1, 
  59.     use_clustering: ENABLE_CLUSTERING }
  60. #endif /* BLZ2060_H */