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