53c700.txt 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. General Description
  2. ===================
  3. This driver supports the 53c700 and 53c700-66 chips. It also supports
  4. the 53c710 but only in 53c700 emulation mode. It is full featured and
  5. does sync (-66 and 710 only), disconnects and tag command queueing.
  6. Since the 53c700 must be interfaced to a bus, you need to wrapper the
  7. card detector around this driver. For an example, see the
  8. NCR_D700.[ch] or lasi700.[ch] files.
  9. The comments in the 53c700.[ch] files tell you which parts you need to
  10. fill in to get the driver working.
  11. Compile Time Flags
  12. ==================
  13. The driver may be either io mapped or memory mapped. This is
  14. selectable by configuration flags:
  15. CONFIG_53C700_MEM_MAPPED
  16. define if the driver is memory mapped.
  17. CONFIG_53C700_IO_MAPPED
  18. define if the driver is to be io mapped.
  19. One or other of the above flags *must* be defined.
  20. Other flags are:
  21. CONFIG_53C700_LE_ON_BE
  22. define if the chipset must be supported in little endian mode on a big
  23. endian architecture (used for the 700 on parisc).
  24. CONFIG_53C700_USE_CONSISTENT
  25. allocate consistent memory (should only be used if your architecture
  26. has a mixture of consistent and inconsistent memory). Fully
  27. consistent or fully inconsistent architectures should not define this.
  28. Using the Chip Core Driver
  29. ==========================
  30. In order to plumb the 53c700 chip core driver into a working SCSI
  31. driver, you need to know three things about the way the chip is wired
  32. into your system (or expansion card).
  33. 1. The clock speed of the SCSI core
  34. 2. The interrupt line used
  35. 3. The memory (or io space) location of the 53c700 registers.
  36. Optionally, you may also need to know other things, like how to read
  37. the SCSI Id from the card bios or whether the chip is wired for
  38. differential operation.
  39. Usually you can find items 2. and 3. from general spec. documents or
  40. even by examining the configuration of a working driver under another
  41. operating system.
  42. The clock speed is usually buried deep in the technical literature.
  43. It is required because it is used to set up both the synchronous and
  44. asynchronous dividers for the chip. As a general rule of thumb,
  45. manufacturers set the clock speed at the lowest possible setting
  46. consistent with the best operation of the chip (although some choose
  47. to drive it off the CPU or bus clock rather than going to the expense
  48. of an extra clock chip). The best operation clock speeds are:
  49. 53c700 - 25MHz
  50. 53c700-66 - 50MHz
  51. 53c710 - 40Mhz
  52. Writing Your Glue Driver
  53. ========================
  54. This will be a standard SCSI driver (I don't know of a good document
  55. describing this, just copy from some other driver) with at least a
  56. detect and release entry.
  57. In the detect routine, you need to allocate a struct
  58. NCR_700_Host_Parameters sized memory area and clear it (so that the
  59. default values for everything are 0). Then you must fill in the
  60. parameters that matter to you (see below), plumb the NCR_700_intr
  61. routine into the interrupt line and call NCR_700_detect with the host
  62. template and the new parameters as arguments. You should also call
  63. the relevant request_*_region function and place the register base
  64. address into the `base' pointer of the host parameters.
  65. In the release routine, you must free the NCR_700_Host_Parameters that
  66. you allocated, call the corresponding release_*_region and free the
  67. interrupt.
  68. Handling Interrupts
  69. -------------------
  70. In general, you should just plumb the card's interrupt line in with
  71. request_irq(irq, NCR_700_intr, <irq flags>, <driver name>, host);
  72. where host is the return from the relevant NCR_700_detect() routine.
  73. You may also write your own interrupt handling routine which calls
  74. NCR_700_intr() directly. However, you should only really do this if
  75. you have a card with more than one chip on it and you can read a
  76. register to tell which set of chips wants the interrupt.
  77. Settable NCR_700_Host_Parameters
  78. --------------------------------
  79. The following are a list of the user settable parameters:
  80. clock: (MANDATORY)
  81. Set to the clock speed of the chip in MHz.
  82. base: (MANDATORY)
  83. set to the base of the io or mem region for the register set. On 64
  84. bit architectures this is only 32 bits wide, so the registers must be
  85. mapped into the low 32 bits of memory.
  86. pci_dev: (OPTIONAL)
  87. set to the PCI board device. Leave NULL for a non-pci board. This is
  88. used for the pci_alloc_consistent() and pci_map_*() functions.
  89. dmode_extra: (OPTIONAL, 53c710 only)
  90. extra flags for the DMODE register. These are used to control bus
  91. output pins on the 710. The settings should be a combination of
  92. DMODE_FC1 and DMODE_FC2. What these pins actually do is entirely up
  93. to the board designer. Usually it is safe to ignore this setting.
  94. differential: (OPTIONAL)
  95. set to 1 if the chip drives a differential bus.
  96. force_le_on_be: (OPTIONAL, only if CONFIG_53C700_LE_ON_BE is set)
  97. set to 1 if the chip is operating in little endian mode on a big
  98. endian architecture.
  99. chip710: (OPTIONAL)
  100. set to 1 if the chip is a 53c710.
  101. burst_disable: (OPTIONAL, 53c710 only)
  102. disable 8 byte bursting for DMA transfers.