AU1xxx_IDE.README 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. README for MIPS AU1XXX IDE driver - Released 2005-07-15
  2. ABOUT
  3. -----
  4. This file describes the 'drivers/ide/mips/au1xxx-ide.c', related files and the
  5. services they provide.
  6. If you are short in patience and just want to know how to add your hard disc to
  7. the white or black list, go to the 'ADD NEW HARD DISC TO WHITE OR BLACK LIST'
  8. section.
  9. LICENSE
  10. -------
  11. Copyright (c) 2003-2005 AMD, Personal Connectivity Solutions
  12. This program is free software; you can redistribute it and/or modify it under
  13. the terms of the GNU General Public License as published by the Free Software
  14. Foundation; either version 2 of the License, or (at your option) any later
  15. version.
  16. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
  17. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  18. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
  19. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  20. CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  21. SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  22. INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  23. CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  24. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  25. POSSIBILITY OF SUCH DAMAGE.
  26. You should have received a copy of the GNU General Public License along with
  27. this program; if not, write to the Free Software Foundation, Inc.,
  28. 675 Mass Ave, Cambridge, MA 02139, USA.
  29. Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE
  30. Interface and Linux Device Driver" Application Note.
  31. FILES, CONFIGS AND COMPATABILITY
  32. --------------------------------
  33. Two files are introduced:
  34. a) 'include/asm-mips/mach-au1x00/au1xxx_ide.h'
  35. containes : struct _auide_hwif
  36. struct drive_list_entry dma_white_list
  37. struct drive_list_entry dma_black_list
  38. timing parameters for PIO mode 0/1/2/3/4
  39. timing parameters for MWDMA 0/1/2
  40. b) 'drivers/ide/mips/au1xxx-ide.c'
  41. contains the functionality of the AU1XXX IDE driver
  42. Four configs variables are introduced:
  43. CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA - enable the PIO+DBDMA mode
  44. CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA - enable the MWDMA mode
  45. CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON - set Burstable FIFO in DBDMA
  46. controler
  47. CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ - maximum transfer size
  48. per descriptor
  49. If MWDMA is enabled and the connected hard disc is not on the white list, the
  50. kernel switches to a "safe mwdma mode" at boot time. In this mode the IDE
  51. performance is substantial slower then in full speed mwdma. In this case
  52. please add your hard disc to the white list (follow instruction from 'ADD NEW
  53. HARD DISC TO WHITE OR BLACK LIST' section).
  54. SUPPORTED IDE MODES
  55. -------------------
  56. The AU1XXX IDE driver supported all PIO modes - PIO mode 0/1/2/3/4 - and all
  57. MWDMA modes - MWDMA 0/1/2 -. There is no support for SWDMA and UDMA mode.
  58. To change the PIO mode use the program hdparm with option -p, e.g.
  59. 'hdparm -p0 [device]' for PIO mode 0. To enable the MWDMA mode use the option
  60. -X, e.g. 'hdparm -X32 [device]' for MWDMA mode 0.
  61. PERFORMANCE CONFIGURATIONS
  62. --------------------------
  63. If the used system doesn't need USB support enable the following kernel configs:
  64. CONFIG_IDE=y
  65. CONFIG_BLK_DEV_IDE=y
  66. CONFIG_IDE_GENERIC=y
  67. CONFIG_BLK_DEV_IDEPCI=y
  68. CONFIG_BLK_DEV_GENERIC=y
  69. CONFIG_BLK_DEV_IDEDMA_PCI=y
  70. CONFIG_IDEDMA_PCI_AUTO=y
  71. CONFIG_BLK_DEV_IDE_AU1XXX=y
  72. CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA=y
  73. CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ=128
  74. CONFIG_BLK_DEV_IDEDMA=y
  75. CONFIG_IDEDMA_AUTO=y
  76. Also define 'IDE_AU1XXX_BURSTMODE' in 'drivers/ide/mips/au1xxx-ide.c' to enable
  77. the burst support on DBDMA controller.
  78. If the used system need the USB support enable the following kernel configs for
  79. high IDE to USB throughput.
  80. CONFIG_BLK_DEV_IDEDISK=y
  81. CONFIG_IDE_GENERIC=y
  82. CONFIG_BLK_DEV_IDEPCI=y
  83. CONFIG_BLK_DEV_GENERIC=y
  84. CONFIG_BLK_DEV_IDEDMA_PCI=y
  85. CONFIG_IDEDMA_PCI_AUTO=y
  86. CONFIG_BLK_DEV_IDE_AU1XXX=y
  87. CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA=y
  88. CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ=128
  89. CONFIG_BLK_DEV_IDEDMA=y
  90. CONFIG_IDEDMA_AUTO=y
  91. Also undefine 'IDE_AU1XXX_BURSTMODE' in 'drivers/ide/mips/au1xxx-ide.c' to
  92. disable the burst support on DBDMA controller.
  93. ADD NEW HARD DISC TO WHITE OR BLACK LIST
  94. ----------------------------------------
  95. Step 1 : detect the model name of your hard disc
  96. a) connect your hard disc to the AU1XXX
  97. b) boot your kernel and get the hard disc model.
  98. Example boot log:
  99. --snipped--
  100. Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
  101. ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
  102. Au1xxx IDE(builtin) configured for MWDMA2
  103. Probing IDE interface ide0...
  104. hda: Maxtor 6E040L0, ATA DISK drive
  105. ide0 at 0xac800000-0xac800007,0xac8001c0 on irq 64
  106. hda: max request size: 64KiB
  107. hda: 80293248 sectors (41110 MB) w/2048KiB Cache, CHS=65535/16/63, (U)DMA
  108. --snipped--
  109. In this example 'Maxtor 6E040L0'.
  110. Step 2 : edit 'include/asm-mips/mach-au1x00/au1xxx_ide.h'
  111. Add your hard disc to the dma_white_list or dma_black_list structur.
  112. Step 3 : Recompile the kernel
  113. Enable MWDMA support in the kernel configuration. Recompile the kernel and
  114. reboot.
  115. Step 4 : Tests
  116. If you have add a hard disc to the white list, please run some stress tests
  117. for verification.
  118. ACKNOWLEDGMENTS
  119. ---------------
  120. These drivers wouldn't have been done without the base of kernel 2.4.x AU1XXX
  121. IDE driver from AMD.
  122. Additional input also from:
  123. Matthias Lenk <matthias.lenk@amd.com>
  124. Happy hacking!
  125. Enrico Walther <enrico.walther@amd.com>