1bb5bdd38SSøren Schmidt /*- 29a14aa01SUlrich Spörlein * Copyright (c) 2003 - 2008 Søren Schmidt <sos@FreeBSD.org> 3bb5bdd38SSøren Schmidt * All rights reserved. 4bb5bdd38SSøren Schmidt * 5bb5bdd38SSøren Schmidt * Redistribution and use in source and binary forms, with or without 6bb5bdd38SSøren Schmidt * modification, are permitted provided that the following conditions 7bb5bdd38SSøren Schmidt * are met: 8bb5bdd38SSøren Schmidt * 1. Redistributions of source code must retain the above copyright 9bb5bdd38SSøren Schmidt * notice, this list of conditions and the following disclaimer, 10bb5bdd38SSøren Schmidt * without modification, immediately at the beginning of the file. 11bb5bdd38SSøren Schmidt * 2. Redistributions in binary form must reproduce the above copyright 12bb5bdd38SSøren Schmidt * notice, this list of conditions and the following disclaimer in the 13bb5bdd38SSøren Schmidt * documentation and/or other materials provided with the distribution. 14bb5bdd38SSøren Schmidt * 15bb5bdd38SSøren Schmidt * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16bb5bdd38SSøren Schmidt * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17bb5bdd38SSøren Schmidt * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18bb5bdd38SSøren Schmidt * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19bb5bdd38SSøren Schmidt * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20bb5bdd38SSøren Schmidt * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21bb5bdd38SSøren Schmidt * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22bb5bdd38SSøren Schmidt * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23bb5bdd38SSøren Schmidt * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24bb5bdd38SSøren Schmidt * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25bb5bdd38SSøren Schmidt * 26bb5bdd38SSøren Schmidt * $FreeBSD$ 27bb5bdd38SSøren Schmidt */ 28bb5bdd38SSøren Schmidt 29bb5bdd38SSøren Schmidt /* structure holding chipset config info */ 30bb5bdd38SSøren Schmidt struct ata_chip_id { 31566cf07aSSøren Schmidt u_int32_t chipid; 32bb5bdd38SSøren Schmidt u_int8_t chiprev; 33bb5bdd38SSøren Schmidt int cfg1; 34bb5bdd38SSøren Schmidt int cfg2; 35bb5bdd38SSøren Schmidt u_int8_t max_dma; 365187458fSMarius Strobl const char *text; 37bb5bdd38SSøren Schmidt }; 38bb5bdd38SSøren Schmidt 396bd8779bSAlexander Motin #define ATA_PCI_MAX_CH 8 406bd8779bSAlexander Motin 41bb5bdd38SSøren Schmidt /* structure describing a PCI ATA controller */ 42bb5bdd38SSøren Schmidt struct ata_pci_controller { 438ca4df32SSøren Schmidt device_t dev; 44498e5543SSøren Schmidt int r_type1; 45498e5543SSøren Schmidt int r_rid1; 46498e5543SSøren Schmidt struct resource *r_res1; 47498e5543SSøren Schmidt int r_type2; 48498e5543SSøren Schmidt int r_rid2; 49498e5543SSøren Schmidt struct resource *r_res2; 50a3b7c762SAlexander Motin int r_irq_rid; 51bb5bdd38SSøren Schmidt struct resource *r_irq; 52bb5bdd38SSøren Schmidt void *handle; 535187458fSMarius Strobl const struct ata_chip_id *chip; 54cb33306fSAlexander Motin int legacy; 556192895dSSøren Schmidt int channels; 569f8919f2SAlexander Motin int ichannels; 57bb5bdd38SSøren Schmidt int (*chipinit)(device_t); 58dd60e051SAlexander Motin int (*chipdeinit)(device_t); 597aab7e05SSøren Schmidt int (*suspend)(device_t); 607aab7e05SSøren Schmidt int (*resume)(device_t); 6104ff88ceSAlexander Motin int (*ch_attach)(device_t); 6204ff88ceSAlexander Motin int (*ch_detach)(device_t); 639cf4fe2eSAlexander Motin int (*ch_suspend)(device_t); 649cf4fe2eSAlexander Motin int (*ch_resume)(device_t); 650068f98fSSøren Schmidt void (*reset)(device_t); 66066f913aSAlexander Motin int (*setmode)(device_t, int, int); 67066f913aSAlexander Motin int (*getrev)(device_t, int); 68bb5bdd38SSøren Schmidt struct { 69bb5bdd38SSøren Schmidt void (*function)(void *); 70bb5bdd38SSøren Schmidt void *argument; 716bd8779bSAlexander Motin } interrupt[ATA_PCI_MAX_CH]; 72bb2aebf3SJohn Baldwin void *chipset_data; 738ca4df32SSøren Schmidt }; 748ca4df32SSøren Schmidt 75bb5bdd38SSøren Schmidt /* defines for known chipset PCI id's */ 76bb5bdd38SSøren Schmidt #define ATA_ACARD_ID 0x1191 77bb5bdd38SSøren Schmidt #define ATA_ATP850 0x00021191 78bb5bdd38SSøren Schmidt #define ATA_ATP850A 0x00041191 79bb5bdd38SSøren Schmidt #define ATA_ATP850R 0x00051191 80bb5bdd38SSøren Schmidt #define ATA_ATP860A 0x00061191 81bb5bdd38SSøren Schmidt #define ATA_ATP860R 0x00071191 82bb5bdd38SSøren Schmidt #define ATA_ATP865A 0x00081191 83bb5bdd38SSøren Schmidt #define ATA_ATP865R 0x00091191 84bb5bdd38SSøren Schmidt 85347458c9SSøren Schmidt #define ATA_ACER_LABS_ID 0x10b9 86347458c9SSøren Schmidt #define ATA_ALI_1533 0x153310b9 87f60d46f9SAlexander Motin #define ATA_ALI_5228 0x522810b9 88347458c9SSøren Schmidt #define ATA_ALI_5229 0x522910b9 89347458c9SSøren Schmidt #define ATA_ALI_5281 0x528110b9 90347458c9SSøren Schmidt #define ATA_ALI_5287 0x528710b9 91347458c9SSøren Schmidt #define ATA_ALI_5288 0x528810b9 92347458c9SSøren Schmidt #define ATA_ALI_5289 0x528910b9 93347458c9SSøren Schmidt 94bb5bdd38SSøren Schmidt #define ATA_AMD_ID 0x1022 95bb5bdd38SSøren Schmidt #define ATA_AMD755 0x74011022 96bb5bdd38SSøren Schmidt #define ATA_AMD756 0x74091022 97bb5bdd38SSøren Schmidt #define ATA_AMD766 0x74111022 98bb5bdd38SSøren Schmidt #define ATA_AMD768 0x74411022 99bb5bdd38SSøren Schmidt #define ATA_AMD8111 0x74691022 10013a3fdf1SPoul-Henning Kamp #define ATA_AMD5536 0x209a1022 1014587cbadSAlexander Motin #define ATA_AMD_HUDSON2_S1 0x78001022 1024587cbadSAlexander Motin #define ATA_AMD_HUDSON2_S2 0x78011022 1034587cbadSAlexander Motin #define ATA_AMD_HUDSON2_S3 0x78021022 1044587cbadSAlexander Motin #define ATA_AMD_HUDSON2_S4 0x78031022 1054587cbadSAlexander Motin #define ATA_AMD_HUDSON2_S5 0x78041022 1064587cbadSAlexander Motin #define ATA_AMD_HUDSON2 0x780c1022 107bb5bdd38SSøren Schmidt 108347458c9SSøren Schmidt #define ATA_ADAPTEC_ID 0x9005 109347458c9SSøren Schmidt #define ATA_ADAPTEC_1420 0x02419005 1106aca3a5dSAlexander Motin #define ATA_ADAPTEC_1430 0x02439005 111bb5bdd38SSøren Schmidt 1127ebce023SSøren Schmidt #define ATA_ATI_ID 0x1002 1137ebce023SSøren Schmidt #define ATA_ATI_IXP200 0x43491002 1147ebce023SSøren Schmidt #define ATA_ATI_IXP300 0x43691002 1157ebce023SSøren Schmidt #define ATA_ATI_IXP300_S1 0x436e1002 116200c7605SSøren Schmidt #define ATA_ATI_IXP400 0x43761002 1177ebce023SSøren Schmidt #define ATA_ATI_IXP400_S1 0x43791002 1187ebce023SSøren Schmidt #define ATA_ATI_IXP400_S2 0x437a1002 119200c7605SSøren Schmidt #define ATA_ATI_IXP600 0x438c1002 1200ef03238SSøren Schmidt #define ATA_ATI_IXP600_S1 0x43801002 121200c7605SSøren Schmidt #define ATA_ATI_IXP700 0x439c1002 1220ef03238SSøren Schmidt #define ATA_ATI_IXP700_S1 0x43901002 123f71ac6d6SJung-uk Kim #define ATA_ATI_IXP700_S2 0x43911002 124f71ac6d6SJung-uk Kim #define ATA_ATI_IXP700_S3 0x43921002 125f71ac6d6SJung-uk Kim #define ATA_ATI_IXP700_S4 0x43931002 126f71ac6d6SJung-uk Kim #define ATA_ATI_IXP800_S1 0x43941002 127f71ac6d6SJung-uk Kim #define ATA_ATI_IXP800_S2 0x43951002 1287ebce023SSøren Schmidt 12988bdf804SSøren Schmidt #define ATA_CENATEK_ID 0x16ca 13088bdf804SSøren Schmidt #define ATA_CENATEK_ROCKET 0x000116ca 13188bdf804SSøren Schmidt 132bb5bdd38SSøren Schmidt #define ATA_CYRIX_ID 0x1078 133bb5bdd38SSøren Schmidt #define ATA_CYRIX_5530 0x01021078 134bb5bdd38SSøren Schmidt 135bb5bdd38SSøren Schmidt #define ATA_CYPRESS_ID 0x1080 136bb5bdd38SSøren Schmidt #define ATA_CYPRESS_82C693 0xc6931080 137bb5bdd38SSøren Schmidt 138bb5bdd38SSøren Schmidt #define ATA_DEC_21150 0x00221011 1396595b494SSøren Schmidt #define ATA_DEC_21150_1 0x00231011 140bb5bdd38SSøren Schmidt 141bb5bdd38SSøren Schmidt #define ATA_HIGHPOINT_ID 0x1103 142bb5bdd38SSøren Schmidt #define ATA_HPT366 0x00041103 143bb5bdd38SSøren Schmidt #define ATA_HPT372 0x00051103 144bb5bdd38SSøren Schmidt #define ATA_HPT302 0x00061103 145bb5bdd38SSøren Schmidt #define ATA_HPT371 0x00071103 146bb5bdd38SSøren Schmidt #define ATA_HPT374 0x00081103 147bb5bdd38SSøren Schmidt 148bb5bdd38SSøren Schmidt #define ATA_INTEL_ID 0x8086 149bb5bdd38SSøren Schmidt #define ATA_I960RM 0x09628086 150bb5bdd38SSøren Schmidt #define ATA_I82371FB 0x12308086 151bb5bdd38SSøren Schmidt #define ATA_I82371SB 0x70108086 152bb5bdd38SSøren Schmidt #define ATA_I82371AB 0x71118086 153bb5bdd38SSøren Schmidt #define ATA_I82443MX 0x71998086 154bb5bdd38SSøren Schmidt #define ATA_I82451NX 0x84ca8086 155bb5bdd38SSøren Schmidt #define ATA_I82372FB 0x76018086 156bb5bdd38SSøren Schmidt #define ATA_I82801AB 0x24218086 157bb5bdd38SSøren Schmidt #define ATA_I82801AA 0x24118086 158bb5bdd38SSøren Schmidt #define ATA_I82801BA 0x244a8086 159bb5bdd38SSøren Schmidt #define ATA_I82801BA_1 0x244b8086 160bb5bdd38SSøren Schmidt #define ATA_I82801CA 0x248a8086 161bb5bdd38SSøren Schmidt #define ATA_I82801CA_1 0x248b8086 162bb5bdd38SSøren Schmidt #define ATA_I82801DB 0x24cb8086 16360ad94deSSøren Schmidt #define ATA_I82801DB_1 0x24ca8086 1646e52134cSJohn Baldwin #define ATA_I82801EB 0x24db8086 165df6a77ddSSøren Schmidt #define ATA_I82801EB_S1 0x24d18086 166df6a77ddSSøren Schmidt #define ATA_I82801EB_R1 0x24df8086 167f2972d7eSSøren Schmidt #define ATA_I6300ESB 0x25a28086 168df6a77ddSSøren Schmidt #define ATA_I6300ESB_S1 0x25a38086 169df6a77ddSSøren Schmidt #define ATA_I6300ESB_R1 0x25b08086 170e7de1a39SSøren Schmidt #define ATA_I63XXESB2 0x269e8086 171e7de1a39SSøren Schmidt #define ATA_I63XXESB2_S1 0x26808086 172e7de1a39SSøren Schmidt #define ATA_I63XXESB2_S2 0x26818086 173e7de1a39SSøren Schmidt #define ATA_I63XXESB2_R1 0x26828086 174e7de1a39SSøren Schmidt #define ATA_I63XXESB2_R2 0x26838086 1758353d82bSSøren Schmidt #define ATA_I82801FB 0x266f8086 1768353d82bSSøren Schmidt #define ATA_I82801FB_S1 0x26518086 1778353d82bSSøren Schmidt #define ATA_I82801FB_R1 0x26528086 178e7de1a39SSøren Schmidt #define ATA_I82801FBM 0x26538086 179c46e1f53SSøren Schmidt #define ATA_I82801GB 0x27df8086 180c46e1f53SSøren Schmidt #define ATA_I82801GB_S1 0x27c08086 181c46e1f53SSøren Schmidt #define ATA_I82801GB_AH 0x27c18086 182e7de1a39SSøren Schmidt #define ATA_I82801GB_R1 0x27c38086 183e7de1a39SSøren Schmidt #define ATA_I82801GBM_S1 0x27c48086 184e7de1a39SSøren Schmidt #define ATA_I82801GBM_AH 0x27c58086 185e7de1a39SSøren Schmidt #define ATA_I82801GBM_R1 0x27c68086 186e7de1a39SSøren Schmidt #define ATA_I82801HB_S1 0x28208086 187e7de1a39SSøren Schmidt #define ATA_I82801HB_AH6 0x28218086 188e7de1a39SSøren Schmidt #define ATA_I82801HB_R1 0x28228086 189e7de1a39SSøren Schmidt #define ATA_I82801HB_AH4 0x28248086 190e7de1a39SSøren Schmidt #define ATA_I82801HB_S2 0x28258086 191e9cb9626SRemko Lodder #define ATA_I82801HBM 0x28508086 1921d69e13dSRemko Lodder #define ATA_I82801HBM_S1 0x28288086 1931d69e13dSRemko Lodder #define ATA_I82801HBM_S2 0x28298086 1941d69e13dSRemko Lodder #define ATA_I82801HBM_S3 0x282a8086 19518928d0dSSimon L. B. Nielsen #define ATA_I82801IB_S1 0x29208086 19653479021SAlexander Motin #define ATA_I82801IB_S3 0x29218086 19718928d0dSSimon L. B. Nielsen #define ATA_I82801IB_AH6 0x29228086 19818928d0dSSimon L. B. Nielsen #define ATA_I82801IB_AH4 0x29238086 1998a282d33SRemko Lodder #define ATA_I82801IB_R1 0x29258086 20018928d0dSSimon L. B. Nielsen #define ATA_I82801IB_S2 0x29268086 201dd3ebdbaSAlexander Motin #define ATA_I82801IBM_S1 0x29288086 202dd3ebdbaSAlexander Motin #define ATA_I82801IBM_AH 0x29298086 203dd3ebdbaSAlexander Motin #define ATA_I82801IBM_R1 0x292a8086 204dd3ebdbaSAlexander Motin #define ATA_I82801IBM_S2 0x292d8086 2050cf07094SSøren Schmidt #define ATA_I82801JIB_S1 0x3a208086 2060cf07094SSøren Schmidt #define ATA_I82801JIB_AH 0x3a228086 2070cf07094SSøren Schmidt #define ATA_I82801JIB_R1 0x3a258086 2080cf07094SSøren Schmidt #define ATA_I82801JIB_S2 0x3a268086 2090cf07094SSøren Schmidt #define ATA_I82801JD_S1 0x3a008086 2100cf07094SSøren Schmidt #define ATA_I82801JD_AH 0x3a028086 2110cf07094SSøren Schmidt #define ATA_I82801JD_R1 0x3a058086 2120cf07094SSøren Schmidt #define ATA_I82801JD_S2 0x3a068086 213fb549e86SAlexander Motin #define ATA_I82801JI_S1 0x3a208086 214fb549e86SAlexander Motin #define ATA_I82801JI_AH 0x3a228086 215fb549e86SAlexander Motin #define ATA_I82801JI_R1 0x3a258086 216fb549e86SAlexander Motin #define ATA_I82801JI_S2 0x3a268086 217bfc8500cSAlexander Motin 218bfc8500cSAlexander Motin #define ATA_5Series_S1 0x3b208086 219bfc8500cSAlexander Motin #define ATA_5Series_S2 0x3b218086 220bfc8500cSAlexander Motin #define ATA_5Series_AH1 0x3b228086 221bfc8500cSAlexander Motin #define ATA_5Series_AH2 0x3b238086 222bfc8500cSAlexander Motin #define ATA_5Series_R1 0x3b258086 223bfc8500cSAlexander Motin #define ATA_5Series_S3 0x3b268086 224bfc8500cSAlexander Motin #define ATA_5Series_S4 0x3b288086 225bfc8500cSAlexander Motin #define ATA_5Series_AH3 0x3b298086 226bfc8500cSAlexander Motin #define ATA_5Series_R2 0x3b2c8086 227bfc8500cSAlexander Motin #define ATA_5Series_S5 0x3b2d8086 228bfc8500cSAlexander Motin #define ATA_5Series_S6 0x3b2e8086 229bfc8500cSAlexander Motin #define ATA_5Series_AH4 0x3b2f8086 230bfc8500cSAlexander Motin 231bfc8500cSAlexander Motin #define ATA_CPT_S1 0x1c008086 232bfc8500cSAlexander Motin #define ATA_CPT_S2 0x1c018086 233bfc8500cSAlexander Motin #define ATA_CPT_AH1 0x1c028086 234bfc8500cSAlexander Motin #define ATA_CPT_AH2 0x1c038086 235bfc8500cSAlexander Motin #define ATA_CPT_R1 0x1c048086 236bfc8500cSAlexander Motin #define ATA_CPT_R2 0x1c058086 237bfc8500cSAlexander Motin #define ATA_CPT_S3 0x1c088086 238bfc8500cSAlexander Motin #define ATA_CPT_S4 0x1c098086 239bfc8500cSAlexander Motin 240bf0477b2SJack F Vogel #define ATA_PBG_S1 0x1d008086 241bf0477b2SJack F Vogel #define ATA_PBG_AH1 0x1d028086 242bf0477b2SJack F Vogel #define ATA_PBG_R1 0x1d048086 243bf0477b2SJack F Vogel #define ATA_PBG_R2 0x1d068086 2449bea89c1SJim Harris #define ATA_PBG_R3 0x28268086 245bf0477b2SJack F Vogel #define ATA_PBG_S2 0x1d088086 246bf0477b2SJack F Vogel 24773e3bb65SJack F Vogel #define ATA_PPT_S1 0x1e008086 24873e3bb65SJack F Vogel #define ATA_PPT_S2 0x1e018086 24973e3bb65SJack F Vogel #define ATA_PPT_AH1 0x1e028086 25073e3bb65SJack F Vogel #define ATA_PPT_AH2 0x1e038086 25173e3bb65SJack F Vogel #define ATA_PPT_R1 0x1e048086 25273e3bb65SJack F Vogel #define ATA_PPT_R2 0x1e058086 25373e3bb65SJack F Vogel #define ATA_PPT_R3 0x1e068086 25473e3bb65SJack F Vogel #define ATA_PPT_R4 0x1e078086 25573e3bb65SJack F Vogel #define ATA_PPT_S3 0x1e088086 25673e3bb65SJack F Vogel #define ATA_PPT_S4 0x1e098086 25773e3bb65SJack F Vogel #define ATA_PPT_R5 0x1e0e8086 25873e3bb65SJack F Vogel #define ATA_PPT_R6 0x1e0f8086 25973e3bb65SJack F Vogel 260eda36fb4SAlexander Motin #define ATA_AVOTON_S1 0x1f208086 261eda36fb4SAlexander Motin #define ATA_AVOTON_S2 0x1f218086 262eda36fb4SAlexander Motin #define ATA_AVOTON_S3 0x1f308086 263eda36fb4SAlexander Motin #define ATA_AVOTON_S4 0x1f318086 264eda36fb4SAlexander Motin 265e1d6f7b4SJack F Vogel #define ATA_LPT_S1 0x8c008086 266e1d6f7b4SJack F Vogel #define ATA_LPT_S2 0x8c018086 267e1d6f7b4SJack F Vogel #define ATA_LPT_AH1 0x8c028086 268e1d6f7b4SJack F Vogel #define ATA_LPT_AH2 0x8c038086 269e1d6f7b4SJack F Vogel #define ATA_LPT_R1 0x8c048086 270e1d6f7b4SJack F Vogel #define ATA_LPT_R2 0x8c058086 271e1d6f7b4SJack F Vogel #define ATA_LPT_R3 0x8c068086 272e1d6f7b4SJack F Vogel #define ATA_LPT_R4 0x8c078086 273e1d6f7b4SJack F Vogel #define ATA_LPT_S3 0x8c088086 274e1d6f7b4SJack F Vogel #define ATA_LPT_S4 0x8c098086 275e1d6f7b4SJack F Vogel #define ATA_LPT_R5 0x8c0e8086 276e1d6f7b4SJack F Vogel #define ATA_LPT_R6 0x8c0f8086 277e1d6f7b4SJack F Vogel 278*e67f3becSAlexander Motin #define ATA_WCPT_S1 0x8c808086 279*e67f3becSAlexander Motin #define ATA_WCPT_S2 0x8c818086 280*e67f3becSAlexander Motin #define ATA_WCPT_AH1 0x8c828086 281*e67f3becSAlexander Motin #define ATA_WCPT_AH2 0x8c838086 282*e67f3becSAlexander Motin #define ATA_WCPT_R1 0x8c848086 283*e67f3becSAlexander Motin #define ATA_WCPT_R2 0x8c858086 284*e67f3becSAlexander Motin #define ATA_WCPT_R3 0x8c868086 285*e67f3becSAlexander Motin #define ATA_WCPT_R4 0x8c878086 286*e67f3becSAlexander Motin #define ATA_WCPT_S3 0x8c888086 287*e67f3becSAlexander Motin #define ATA_WCPT_S4 0x8c898086 288*e67f3becSAlexander Motin #define ATA_WCPT_R5 0x8c8e8086 289*e67f3becSAlexander Motin #define ATA_WCPT_R6 0x8c8f8086 290*e67f3becSAlexander Motin 291eda36fb4SAlexander Motin #define ATA_WELLS_S1 0x8d008086 292eda36fb4SAlexander Motin #define ATA_WELLS_S2 0x8d088086 293eda36fb4SAlexander Motin #define ATA_WELLS_S3 0x8d608086 294eda36fb4SAlexander Motin #define ATA_WELLS_S4 0x8d688086 295eda36fb4SAlexander Motin 296eda36fb4SAlexander Motin #define ATA_LPTLP_S1 0x9c008086 297eda36fb4SAlexander Motin #define ATA_LPTLP_S2 0x9c018086 298eda36fb4SAlexander Motin #define ATA_LPTLP_S3 0x9c088086 299eda36fb4SAlexander Motin #define ATA_LPTLP_S4 0x9c098086 300eda36fb4SAlexander Motin 301a77a43c7SSøren Schmidt #define ATA_I31244 0x32008086 3027aab51b3SAlexander Motin #define ATA_ISCH 0x811a8086 303d5267edeSJack F Vogel #define ATA_DH89XXCC 0x23238086 304bb5bdd38SSøren Schmidt 305428e286dSJack F Vogel #define ATA_COLETOCRK_AH1 0x23a38086 306428e286dSJack F Vogel #define ATA_COLETOCRK_S1 0x23a18086 307428e286dSJack F Vogel #define ATA_COLETOCRK_S2 0x23a68086 308428e286dSJack F Vogel 30988bdf804SSøren Schmidt #define ATA_ITE_ID 0x1283 31077ada086SSøren Schmidt #define ATA_IT8211F 0x82111283 31188bdf804SSøren Schmidt #define ATA_IT8212F 0x82121283 312ed0c85e0SSøren Schmidt #define ATA_IT8213F 0x82131283 31388bdf804SSøren Schmidt 314797c12eeSSøren Schmidt #define ATA_JMICRON_ID 0x197b 315797c12eeSSøren Schmidt #define ATA_JMB360 0x2360197b 3160118b48bSSøren Schmidt #define ATA_JMB361 0x2361197b 31749a4a59aSAlexander Motin #define ATA_JMB362 0x2362197b 318e3989d3eSSøren Schmidt #define ATA_JMB363 0x2363197b 3190118b48bSSøren Schmidt #define ATA_JMB365 0x2365197b 3200118b48bSSøren Schmidt #define ATA_JMB366 0x2366197b 321a4b07272SSøren Schmidt #define ATA_JMB368 0x2368197b 3227bac11c7SAlexander Motin #define ATA_JMB368_2 0x0368197b 323797c12eeSSøren Schmidt 3244b55f0c7SSøren Schmidt #define ATA_MARVELL_ID 0x11ab 3254b55f0c7SSøren Schmidt #define ATA_M88SX5040 0x504011ab 3264b55f0c7SSøren Schmidt #define ATA_M88SX5041 0x504111ab 3274b55f0c7SSøren Schmidt #define ATA_M88SX5080 0x508011ab 3284b55f0c7SSøren Schmidt #define ATA_M88SX5081 0x508111ab 3294b55f0c7SSøren Schmidt #define ATA_M88SX6041 0x604111ab 3306aca3a5dSAlexander Motin #define ATA_M88SX6042 0x604211ab 3314b55f0c7SSøren Schmidt #define ATA_M88SX6081 0x608111ab 3326aca3a5dSAlexander Motin #define ATA_M88SX7042 0x704211ab 33393644902SAlexander Motin #define ATA_M88SE6101 0x610111ab 33493644902SAlexander Motin #define ATA_M88SE6102 0x610211ab 33593644902SAlexander Motin #define ATA_M88SE6111 0x611111ab 33693644902SAlexander Motin #define ATA_M88SE6121 0x612111ab 33793644902SAlexander Motin #define ATA_M88SE6141 0x614111ab 33893644902SAlexander Motin #define ATA_M88SE6145 0x614511ab 3396268666cSAlexander Motin #define ATA_MARVELL2_ID 0x1b4b 3404b55f0c7SSøren Schmidt 34188bdf804SSøren Schmidt #define ATA_MICRON_ID 0x1042 34288bdf804SSøren Schmidt #define ATA_MICRON_RZ1000 0x10001042 34388bdf804SSøren Schmidt #define ATA_MICRON_RZ1001 0x10011042 34488bdf804SSøren Schmidt 3455fdbb0d2SSøren Schmidt #define ATA_NATIONAL_ID 0x100b 3465fdbb0d2SSøren Schmidt #define ATA_SC1100 0x0502100b 3475fdbb0d2SSøren Schmidt 348cece26a6SRink Springer #define ATA_NETCELL_ID 0x169c 349cece26a6SRink Springer #define ATA_NETCELL_SR 0x0044169c 350cece26a6SRink Springer 351bb5bdd38SSøren Schmidt #define ATA_NVIDIA_ID 0x10de 352bb5bdd38SSøren Schmidt #define ATA_NFORCE1 0x01bc10de 353bb5bdd38SSøren Schmidt #define ATA_NFORCE2 0x006510de 354121b4783SSøren Schmidt #define ATA_NFORCE2_PRO 0x008510de 355121b4783SSøren Schmidt #define ATA_NFORCE2_PRO_S1 0x008e10de 356debffe83SDavid E. O'Brien #define ATA_NFORCE3 0x00d510de 357df6a77ddSSøren Schmidt #define ATA_NFORCE3_PRO 0x00e510de 358df6a77ddSSøren Schmidt #define ATA_NFORCE3_PRO_S1 0x00e310de 359df6a77ddSSøren Schmidt #define ATA_NFORCE3_PRO_S2 0x00ee10de 360121b4783SSøren Schmidt #define ATA_NFORCE_MCP04 0x003510de 361121b4783SSøren Schmidt #define ATA_NFORCE_MCP04_S1 0x003610de 362121b4783SSøren Schmidt #define ATA_NFORCE_MCP04_S2 0x003e10de 363121b4783SSøren Schmidt #define ATA_NFORCE_CK804 0x005310de 364121b4783SSøren Schmidt #define ATA_NFORCE_CK804_S1 0x005410de 365121b4783SSøren Schmidt #define ATA_NFORCE_CK804_S2 0x005510de 366121b4783SSøren Schmidt #define ATA_NFORCE_MCP51 0x026510de 367121b4783SSøren Schmidt #define ATA_NFORCE_MCP51_S1 0x026610de 368121b4783SSøren Schmidt #define ATA_NFORCE_MCP51_S2 0x026710de 369121b4783SSøren Schmidt #define ATA_NFORCE_MCP55 0x036e10de 370121b4783SSøren Schmidt #define ATA_NFORCE_MCP55_S1 0x037e10de 371121b4783SSøren Schmidt #define ATA_NFORCE_MCP55_S2 0x037f10de 37227568384SSøren Schmidt #define ATA_NFORCE_MCP61 0x03ec10de 37327568384SSøren Schmidt #define ATA_NFORCE_MCP61_S1 0x03e710de 37427568384SSøren Schmidt #define ATA_NFORCE_MCP61_S2 0x03f610de 37527568384SSøren Schmidt #define ATA_NFORCE_MCP61_S3 0x03f710de 376200c7605SSøren Schmidt #define ATA_NFORCE_MCP65 0x044810de 37799844cbfSAlexander Motin #define ATA_NFORCE_MCP65_A0 0x044c10de 37899844cbfSAlexander Motin #define ATA_NFORCE_MCP65_A1 0x044d10de 37999844cbfSAlexander Motin #define ATA_NFORCE_MCP65_A2 0x044e10de 38099844cbfSAlexander Motin #define ATA_NFORCE_MCP65_A3 0x044f10de 38199844cbfSAlexander Motin #define ATA_NFORCE_MCP65_A4 0x045c10de 38299844cbfSAlexander Motin #define ATA_NFORCE_MCP65_A5 0x045d10de 38399844cbfSAlexander Motin #define ATA_NFORCE_MCP65_A6 0x045e10de 38499844cbfSAlexander Motin #define ATA_NFORCE_MCP65_A7 0x045f10de 38599844cbfSAlexander Motin #define ATA_NFORCE_MCP67 0x056010de 38653963e58SAlexander Motin #define ATA_NFORCE_MCP67_A0 0x055010de 38753963e58SAlexander Motin #define ATA_NFORCE_MCP67_A1 0x055110de 38853963e58SAlexander Motin #define ATA_NFORCE_MCP67_A2 0x055210de 38953963e58SAlexander Motin #define ATA_NFORCE_MCP67_A3 0x055310de 39053963e58SAlexander Motin #define ATA_NFORCE_MCP67_A4 0x055410de 39153963e58SAlexander Motin #define ATA_NFORCE_MCP67_A5 0x055510de 39253963e58SAlexander Motin #define ATA_NFORCE_MCP67_A6 0x055610de 39353963e58SAlexander Motin #define ATA_NFORCE_MCP67_A7 0x055710de 39453963e58SAlexander Motin #define ATA_NFORCE_MCP67_A8 0x055810de 39553963e58SAlexander Motin #define ATA_NFORCE_MCP67_A9 0x055910de 39653963e58SAlexander Motin #define ATA_NFORCE_MCP67_AA 0x055A10de 39753963e58SAlexander Motin #define ATA_NFORCE_MCP67_AB 0x055B10de 398fbcaa016SAriff Abdullah #define ATA_NFORCE_MCP67_AC 0x058410de 399200c7605SSøren Schmidt #define ATA_NFORCE_MCP73 0x056c10de 40053963e58SAlexander Motin #define ATA_NFORCE_MCP73_A0 0x07f010de 40153963e58SAlexander Motin #define ATA_NFORCE_MCP73_A1 0x07f110de 40253963e58SAlexander Motin #define ATA_NFORCE_MCP73_A2 0x07f210de 40353963e58SAlexander Motin #define ATA_NFORCE_MCP73_A3 0x07f310de 40453963e58SAlexander Motin #define ATA_NFORCE_MCP73_A4 0x07f410de 40553963e58SAlexander Motin #define ATA_NFORCE_MCP73_A5 0x07f510de 40653963e58SAlexander Motin #define ATA_NFORCE_MCP73_A6 0x07f610de 40753963e58SAlexander Motin #define ATA_NFORCE_MCP73_A7 0x07f710de 40853963e58SAlexander Motin #define ATA_NFORCE_MCP73_A8 0x07f810de 40953963e58SAlexander Motin #define ATA_NFORCE_MCP73_A9 0x07f910de 41053963e58SAlexander Motin #define ATA_NFORCE_MCP73_AA 0x07fa10de 41153963e58SAlexander Motin #define ATA_NFORCE_MCP73_AB 0x07fb10de 412200c7605SSøren Schmidt #define ATA_NFORCE_MCP77 0x075910de 41399844cbfSAlexander Motin #define ATA_NFORCE_MCP77_A0 0x0ad010de 41499844cbfSAlexander Motin #define ATA_NFORCE_MCP77_A1 0x0ad110de 41599844cbfSAlexander Motin #define ATA_NFORCE_MCP77_A2 0x0ad210de 41699844cbfSAlexander Motin #define ATA_NFORCE_MCP77_A3 0x0ad310de 41799844cbfSAlexander Motin #define ATA_NFORCE_MCP77_A4 0x0ad410de 41899844cbfSAlexander Motin #define ATA_NFORCE_MCP77_A5 0x0ad510de 41999844cbfSAlexander Motin #define ATA_NFORCE_MCP77_A6 0x0ad610de 42099844cbfSAlexander Motin #define ATA_NFORCE_MCP77_A7 0x0ad710de 42199844cbfSAlexander Motin #define ATA_NFORCE_MCP77_A8 0x0ad810de 42299844cbfSAlexander Motin #define ATA_NFORCE_MCP77_A9 0x0ad910de 42399844cbfSAlexander Motin #define ATA_NFORCE_MCP77_AA 0x0ada10de 42499844cbfSAlexander Motin #define ATA_NFORCE_MCP77_AB 0x0adb10de 42599844cbfSAlexander Motin #define ATA_NFORCE_MCP79_A0 0x0ab410de 42699844cbfSAlexander Motin #define ATA_NFORCE_MCP79_A1 0x0ab510de 42799844cbfSAlexander Motin #define ATA_NFORCE_MCP79_A2 0x0ab610de 42899844cbfSAlexander Motin #define ATA_NFORCE_MCP79_A3 0x0ab710de 42999844cbfSAlexander Motin #define ATA_NFORCE_MCP79_A4 0x0ab810de 43099844cbfSAlexander Motin #define ATA_NFORCE_MCP79_A5 0x0ab910de 43199844cbfSAlexander Motin #define ATA_NFORCE_MCP79_A6 0x0aba10de 43299844cbfSAlexander Motin #define ATA_NFORCE_MCP79_A7 0x0abb10de 43399844cbfSAlexander Motin #define ATA_NFORCE_MCP79_A8 0x0abc10de 43499844cbfSAlexander Motin #define ATA_NFORCE_MCP79_A9 0x0abd10de 43599844cbfSAlexander Motin #define ATA_NFORCE_MCP79_AA 0x0abe10de 43699844cbfSAlexander Motin #define ATA_NFORCE_MCP79_AB 0x0abf10de 43799844cbfSAlexander Motin #define ATA_NFORCE_MCP89_A0 0x0d8410de 43899844cbfSAlexander Motin #define ATA_NFORCE_MCP89_A1 0x0d8510de 43999844cbfSAlexander Motin #define ATA_NFORCE_MCP89_A2 0x0d8610de 44099844cbfSAlexander Motin #define ATA_NFORCE_MCP89_A3 0x0d8710de 44199844cbfSAlexander Motin #define ATA_NFORCE_MCP89_A4 0x0d8810de 44299844cbfSAlexander Motin #define ATA_NFORCE_MCP89_A5 0x0d8910de 44399844cbfSAlexander Motin #define ATA_NFORCE_MCP89_A6 0x0d8a10de 44499844cbfSAlexander Motin #define ATA_NFORCE_MCP89_A7 0x0d8b10de 44599844cbfSAlexander Motin #define ATA_NFORCE_MCP89_A8 0x0d8c10de 44699844cbfSAlexander Motin #define ATA_NFORCE_MCP89_A9 0x0d8d10de 44799844cbfSAlexander Motin #define ATA_NFORCE_MCP89_AA 0x0d8e10de 44899844cbfSAlexander Motin #define ATA_NFORCE_MCP89_AB 0x0d8f10de 449bb5bdd38SSøren Schmidt 450bb5bdd38SSøren Schmidt #define ATA_PROMISE_ID 0x105a 451bb5bdd38SSøren Schmidt #define ATA_PDC20246 0x4d33105a 452bb5bdd38SSøren Schmidt #define ATA_PDC20262 0x4d38105a 453bb5bdd38SSøren Schmidt #define ATA_PDC20263 0x0d38105a 454bb5bdd38SSøren Schmidt #define ATA_PDC20265 0x0d30105a 455bb5bdd38SSøren Schmidt #define ATA_PDC20267 0x4d30105a 456bb5bdd38SSøren Schmidt #define ATA_PDC20268 0x4d68105a 457bb5bdd38SSøren Schmidt #define ATA_PDC20269 0x4d69105a 45805688cecSSøren Schmidt #define ATA_PDC20270 0x6268105a 459bb5bdd38SSøren Schmidt #define ATA_PDC20271 0x6269105a 460bb5bdd38SSøren Schmidt #define ATA_PDC20275 0x1275105a 461bb5bdd38SSøren Schmidt #define ATA_PDC20276 0x5275105a 462bb5bdd38SSøren Schmidt #define ATA_PDC20277 0x7275105a 46384351184SSøren Schmidt #define ATA_PDC20318 0x3318105a 46484351184SSøren Schmidt #define ATA_PDC20319 0x3319105a 46584351184SSøren Schmidt #define ATA_PDC20371 0x3371105a 46684351184SSøren Schmidt #define ATA_PDC20375 0x3375105a 467bb5bdd38SSøren Schmidt #define ATA_PDC20376 0x3376105a 46884351184SSøren Schmidt #define ATA_PDC20377 0x3377105a 46984351184SSøren Schmidt #define ATA_PDC20378 0x3373105a 47084351184SSøren Schmidt #define ATA_PDC20379 0x3372105a 471da9edda6SSøren Schmidt #define ATA_PDC20571 0x3571105a 472da9edda6SSøren Schmidt #define ATA_PDC20575 0x3d75105a 473da9edda6SSøren Schmidt #define ATA_PDC20579 0x3574105a 4748453acf1SSøren Schmidt #define ATA_PDC20771 0x3570105a 475da9edda6SSøren Schmidt #define ATA_PDC40518 0x3d18105a 47607015a1aSSøren Schmidt #define ATA_PDC40519 0x3519105a 477c7dc7718SSøren Schmidt #define ATA_PDC40718 0x3d17105a 478c7dc7718SSøren Schmidt #define ATA_PDC40719 0x3515105a 4798453acf1SSøren Schmidt #define ATA_PDC40775 0x3d73105a 4808453acf1SSøren Schmidt #define ATA_PDC40779 0x3577105a 48184351184SSøren Schmidt #define ATA_PDC20617 0x6617105a 48284351184SSøren Schmidt #define ATA_PDC20618 0x6626105a 48384351184SSøren Schmidt #define ATA_PDC20619 0x6629105a 48484351184SSøren Schmidt #define ATA_PDC20620 0x6620105a 4853cb179a8SSøren Schmidt #define ATA_PDC20621 0x6621105a 486f2972d7eSSøren Schmidt #define ATA_PDC20622 0x6622105a 4878453acf1SSøren Schmidt #define ATA_PDC20624 0x6624105a 4888453acf1SSøren Schmidt #define ATA_PDC81518 0x8002105a 489bb5bdd38SSøren Schmidt 490bb5bdd38SSøren Schmidt #define ATA_SERVERWORKS_ID 0x1166 4915fdbb0d2SSøren Schmidt #define ATA_ROSB4_ISA 0x02001166 492bb5bdd38SSøren Schmidt #define ATA_ROSB4 0x02111166 493bb5bdd38SSøren Schmidt #define ATA_CSB5 0x02121166 494bb5bdd38SSøren Schmidt #define ATA_CSB6 0x02131166 495bb5bdd38SSøren Schmidt #define ATA_CSB6_1 0x02171166 496891abbfaSSøren Schmidt #define ATA_HT1000 0x02141166 497891abbfaSSøren Schmidt #define ATA_HT1000_S1 0x024b1166 498891abbfaSSøren Schmidt #define ATA_HT1000_S2 0x024a1166 499594e3d5dSSøren Schmidt #define ATA_K2 0x02401166 500594e3d5dSSøren Schmidt #define ATA_FRODO4 0x02411166 501594e3d5dSSøren Schmidt #define ATA_FRODO8 0x02421166 502bb5bdd38SSøren Schmidt 503bb5bdd38SSøren Schmidt #define ATA_SILICON_IMAGE_ID 0x1095 50474a1b9fcSSøren Schmidt #define ATA_SII3114 0x31141095 5051c342d89SSøren Schmidt #define ATA_SII3512 0x35121095 506e158f2b8SSøren Schmidt #define ATA_SII3112 0x31121095 507a127b176SSøren Schmidt #define ATA_SII3112_1 0x02401095 508b9842b47SSøren Schmidt #define ATA_SII3124 0x31241095 509b9842b47SSøren Schmidt #define ATA_SII3132 0x31321095 51002e5ff6cSAlexander Motin #define ATA_SII3132_1 0x02421095 51188413c6bSAlexander Motin #define ATA_SII3132_2 0x02441095 51274a1b9fcSSøren Schmidt #define ATA_SII0680 0x06801095 513bb5bdd38SSøren Schmidt #define ATA_CMD646 0x06461095 514bb5bdd38SSøren Schmidt #define ATA_CMD648 0x06481095 515bb5bdd38SSøren Schmidt #define ATA_CMD649 0x06491095 516bb5bdd38SSøren Schmidt 517bb5bdd38SSøren Schmidt #define ATA_SIS_ID 0x1039 518bb5bdd38SSøren Schmidt #define ATA_SISSOUTH 0x00081039 519bb5bdd38SSøren Schmidt #define ATA_SIS5511 0x55111039 520bb5bdd38SSøren Schmidt #define ATA_SIS5513 0x55131039 521b47183d5SSøren Schmidt #define ATA_SIS5517 0x55171039 522bb5bdd38SSøren Schmidt #define ATA_SIS5518 0x55181039 523bb5bdd38SSøren Schmidt #define ATA_SIS5571 0x55711039 524bb5bdd38SSøren Schmidt #define ATA_SIS5591 0x55911039 525bb5bdd38SSøren Schmidt #define ATA_SIS5596 0x55961039 526bb5bdd38SSøren Schmidt #define ATA_SIS5597 0x55971039 527bb5bdd38SSøren Schmidt #define ATA_SIS5598 0x55981039 528bb5bdd38SSøren Schmidt #define ATA_SIS5600 0x56001039 529bb5bdd38SSøren Schmidt #define ATA_SIS530 0x05301039 530bb5bdd38SSøren Schmidt #define ATA_SIS540 0x05401039 531bb5bdd38SSøren Schmidt #define ATA_SIS550 0x05501039 532bb5bdd38SSøren Schmidt #define ATA_SIS620 0x06201039 533bb5bdd38SSøren Schmidt #define ATA_SIS630 0x06301039 534bb5bdd38SSøren Schmidt #define ATA_SIS635 0x06351039 535bb5bdd38SSøren Schmidt #define ATA_SIS633 0x06331039 536bb5bdd38SSøren Schmidt #define ATA_SIS640 0x06401039 537bb5bdd38SSøren Schmidt #define ATA_SIS645 0x06451039 538bb5bdd38SSøren Schmidt #define ATA_SIS646 0x06461039 539bb5bdd38SSøren Schmidt #define ATA_SIS648 0x06481039 540bb5bdd38SSøren Schmidt #define ATA_SIS650 0x06501039 541bb5bdd38SSøren Schmidt #define ATA_SIS651 0x06511039 542bb5bdd38SSøren Schmidt #define ATA_SIS652 0x06521039 543bb5bdd38SSøren Schmidt #define ATA_SIS655 0x06551039 544bb5bdd38SSøren Schmidt #define ATA_SIS658 0x06581039 545186939d1SSøren Schmidt #define ATA_SIS661 0x06611039 546bb5bdd38SSøren Schmidt #define ATA_SIS730 0x07301039 547bb5bdd38SSøren Schmidt #define ATA_SIS733 0x07331039 548bb5bdd38SSøren Schmidt #define ATA_SIS735 0x07351039 549bb5bdd38SSøren Schmidt #define ATA_SIS740 0x07401039 550bb5bdd38SSøren Schmidt #define ATA_SIS745 0x07451039 551bb5bdd38SSøren Schmidt #define ATA_SIS746 0x07461039 552bb5bdd38SSøren Schmidt #define ATA_SIS748 0x07481039 553bb5bdd38SSøren Schmidt #define ATA_SIS750 0x07501039 554bb5bdd38SSøren Schmidt #define ATA_SIS751 0x07511039 555bb5bdd38SSøren Schmidt #define ATA_SIS752 0x07521039 556bb5bdd38SSøren Schmidt #define ATA_SIS755 0x07551039 557bb5bdd38SSøren Schmidt #define ATA_SIS961 0x09611039 558bb5bdd38SSøren Schmidt #define ATA_SIS962 0x09621039 559bb5bdd38SSøren Schmidt #define ATA_SIS963 0x09631039 560f584b219SSøren Schmidt #define ATA_SIS964 0x09641039 5610da27c62SSøren Schmidt #define ATA_SIS965 0x09651039 5628ca4df32SSøren Schmidt #define ATA_SIS180 0x01801039 5638ca4df32SSøren Schmidt #define ATA_SIS181 0x01811039 5640da27c62SSøren Schmidt #define ATA_SIS182 0x01821039 565bb5bdd38SSøren Schmidt 566bb5bdd38SSøren Schmidt #define ATA_VIA_ID 0x1106 567bb5bdd38SSøren Schmidt #define ATA_VIA82C571 0x05711106 568bb5bdd38SSøren Schmidt #define ATA_VIA82C586 0x05861106 569bb5bdd38SSøren Schmidt #define ATA_VIA82C596 0x05961106 570bb5bdd38SSøren Schmidt #define ATA_VIA82C686 0x06861106 571bb5bdd38SSøren Schmidt #define ATA_VIA8231 0x82311106 572bb5bdd38SSøren Schmidt #define ATA_VIA8233 0x30741106 573bb5bdd38SSøren Schmidt #define ATA_VIA8233A 0x31471106 574bb5bdd38SSøren Schmidt #define ATA_VIA8233C 0x31091106 575bb5bdd38SSøren Schmidt #define ATA_VIA8235 0x31771106 5768a1bddb7SSøren Schmidt #define ATA_VIA8237 0x32271106 577adf1bdacSSøren Schmidt #define ATA_VIA8237A 0x05911106 578358904bfSSøren Schmidt #define ATA_VIA8237S 0x53371106 5796d3af67bSAlexander Motin #define ATA_VIA8237_5372 0x53721106 5806d3af67bSAlexander Motin #define ATA_VIA8237_7372 0x73721106 581a5693903SSøren Schmidt #define ATA_VIA8251 0x33491106 582bb5bdd38SSøren Schmidt #define ATA_VIA8361 0x31121106 583bb5bdd38SSøren Schmidt #define ATA_VIA8363 0x03051106 584bb5bdd38SSøren Schmidt #define ATA_VIA8371 0x03911106 585bb5bdd38SSøren Schmidt #define ATA_VIA8662 0x31021106 586ba18e265SSøren Schmidt #define ATA_VIA6410 0x31641106 587ba18e265SSøren Schmidt #define ATA_VIA6420 0x31491106 5881ab4ad36SSøren Schmidt #define ATA_VIA6421 0x32491106 589c357f2c8SAlexander Motin #define ATA_VIACX700IDE 0x05811106 590c357f2c8SAlexander Motin #define ATA_VIACX700 0x83241106 591c357f2c8SAlexander Motin #define ATA_VIASATAIDE 0x53241106 592c357f2c8SAlexander Motin #define ATA_VIAVX800 0x83531106 59304054584SAlexander Motin #define ATA_VIASATAIDE2 0xc4091106 594c357f2c8SAlexander Motin #define ATA_VIAVX855 0x84091106 59504054584SAlexander Motin #define ATA_VIASATAIDE3 0x90011106 59604054584SAlexander Motin #define ATA_VIAVX900 0x84101106 597bb5bdd38SSøren Schmidt 5988ca4df32SSøren Schmidt /* global prototypes ata-pci.c */ 5998ca4df32SSøren Schmidt int ata_pci_probe(device_t dev); 6008ca4df32SSøren Schmidt int ata_pci_attach(device_t dev); 6018ca4df32SSøren Schmidt int ata_pci_detach(device_t dev); 6027aab7e05SSøren Schmidt int ata_pci_suspend(device_t dev); 6037aab7e05SSøren Schmidt int ata_pci_resume(device_t dev); 6046bd8779bSAlexander Motin int ata_pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result); 6056bd8779bSAlexander Motin int ata_pci_write_ivar(device_t dev, device_t child, int which, uintptr_t value); 6066bd8779bSAlexander Motin uint32_t ata_pci_read_config(device_t dev, device_t child, int reg, int width); 6076bd8779bSAlexander Motin void ata_pci_write_config(device_t dev, device_t child, int reg, 6086bd8779bSAlexander Motin uint32_t val, int width); 609c779dc14SAlexander Motin int ata_pci_print_child(device_t dev, device_t child); 610445cc79cSAlexander Motin int ata_pci_child_location_str(device_t dev, device_t child, char *buf, 611445cc79cSAlexander Motin size_t buflen); 6128ca4df32SSøren Schmidt struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); 6138ca4df32SSøren Schmidt int ata_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); 614ef544f63SPaolo Pisati int ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *function, void *argument, void **cookiep); 6158ca4df32SSøren Schmidt int ata_pci_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); 61604ff88ceSAlexander Motin int ata_pci_ch_attach(device_t dev); 61778d15416SAlexander Motin int ata_pci_ch_detach(device_t dev); 618a7c33e78SSøren Schmidt int ata_pci_status(device_t dev); 619f5f55db3SSøren Schmidt void ata_pci_hw(device_t dev); 620200c7605SSøren Schmidt void ata_pci_dmainit(device_t dev); 62178d15416SAlexander Motin void ata_pci_dmafini(device_t dev); 6225187458fSMarius Strobl const char *ata_pcivendor2str(device_t dev); 6238ca4df32SSøren Schmidt int ata_legacy(device_t); 62413014ca0SSøren Schmidt void ata_generic_intr(void *data); 625066f913aSAlexander Motin int ata_generic_chipinit(device_t dev); 626066f913aSAlexander Motin int ata_generic_setmode(device_t dev, int target, int mode); 62713014ca0SSøren Schmidt int ata_setup_interrupt(device_t dev, void *intr_func); 62813014ca0SSøren Schmidt void ata_set_desc(device_t dev); 6295187458fSMarius Strobl const struct ata_chip_id *ata_match_chip(device_t dev, const struct ata_chip_id *index); 6305187458fSMarius Strobl const struct ata_chip_id *ata_find_chip(device_t dev, const struct ata_chip_id *index, int slot); 63113014ca0SSøren Schmidt int ata_mode2idx(int mode); 63213014ca0SSøren Schmidt 63313014ca0SSøren Schmidt /* global prototypes from chipsets/ata-*.c */ 63413014ca0SSøren Schmidt int ata_ahci_chipinit(device_t); 63513014ca0SSøren Schmidt int ata_marvell_edma_chipinit(device_t); 63613014ca0SSøren Schmidt int ata_sii_chipinit(device_t); 6378ca4df32SSøren Schmidt 63813014ca0SSøren Schmidt /* externs */ 63913014ca0SSøren Schmidt extern devclass_t ata_pci_devclass; 64013014ca0SSøren Schmidt 641dd60e051SAlexander Motin MALLOC_DECLARE(M_ATAPCI); 642dd60e051SAlexander Motin 64313014ca0SSøren Schmidt /* macro for easy definition of all driver module stuff */ 64413014ca0SSøren Schmidt #define ATA_DECLARE_DRIVER(dname) \ 64513014ca0SSøren Schmidt static device_method_t __CONCAT(dname,_methods)[] = { \ 64613014ca0SSøren Schmidt DEVMETHOD(device_probe, __CONCAT(dname,_probe)), \ 64713014ca0SSøren Schmidt DEVMETHOD(device_attach, ata_pci_attach), \ 64813014ca0SSøren Schmidt DEVMETHOD(device_detach, ata_pci_detach), \ 64969c43a23SAlexander Motin DEVMETHOD(device_suspend, ata_pci_suspend), \ 65069c43a23SAlexander Motin DEVMETHOD(device_resume, ata_pci_resume), \ 65113014ca0SSøren Schmidt DEVMETHOD(device_shutdown, bus_generic_shutdown), \ 6526bd8779bSAlexander Motin DEVMETHOD(bus_read_ivar, ata_pci_read_ivar), \ 6536bd8779bSAlexander Motin DEVMETHOD(bus_write_ivar, ata_pci_write_ivar), \ 65413014ca0SSøren Schmidt DEVMETHOD(bus_alloc_resource, ata_pci_alloc_resource), \ 65513014ca0SSøren Schmidt DEVMETHOD(bus_release_resource, ata_pci_release_resource), \ 65613014ca0SSøren Schmidt DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), \ 65713014ca0SSøren Schmidt DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), \ 65813014ca0SSøren Schmidt DEVMETHOD(bus_setup_intr, ata_pci_setup_intr), \ 65913014ca0SSøren Schmidt DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), \ 6606bd8779bSAlexander Motin DEVMETHOD(pci_read_config, ata_pci_read_config), \ 6616bd8779bSAlexander Motin DEVMETHOD(pci_write_config, ata_pci_write_config), \ 662c779dc14SAlexander Motin DEVMETHOD(bus_print_child, ata_pci_print_child), \ 663445cc79cSAlexander Motin DEVMETHOD(bus_child_location_str, ata_pci_child_location_str), \ 6645187458fSMarius Strobl DEVMETHOD_END \ 66513014ca0SSøren Schmidt }; \ 66613014ca0SSøren Schmidt static driver_t __CONCAT(dname,_driver) = { \ 66713014ca0SSøren Schmidt "atapci", \ 66813014ca0SSøren Schmidt __CONCAT(dname,_methods), \ 66913014ca0SSøren Schmidt sizeof(struct ata_pci_controller) \ 67013014ca0SSøren Schmidt }; \ 6715187458fSMarius Strobl DRIVER_MODULE(dname, pci, __CONCAT(dname,_driver), ata_pci_devclass, NULL, NULL); \ 67213014ca0SSøren Schmidt MODULE_VERSION(dname, 1); \ 67313014ca0SSøren Schmidt MODULE_DEPEND(dname, ata, 1, 1, 1); \ 67413014ca0SSøren Schmidt MODULE_DEPEND(dname, atapci, 1, 1, 1); 675