1c1b3d7c5SThomas E. Spanjaard /*- 2560012aaSzrj * Copyright (c) 2003 - 2008 Søren Schmidt <sos@FreeBSD.org> 3c1b3d7c5SThomas E. Spanjaard * All rights reserved. 4c1b3d7c5SThomas E. Spanjaard * 5c1b3d7c5SThomas E. Spanjaard * Redistribution and use in source and binary forms, with or without 6c1b3d7c5SThomas E. Spanjaard * modification, are permitted provided that the following conditions 7c1b3d7c5SThomas E. Spanjaard * are met: 8c1b3d7c5SThomas E. Spanjaard * 1. Redistributions of source code must retain the above copyright 9c1b3d7c5SThomas E. Spanjaard * notice, this list of conditions and the following disclaimer, 10c1b3d7c5SThomas E. Spanjaard * without modification, immediately at the beginning of the file. 11c1b3d7c5SThomas E. Spanjaard * 2. Redistributions in binary form must reproduce the above copyright 12c1b3d7c5SThomas E. Spanjaard * notice, this list of conditions and the following disclaimer in the 13c1b3d7c5SThomas E. Spanjaard * documentation and/or other materials provided with the distribution. 14c1b3d7c5SThomas E. Spanjaard * 15c1b3d7c5SThomas E. Spanjaard * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16c1b3d7c5SThomas E. Spanjaard * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17c1b3d7c5SThomas E. Spanjaard * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18c1b3d7c5SThomas E. Spanjaard * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19c1b3d7c5SThomas E. Spanjaard * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20c1b3d7c5SThomas E. Spanjaard * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21c1b3d7c5SThomas E. Spanjaard * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22c1b3d7c5SThomas E. Spanjaard * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23c1b3d7c5SThomas E. Spanjaard * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24c1b3d7c5SThomas E. Spanjaard * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25c1b3d7c5SThomas E. Spanjaard * 2602d7aa4aSSascha Wildner * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.76 2007/03/09 22:23:39 sos Exp $ 27c1b3d7c5SThomas E. Spanjaard */ 28c1b3d7c5SThomas E. Spanjaard 29c1b3d7c5SThomas E. Spanjaard #include <sys/param.h> 30c1b3d7c5SThomas E. Spanjaard #include <sys/bus.h> 31c1b3d7c5SThomas E. Spanjaard #include <sys/rman.h> 32c1b3d7c5SThomas E. Spanjaard #include <sys/taskqueue.h> 33c1b3d7c5SThomas E. Spanjaard 34c1b3d7c5SThomas E. Spanjaard /* structure holding chipset config info */ 35c1b3d7c5SThomas E. Spanjaard struct ata_chip_id { 36c1b3d7c5SThomas E. Spanjaard u_int32_t chipid; 37c1b3d7c5SThomas E. Spanjaard u_int8_t chiprev; 38c1b3d7c5SThomas E. Spanjaard int cfg1; 39c1b3d7c5SThomas E. Spanjaard int cfg2; 40c1b3d7c5SThomas E. Spanjaard u_int8_t max_dma; 4159503772Szrj const char *text; 42c1b3d7c5SThomas E. Spanjaard }; 43c1b3d7c5SThomas E. Spanjaard 44c1b3d7c5SThomas E. Spanjaard /* structure describing a PCI ATA controller */ 45c1b3d7c5SThomas E. Spanjaard struct ata_pci_controller { 46c1b3d7c5SThomas E. Spanjaard device_t dev; 47c1b3d7c5SThomas E. Spanjaard int r_type1; 48c1b3d7c5SThomas E. Spanjaard int r_rid1; 49c1b3d7c5SThomas E. Spanjaard struct resource *r_res1; 50c1b3d7c5SThomas E. Spanjaard int r_type2; 51c1b3d7c5SThomas E. Spanjaard int r_rid2; 52c1b3d7c5SThomas E. Spanjaard struct resource *r_res2; 53c1b3d7c5SThomas E. Spanjaard struct resource *r_irq; 54c1b3d7c5SThomas E. Spanjaard void *handle; 5559503772Szrj const struct ata_chip_id *chip; 56e0e6ca4bSHasso Tepper int legacy; 57c1b3d7c5SThomas E. Spanjaard int channels; 58c1b3d7c5SThomas E. Spanjaard int (*chipinit)(device_t); 59c1b3d7c5SThomas E. Spanjaard int (*allocate)(device_t); 60c1b3d7c5SThomas E. Spanjaard int (*locking)(device_t, int); 61c1b3d7c5SThomas E. Spanjaard void (*reset)(device_t); 62c1b3d7c5SThomas E. Spanjaard void (*dmainit)(device_t); 63c1b3d7c5SThomas E. Spanjaard void (*setmode)(device_t, int); 64c1b3d7c5SThomas E. Spanjaard struct { 65c1b3d7c5SThomas E. Spanjaard void (*function)(void *); 66c1b3d7c5SThomas E. Spanjaard void *argument; 67c1b3d7c5SThomas E. Spanjaard } interrupt[8]; /* XXX SOS max ch# for now */ 68c1b3d7c5SThomas E. Spanjaard }; 69c1b3d7c5SThomas E. Spanjaard 70c1b3d7c5SThomas E. Spanjaard /* structure for SATA connection update hotplug/hotswap support */ 71c1b3d7c5SThomas E. Spanjaard struct ata_connect_task { 72c1b3d7c5SThomas E. Spanjaard struct task task; 73c1b3d7c5SThomas E. Spanjaard device_t dev; 74c1b3d7c5SThomas E. Spanjaard int action; 75c1b3d7c5SThomas E. Spanjaard #define ATA_C_ATTACH 1 76c1b3d7c5SThomas E. Spanjaard #define ATA_C_DETACH 2 77c1b3d7c5SThomas E. Spanjaard }; 78c1b3d7c5SThomas E. Spanjaard 79c1b3d7c5SThomas E. Spanjaard /* defines for known chipset PCI id's */ 80c1b3d7c5SThomas E. Spanjaard #define ATA_ACARD_ID 0x1191 81c1b3d7c5SThomas E. Spanjaard #define ATA_ATP850 0x00021191 82c1b3d7c5SThomas E. Spanjaard #define ATA_ATP850A 0x00041191 83c1b3d7c5SThomas E. Spanjaard #define ATA_ATP850R 0x00051191 84c1b3d7c5SThomas E. Spanjaard #define ATA_ATP860A 0x00061191 85c1b3d7c5SThomas E. Spanjaard #define ATA_ATP860R 0x00071191 86c1b3d7c5SThomas E. Spanjaard #define ATA_ATP865A 0x00081191 87c1b3d7c5SThomas E. Spanjaard #define ATA_ATP865R 0x00091191 88c1b3d7c5SThomas E. Spanjaard 89c1b3d7c5SThomas E. Spanjaard #define ATA_ACER_LABS_ID 0x10b9 90c1b3d7c5SThomas E. Spanjaard #define ATA_ALI_1533 0x153310b9 91c1b3d7c5SThomas E. Spanjaard #define ATA_ALI_5229 0x522910b9 92c1b3d7c5SThomas E. Spanjaard #define ATA_ALI_5281 0x528110b9 93c1b3d7c5SThomas E. Spanjaard #define ATA_ALI_5287 0x528710b9 94c1b3d7c5SThomas E. Spanjaard #define ATA_ALI_5288 0x528810b9 95c1b3d7c5SThomas E. Spanjaard #define ATA_ALI_5289 0x528910b9 96c1b3d7c5SThomas E. Spanjaard 9713b0cf9eSzrj #define ATA_AMD_ID 0x1022 9813b0cf9eSzrj #define ATA_AMD755 0x74011022 9913b0cf9eSzrj #define ATA_AMD756 0x74091022 10013b0cf9eSzrj #define ATA_AMD766 0x74111022 10113b0cf9eSzrj #define ATA_AMD768 0x74411022 10213b0cf9eSzrj #define ATA_AMD8111 0x74691022 103560012aaSzrj #define ATA_AMD5536 0x209a1022 10413b0cf9eSzrj 105878a3234Szrj #define ATA_ADAPTEC_ID 0x9005 106878a3234Szrj #define ATA_ADAPTEC_1420 0x02419005 107560012aaSzrj #define ATA_ADAPTEC_1430 0x02439005 108878a3234Szrj 109c1b3d7c5SThomas E. Spanjaard #define ATA_ATI_ID 0x1002 110c1b3d7c5SThomas E. Spanjaard #define ATA_ATI_IXP200 0x43491002 111c1b3d7c5SThomas E. Spanjaard #define ATA_ATI_IXP300 0x43691002 112c1b3d7c5SThomas E. Spanjaard #define ATA_ATI_IXP300_S1 0x436e1002 11313b0cf9eSzrj #define ATA_ATI_IXP400 0x43761002 114c1b3d7c5SThomas E. Spanjaard #define ATA_ATI_IXP400_S1 0x43791002 115c1b3d7c5SThomas E. Spanjaard #define ATA_ATI_IXP400_S2 0x437a1002 11613b0cf9eSzrj #define ATA_ATI_IXP600 0x438c1002 11713b0cf9eSzrj #define ATA_ATI_IXP600_S1 0x43801002 11813b0cf9eSzrj #define ATA_ATI_IXP600_S2 0x43811002 119560012aaSzrj #define ATA_ATI_IXP700 0x439c1002 120560012aaSzrj #define ATA_ATI_IXP700_S1 0x43901002 121560012aaSzrj #define ATA_ATI_IXP700_S2 0x43911002 122560012aaSzrj #define ATA_ATI_IXP700_S3 0x43921002 123560012aaSzrj #define ATA_ATI_IXP700_S4 0x43931002 124560012aaSzrj #define ATA_ATI_IXP800_S1 0x43941002 125560012aaSzrj #define ATA_ATI_IXP800_S2 0x43951002 126c1b3d7c5SThomas E. Spanjaard 127c1b3d7c5SThomas E. Spanjaard #define ATA_CENATEK_ID 0x16ca 128c1b3d7c5SThomas E. Spanjaard #define ATA_CENATEK_ROCKET 0x000116ca 129c1b3d7c5SThomas E. Spanjaard 130c1b3d7c5SThomas E. Spanjaard #define ATA_CYRIX_ID 0x1078 131c1b3d7c5SThomas E. Spanjaard #define ATA_CYRIX_5530 0x01021078 132c1b3d7c5SThomas E. Spanjaard 133c1b3d7c5SThomas E. Spanjaard #define ATA_CYPRESS_ID 0x1080 134c1b3d7c5SThomas E. Spanjaard #define ATA_CYPRESS_82C693 0xc6931080 135c1b3d7c5SThomas E. Spanjaard 136c1b3d7c5SThomas E. Spanjaard #define ATA_DEC_21150 0x00221011 137c1b3d7c5SThomas E. Spanjaard #define ATA_DEC_21150_1 0x00231011 138c1b3d7c5SThomas E. Spanjaard 139c1b3d7c5SThomas E. Spanjaard #define ATA_HIGHPOINT_ID 0x1103 140c1b3d7c5SThomas E. Spanjaard #define ATA_HPT366 0x00041103 141c1b3d7c5SThomas E. Spanjaard #define ATA_HPT372 0x00051103 142c1b3d7c5SThomas E. Spanjaard #define ATA_HPT302 0x00061103 143c1b3d7c5SThomas E. Spanjaard #define ATA_HPT371 0x00071103 144c1b3d7c5SThomas E. Spanjaard #define ATA_HPT374 0x00081103 145c1b3d7c5SThomas E. Spanjaard 146c1b3d7c5SThomas E. Spanjaard #define ATA_INTEL_ID 0x8086 147c1b3d7c5SThomas E. Spanjaard #define ATA_I960RM 0x09628086 148c1b3d7c5SThomas E. Spanjaard #define ATA_I82371FB 0x12308086 149c1b3d7c5SThomas E. Spanjaard #define ATA_I82371SB 0x70108086 150c1b3d7c5SThomas E. Spanjaard #define ATA_I82371AB 0x71118086 151c1b3d7c5SThomas E. Spanjaard #define ATA_I82443MX 0x71998086 152c1b3d7c5SThomas E. Spanjaard #define ATA_I82451NX 0x84ca8086 153c1b3d7c5SThomas E. Spanjaard #define ATA_I82372FB 0x76018086 154c1b3d7c5SThomas E. Spanjaard #define ATA_I82801AB 0x24218086 155c1b3d7c5SThomas E. Spanjaard #define ATA_I82801AA 0x24118086 156c1b3d7c5SThomas E. Spanjaard #define ATA_I82801BA 0x244a8086 157c1b3d7c5SThomas E. Spanjaard #define ATA_I82801BA_1 0x244b8086 158c1b3d7c5SThomas E. Spanjaard #define ATA_I82801CA 0x248a8086 159c1b3d7c5SThomas E. Spanjaard #define ATA_I82801CA_1 0x248b8086 160c1b3d7c5SThomas E. Spanjaard #define ATA_I82801DB 0x24cb8086 161c1b3d7c5SThomas E. Spanjaard #define ATA_I82801DB_1 0x24ca8086 162c1b3d7c5SThomas E. Spanjaard #define ATA_I82801EB 0x24db8086 163c1b3d7c5SThomas E. Spanjaard #define ATA_I82801EB_S1 0x24d18086 164c1b3d7c5SThomas E. Spanjaard #define ATA_I82801EB_R1 0x24df8086 165c1b3d7c5SThomas E. Spanjaard #define ATA_I6300ESB 0x25a28086 166c1b3d7c5SThomas E. Spanjaard #define ATA_I6300ESB_S1 0x25a38086 167c1b3d7c5SThomas E. Spanjaard #define ATA_I6300ESB_R1 0x25b08086 16887870bc8SMatthew Dillon #define ATA_I63XXESB2 0x269e8086 16987870bc8SMatthew Dillon #define ATA_I63XXESB2_S1 0x26808086 17087870bc8SMatthew Dillon #define ATA_I63XXESB2_S2 0x26818086 17187870bc8SMatthew Dillon #define ATA_I63XXESB2_R1 0x26828086 17287870bc8SMatthew Dillon #define ATA_I63XXESB2_R2 0x26838086 173c1b3d7c5SThomas E. Spanjaard #define ATA_I82801FB 0x266f8086 174c1b3d7c5SThomas E. Spanjaard #define ATA_I82801FB_S1 0x26518086 175c1b3d7c5SThomas E. Spanjaard #define ATA_I82801FB_R1 0x26528086 17687870bc8SMatthew Dillon #define ATA_I82801FBM 0x26538086 177c1b3d7c5SThomas E. Spanjaard #define ATA_I82801GB 0x27df8086 178c1b3d7c5SThomas E. Spanjaard #define ATA_I82801GB_S1 0x27c08086 179c1b3d7c5SThomas E. Spanjaard #define ATA_I82801GB_AH 0x27c18086 18087870bc8SMatthew Dillon #define ATA_I82801GB_R1 0x27c38086 18187870bc8SMatthew Dillon #define ATA_I82801GBM_S1 0x27c48086 18287870bc8SMatthew Dillon #define ATA_I82801GBM_AH 0x27c58086 18387870bc8SMatthew Dillon #define ATA_I82801GBM_R1 0x27c68086 18487870bc8SMatthew Dillon #define ATA_I82801HB_S1 0x28208086 18587870bc8SMatthew Dillon #define ATA_I82801HB_AH6 0x28218086 18687870bc8SMatthew Dillon #define ATA_I82801HB_R1 0x28228086 18787870bc8SMatthew Dillon #define ATA_I82801HB_AH4 0x28248086 18887870bc8SMatthew Dillon #define ATA_I82801HB_S2 0x28258086 189*c1d8f36aSzrj #define ATA_I82801HBM 0x28508086 190a6490effSHasso Tepper #define ATA_I82801HBM_S1 0x28288086 191a6490effSHasso Tepper #define ATA_I82801HBM_S2 0x28298086 192a6490effSHasso Tepper #define ATA_I82801HBM_S3 0x282a8086 193d0b256a7SSascha Wildner #define ATA_I82801IB_S1 0x29208086 194d0b256a7SSascha Wildner #define ATA_I82801IB_AH2 0x29218086 195d0b256a7SSascha Wildner #define ATA_I82801IB_AH6 0x29228086 196d0b256a7SSascha Wildner #define ATA_I82801IB_AH4 0x29238086 197*c1d8f36aSzrj #define ATA_I82801IB_R1 0x29258086 198d0b256a7SSascha Wildner #define ATA_I82801IB_S2 0x29268086 199*c1d8f36aSzrj #define ATA_I82801JIB_S1 0x3a208086 200*c1d8f36aSzrj #define ATA_I82801JIB_AH 0x3a228086 201*c1d8f36aSzrj #define ATA_I82801JIB_R1 0x3a258086 202*c1d8f36aSzrj #define ATA_I82801JIB_S2 0x3a268086 203*c1d8f36aSzrj #define ATA_I82801JD_S1 0x3a008086 204*c1d8f36aSzrj #define ATA_I82801JD_AH 0x3a028086 205*c1d8f36aSzrj #define ATA_I82801JD_R1 0x3a058086 206*c1d8f36aSzrj #define ATA_I82801JD_S2 0x3a068086 207*c1d8f36aSzrj #define ATA_I82801JI_S1 0x3a208086 208*c1d8f36aSzrj #define ATA_I82801JI_AH 0x3a228086 209*c1d8f36aSzrj #define ATA_I82801JI_R1 0x3a258086 210*c1d8f36aSzrj #define ATA_I82801JI_S2 0x3a268086 211c1b3d7c5SThomas E. Spanjaard #define ATA_I31244 0x32008086 212c1b3d7c5SThomas E. Spanjaard 213c1b3d7c5SThomas E. Spanjaard #define ATA_ITE_ID 0x1283 214c1b3d7c5SThomas E. Spanjaard #define ATA_IT8211F 0x82111283 215c1b3d7c5SThomas E. Spanjaard #define ATA_IT8212F 0x82121283 216560012aaSzrj #define ATA_IT8213F 0x82131283 217c1b3d7c5SThomas E. Spanjaard 218c1b3d7c5SThomas E. Spanjaard #define ATA_JMICRON_ID 0x197b 219c1b3d7c5SThomas E. Spanjaard #define ATA_JMB360 0x2360197b 220c1b3d7c5SThomas E. Spanjaard #define ATA_JMB361 0x2361197b 221c1b3d7c5SThomas E. Spanjaard #define ATA_JMB363 0x2363197b 222c1b3d7c5SThomas E. Spanjaard #define ATA_JMB365 0x2365197b 223c1b3d7c5SThomas E. Spanjaard #define ATA_JMB366 0x2366197b 22487870bc8SMatthew Dillon #define ATA_JMB368 0x2368197b 225c1b3d7c5SThomas E. Spanjaard 226c1b3d7c5SThomas E. Spanjaard #define ATA_MARVELL_ID 0x11ab 227c1b3d7c5SThomas E. Spanjaard #define ATA_M88SX5040 0x504011ab 228c1b3d7c5SThomas E. Spanjaard #define ATA_M88SX5041 0x504111ab 229c1b3d7c5SThomas E. Spanjaard #define ATA_M88SX5080 0x508011ab 230c1b3d7c5SThomas E. Spanjaard #define ATA_M88SX5081 0x508111ab 231c1b3d7c5SThomas E. Spanjaard #define ATA_M88SX6041 0x604111ab 232560012aaSzrj #define ATA_M88SX6042 0x604211ab 233c1b3d7c5SThomas E. Spanjaard #define ATA_M88SX6081 0x608111ab 234560012aaSzrj #define ATA_M88SX7042 0x704211ab 23587870bc8SMatthew Dillon #define ATA_M88SX6101 0x610111ab 236878a3234Szrj #define ATA_M88SX6121 0x612111ab 23787870bc8SMatthew Dillon #define ATA_M88SX6145 0x614511ab 238c1b3d7c5SThomas E. Spanjaard 239c1b3d7c5SThomas E. Spanjaard #define ATA_MICRON_ID 0x1042 240c1b3d7c5SThomas E. Spanjaard #define ATA_MICRON_RZ1000 0x10001042 241c1b3d7c5SThomas E. Spanjaard #define ATA_MICRON_RZ1001 0x10011042 242c1b3d7c5SThomas E. Spanjaard 243c1b3d7c5SThomas E. Spanjaard #define ATA_NATIONAL_ID 0x100b 244c1b3d7c5SThomas E. Spanjaard #define ATA_SC1100 0x0502100b 245c1b3d7c5SThomas E. Spanjaard 24687870bc8SMatthew Dillon #define ATA_NETCELL_ID 0x169c 24787870bc8SMatthew Dillon #define ATA_NETCELL_SR 0x0044169c 24887870bc8SMatthew Dillon 249c1b3d7c5SThomas E. Spanjaard #define ATA_NVIDIA_ID 0x10de 250c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE1 0x01bc10de 251c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE2 0x006510de 252c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE2_PRO 0x008510de 253c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE2_PRO_S1 0x008e10de 254c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE3 0x00d510de 255c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE3_PRO 0x00e510de 256c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE3_PRO_S1 0x00e310de 257c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE3_PRO_S2 0x00ee10de 258c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE_MCP04 0x003510de 259c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE_MCP04_S1 0x003610de 260c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE_MCP04_S2 0x003e10de 261c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE_CK804 0x005310de 262c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE_CK804_S1 0x005410de 263c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE_CK804_S2 0x005510de 264c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE_MCP51 0x026510de 265c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE_MCP51_S1 0x026610de 266c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE_MCP51_S2 0x026710de 267c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE_MCP55 0x036e10de 268c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE_MCP55_S1 0x037e10de 269c1b3d7c5SThomas E. Spanjaard #define ATA_NFORCE_MCP55_S2 0x037f10de 27020dd6390SMichael Neumann #define ATA_NFORCE_MCP61 0x03ec10de 27120dd6390SMichael Neumann #define ATA_NFORCE_MCP61_S1 0x03e710de 27220dd6390SMichael Neumann #define ATA_NFORCE_MCP61_S2 0x03f610de 27320dd6390SMichael Neumann #define ATA_NFORCE_MCP61_S3 0x03f710de 27420dd6390SMichael Neumann #define ATA_NFORCE_MCP65 0x044810de 275560012aaSzrj #define ATA_NFORCE_MCP65_A0 0x044c10de 276560012aaSzrj #define ATA_NFORCE_MCP65_A1 0x044d10de 277560012aaSzrj #define ATA_NFORCE_MCP65_A2 0x044e10de 278560012aaSzrj #define ATA_NFORCE_MCP65_A3 0x044f10de 279560012aaSzrj #define ATA_NFORCE_MCP65_A4 0x045c10de 280560012aaSzrj #define ATA_NFORCE_MCP65_A5 0x045d10de 281560012aaSzrj #define ATA_NFORCE_MCP65_A6 0x045e10de 282560012aaSzrj #define ATA_NFORCE_MCP65_A7 0x045f10de 28320dd6390SMichael Neumann #define ATA_NFORCE_MCP67 0x056010de 284560012aaSzrj #define ATA_NFORCE_MCP67_A0 0x055010de 285560012aaSzrj #define ATA_NFORCE_MCP67_A1 0x055110de 286560012aaSzrj #define ATA_NFORCE_MCP67_A2 0x055210de 287560012aaSzrj #define ATA_NFORCE_MCP67_A3 0x055310de 288560012aaSzrj #define ATA_NFORCE_MCP67_A4 0x055410de 289560012aaSzrj #define ATA_NFORCE_MCP67_A5 0x055510de 290560012aaSzrj #define ATA_NFORCE_MCP67_A6 0x055610de 291560012aaSzrj #define ATA_NFORCE_MCP67_A7 0x055710de 292560012aaSzrj #define ATA_NFORCE_MCP67_A8 0x055810de 293560012aaSzrj #define ATA_NFORCE_MCP67_A9 0x055910de 294560012aaSzrj #define ATA_NFORCE_MCP67_AA 0x055A10de 295560012aaSzrj #define ATA_NFORCE_MCP67_AB 0x055B10de 296560012aaSzrj #define ATA_NFORCE_MCP67_AC 0x058410de 29720dd6390SMichael Neumann #define ATA_NFORCE_MCP73 0x056c10de 298560012aaSzrj #define ATA_NFORCE_MCP73_A0 0x07f010de 299560012aaSzrj #define ATA_NFORCE_MCP73_A1 0x07f110de 300560012aaSzrj #define ATA_NFORCE_MCP73_A2 0x07f210de 301560012aaSzrj #define ATA_NFORCE_MCP73_A3 0x07f310de 302560012aaSzrj #define ATA_NFORCE_MCP73_A4 0x07f410de 303560012aaSzrj #define ATA_NFORCE_MCP73_A5 0x07f510de 304560012aaSzrj #define ATA_NFORCE_MCP73_A6 0x07f610de 305560012aaSzrj #define ATA_NFORCE_MCP73_A7 0x07f710de 306560012aaSzrj #define ATA_NFORCE_MCP73_A8 0x07f810de 307560012aaSzrj #define ATA_NFORCE_MCP73_A9 0x07f910de 308560012aaSzrj #define ATA_NFORCE_MCP73_AA 0x07fa10de 309560012aaSzrj #define ATA_NFORCE_MCP73_AB 0x07fb10de 31020dd6390SMichael Neumann #define ATA_NFORCE_MCP77 0x075910de 311560012aaSzrj #define ATA_NFORCE_MCP77_A0 0x0ad010de 312560012aaSzrj #define ATA_NFORCE_MCP77_A1 0x0ad110de 313560012aaSzrj #define ATA_NFORCE_MCP77_A2 0x0ad210de 314560012aaSzrj #define ATA_NFORCE_MCP77_A3 0x0ad310de 315560012aaSzrj #define ATA_NFORCE_MCP77_A4 0x0ad410de 316560012aaSzrj #define ATA_NFORCE_MCP77_A5 0x0ad510de 317560012aaSzrj #define ATA_NFORCE_MCP77_A6 0x0ad610de 318560012aaSzrj #define ATA_NFORCE_MCP77_A7 0x0ad710de 319560012aaSzrj #define ATA_NFORCE_MCP77_A8 0x0ad810de 320560012aaSzrj #define ATA_NFORCE_MCP77_A9 0x0ad910de 321560012aaSzrj #define ATA_NFORCE_MCP77_AA 0x0ada10de 322560012aaSzrj #define ATA_NFORCE_MCP77_AB 0x0adb10de 323560012aaSzrj #define ATA_NFORCE_MCP79_A0 0x0ab410de 324560012aaSzrj #define ATA_NFORCE_MCP79_A1 0x0ab510de 325560012aaSzrj #define ATA_NFORCE_MCP79_A2 0x0ab610de 326560012aaSzrj #define ATA_NFORCE_MCP79_A3 0x0ab710de 327560012aaSzrj #define ATA_NFORCE_MCP79_A4 0x0ab810de 328560012aaSzrj #define ATA_NFORCE_MCP79_A5 0x0ab910de 329560012aaSzrj #define ATA_NFORCE_MCP79_A6 0x0aba10de 330560012aaSzrj #define ATA_NFORCE_MCP79_A7 0x0abb10de 331560012aaSzrj #define ATA_NFORCE_MCP79_A8 0x0abc10de 332560012aaSzrj #define ATA_NFORCE_MCP79_A9 0x0abd10de 333560012aaSzrj #define ATA_NFORCE_MCP79_AA 0x0abe10de 334560012aaSzrj #define ATA_NFORCE_MCP79_AB 0x0abf10de 335560012aaSzrj #define ATA_NFORCE_MCP89_A0 0x0d8410de 336560012aaSzrj #define ATA_NFORCE_MCP89_A1 0x0d8510de 337560012aaSzrj #define ATA_NFORCE_MCP89_A2 0x0d8610de 338560012aaSzrj #define ATA_NFORCE_MCP89_A3 0x0d8710de 339560012aaSzrj #define ATA_NFORCE_MCP89_A4 0x0d8810de 340560012aaSzrj #define ATA_NFORCE_MCP89_A5 0x0d8910de 341560012aaSzrj #define ATA_NFORCE_MCP89_A6 0x0d8a10de 342560012aaSzrj #define ATA_NFORCE_MCP89_A7 0x0d8b10de 343560012aaSzrj #define ATA_NFORCE_MCP89_A8 0x0d8c10de 344560012aaSzrj #define ATA_NFORCE_MCP89_A9 0x0d8d10de 345560012aaSzrj #define ATA_NFORCE_MCP89_AA 0x0d8e10de 346560012aaSzrj #define ATA_NFORCE_MCP89_AB 0x0d8f10de 347c1b3d7c5SThomas E. Spanjaard 348c1b3d7c5SThomas E. Spanjaard #define ATA_PROMISE_ID 0x105a 349c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20246 0x4d33105a 350c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20262 0x4d38105a 351c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20263 0x0d38105a 352c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20265 0x0d30105a 353c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20267 0x4d30105a 354c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20268 0x4d68105a 355c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20269 0x4d69105a 356c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20270 0x6268105a 357c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20271 0x6269105a 358c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20275 0x1275105a 359c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20276 0x5275105a 360c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20277 0x7275105a 361c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20318 0x3318105a 362c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20319 0x3319105a 363c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20371 0x3371105a 364c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20375 0x3375105a 365c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20376 0x3376105a 366c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20377 0x3377105a 367c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20378 0x3373105a 368c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20379 0x3372105a 369c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20571 0x3571105a 370c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20575 0x3d75105a 371c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20579 0x3574105a 372c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20771 0x3570105a 373c1b3d7c5SThomas E. Spanjaard #define ATA_PDC40518 0x3d18105a 374c1b3d7c5SThomas E. Spanjaard #define ATA_PDC40519 0x3519105a 375c1b3d7c5SThomas E. Spanjaard #define ATA_PDC40718 0x3d17105a 376c1b3d7c5SThomas E. Spanjaard #define ATA_PDC40719 0x3515105a 377c1b3d7c5SThomas E. Spanjaard #define ATA_PDC40775 0x3d73105a 378c1b3d7c5SThomas E. Spanjaard #define ATA_PDC40779 0x3577105a 379c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20617 0x6617105a 380c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20618 0x6626105a 381c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20619 0x6629105a 382c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20620 0x6620105a 383c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20621 0x6621105a 384c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20622 0x6622105a 385c1b3d7c5SThomas E. Spanjaard #define ATA_PDC20624 0x6624105a 386c1b3d7c5SThomas E. Spanjaard #define ATA_PDC81518 0x8002105a 387c1b3d7c5SThomas E. Spanjaard 388c1b3d7c5SThomas E. Spanjaard #define ATA_SERVERWORKS_ID 0x1166 389c1b3d7c5SThomas E. Spanjaard #define ATA_ROSB4_ISA 0x02001166 390c1b3d7c5SThomas E. Spanjaard #define ATA_ROSB4 0x02111166 391c1b3d7c5SThomas E. Spanjaard #define ATA_CSB5 0x02121166 392c1b3d7c5SThomas E. Spanjaard #define ATA_CSB6 0x02131166 393c1b3d7c5SThomas E. Spanjaard #define ATA_CSB6_1 0x02171166 394c1b3d7c5SThomas E. Spanjaard #define ATA_HT1000 0x02141166 395c1b3d7c5SThomas E. Spanjaard #define ATA_HT1000_S1 0x024b1166 396c1b3d7c5SThomas E. Spanjaard #define ATA_HT1000_S2 0x024a1166 39787870bc8SMatthew Dillon #define ATA_K2 0x02401166 39887870bc8SMatthew Dillon #define ATA_FRODO4 0x02411166 39987870bc8SMatthew Dillon #define ATA_FRODO8 0x02421166 400c1b3d7c5SThomas E. Spanjaard 401c1b3d7c5SThomas E. Spanjaard #define ATA_SILICON_IMAGE_ID 0x1095 402c1b3d7c5SThomas E. Spanjaard #define ATA_SII3114 0x31141095 403c1b3d7c5SThomas E. Spanjaard #define ATA_SII3512 0x35121095 404c1b3d7c5SThomas E. Spanjaard #define ATA_SII3112 0x31121095 405c1b3d7c5SThomas E. Spanjaard #define ATA_SII3112_1 0x02401095 40687870bc8SMatthew Dillon #define ATA_SII3124 0x31241095 40787870bc8SMatthew Dillon #define ATA_SII3132 0x31321095 408560012aaSzrj #define ATA_SII3132_1 0x02421095 409560012aaSzrj #define ATA_SII3132_2 0x02441095 410c1b3d7c5SThomas E. Spanjaard #define ATA_SII0680 0x06801095 411c1b3d7c5SThomas E. Spanjaard #define ATA_CMD646 0x06461095 412c1b3d7c5SThomas E. Spanjaard #define ATA_CMD648 0x06481095 413c1b3d7c5SThomas E. Spanjaard #define ATA_CMD649 0x06491095 414c1b3d7c5SThomas E. Spanjaard 415c1b3d7c5SThomas E. Spanjaard #define ATA_SIS_ID 0x1039 416c1b3d7c5SThomas E. Spanjaard #define ATA_SISSOUTH 0x00081039 417c1b3d7c5SThomas E. Spanjaard #define ATA_SIS5511 0x55111039 418c1b3d7c5SThomas E. Spanjaard #define ATA_SIS5513 0x55131039 419c1b3d7c5SThomas E. Spanjaard #define ATA_SIS5517 0x55171039 420c1b3d7c5SThomas E. Spanjaard #define ATA_SIS5518 0x55181039 421c1b3d7c5SThomas E. Spanjaard #define ATA_SIS5571 0x55711039 422c1b3d7c5SThomas E. Spanjaard #define ATA_SIS5591 0x55911039 423c1b3d7c5SThomas E. Spanjaard #define ATA_SIS5596 0x55961039 424c1b3d7c5SThomas E. Spanjaard #define ATA_SIS5597 0x55971039 425c1b3d7c5SThomas E. Spanjaard #define ATA_SIS5598 0x55981039 426c1b3d7c5SThomas E. Spanjaard #define ATA_SIS5600 0x56001039 427c1b3d7c5SThomas E. Spanjaard #define ATA_SIS530 0x05301039 428c1b3d7c5SThomas E. Spanjaard #define ATA_SIS540 0x05401039 429c1b3d7c5SThomas E. Spanjaard #define ATA_SIS550 0x05501039 430c1b3d7c5SThomas E. Spanjaard #define ATA_SIS620 0x06201039 431c1b3d7c5SThomas E. Spanjaard #define ATA_SIS630 0x06301039 432c1b3d7c5SThomas E. Spanjaard #define ATA_SIS635 0x06351039 433c1b3d7c5SThomas E. Spanjaard #define ATA_SIS633 0x06331039 434c1b3d7c5SThomas E. Spanjaard #define ATA_SIS640 0x06401039 435c1b3d7c5SThomas E. Spanjaard #define ATA_SIS645 0x06451039 436c1b3d7c5SThomas E. Spanjaard #define ATA_SIS646 0x06461039 437c1b3d7c5SThomas E. Spanjaard #define ATA_SIS648 0x06481039 438c1b3d7c5SThomas E. Spanjaard #define ATA_SIS650 0x06501039 439c1b3d7c5SThomas E. Spanjaard #define ATA_SIS651 0x06511039 440c1b3d7c5SThomas E. Spanjaard #define ATA_SIS652 0x06521039 441c1b3d7c5SThomas E. Spanjaard #define ATA_SIS655 0x06551039 442c1b3d7c5SThomas E. Spanjaard #define ATA_SIS658 0x06581039 443c1b3d7c5SThomas E. Spanjaard #define ATA_SIS661 0x06611039 444c1b3d7c5SThomas E. Spanjaard #define ATA_SIS730 0x07301039 445c1b3d7c5SThomas E. Spanjaard #define ATA_SIS733 0x07331039 446c1b3d7c5SThomas E. Spanjaard #define ATA_SIS735 0x07351039 447c1b3d7c5SThomas E. Spanjaard #define ATA_SIS740 0x07401039 448c1b3d7c5SThomas E. Spanjaard #define ATA_SIS745 0x07451039 449c1b3d7c5SThomas E. Spanjaard #define ATA_SIS746 0x07461039 450c1b3d7c5SThomas E. Spanjaard #define ATA_SIS748 0x07481039 451c1b3d7c5SThomas E. Spanjaard #define ATA_SIS750 0x07501039 452c1b3d7c5SThomas E. Spanjaard #define ATA_SIS751 0x07511039 453c1b3d7c5SThomas E. Spanjaard #define ATA_SIS752 0x07521039 454c1b3d7c5SThomas E. Spanjaard #define ATA_SIS755 0x07551039 455c1b3d7c5SThomas E. Spanjaard #define ATA_SIS961 0x09611039 456c1b3d7c5SThomas E. Spanjaard #define ATA_SIS962 0x09621039 457c1b3d7c5SThomas E. Spanjaard #define ATA_SIS963 0x09631039 458c1b3d7c5SThomas E. Spanjaard #define ATA_SIS964 0x09641039 459c1b3d7c5SThomas E. Spanjaard #define ATA_SIS965 0x09651039 460c1b3d7c5SThomas E. Spanjaard #define ATA_SIS180 0x01801039 461c1b3d7c5SThomas E. Spanjaard #define ATA_SIS181 0x01811039 462c1b3d7c5SThomas E. Spanjaard #define ATA_SIS182 0x01821039 463c1b3d7c5SThomas E. Spanjaard 464c1b3d7c5SThomas E. Spanjaard #define ATA_VIA_ID 0x1106 465c1b3d7c5SThomas E. Spanjaard #define ATA_VIA82C571 0x05711106 466c1b3d7c5SThomas E. Spanjaard #define ATA_VIA82C586 0x05861106 467c1b3d7c5SThomas E. Spanjaard #define ATA_VIA82C596 0x05961106 468c1b3d7c5SThomas E. Spanjaard #define ATA_VIA82C686 0x06861106 469c1b3d7c5SThomas E. Spanjaard #define ATA_VIA8231 0x82311106 470c1b3d7c5SThomas E. Spanjaard #define ATA_VIA8233 0x30741106 471c1b3d7c5SThomas E. Spanjaard #define ATA_VIA8233A 0x31471106 472c1b3d7c5SThomas E. Spanjaard #define ATA_VIA8233C 0x31091106 473c1b3d7c5SThomas E. Spanjaard #define ATA_VIA8235 0x31771106 474c1b3d7c5SThomas E. Spanjaard #define ATA_VIA8237 0x32271106 47587870bc8SMatthew Dillon #define ATA_VIA8237A 0x05911106 4763ec9ecbcSMatthew Dillon #define ATA_VIA8237S 0x53371106 477560012aaSzrj #define ATA_VIA8237_5372 0x53721106 478560012aaSzrj #define ATA_VIA8237_7372 0x73721106 479c1b3d7c5SThomas E. Spanjaard #define ATA_VIA8251 0x33491106 480c1b3d7c5SThomas E. Spanjaard #define ATA_VIA8361 0x31121106 481c1b3d7c5SThomas E. Spanjaard #define ATA_VIA8363 0x03051106 482c1b3d7c5SThomas E. Spanjaard #define ATA_VIA8371 0x03911106 483c1b3d7c5SThomas E. Spanjaard #define ATA_VIA8662 0x31021106 484c1b3d7c5SThomas E. Spanjaard #define ATA_VIA6410 0x31641106 485c1b3d7c5SThomas E. Spanjaard #define ATA_VIA6420 0x31491106 486c1b3d7c5SThomas E. Spanjaard #define ATA_VIA6421 0x32491106 487c1b3d7c5SThomas E. Spanjaard 488c1b3d7c5SThomas E. Spanjaard /* global prototypes ata-pci.c */ 489c1b3d7c5SThomas E. Spanjaard int ata_pci_probe(device_t dev); 490c1b3d7c5SThomas E. Spanjaard int ata_pci_attach(device_t dev); 491c1b3d7c5SThomas E. Spanjaard int ata_pci_detach(device_t dev); 4924f7fe8c7SSepherosa Ziehau 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, int cpuid); 493c1b3d7c5SThomas E. Spanjaard int ata_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); 494c1b3d7c5SThomas E. Spanjaard int ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_intr_t *function, void *argument, void **cookiep); 495c1b3d7c5SThomas E. Spanjaard int ata_pci_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); 496c1b3d7c5SThomas E. Spanjaard int ata_pci_allocate(device_t dev); 497c1b3d7c5SThomas E. Spanjaard int ata_pci_status(device_t dev); 49813b0cf9eSzrj void ata_pci_hw(device_t dev); 499c1b3d7c5SThomas E. Spanjaard void ata_pci_dmainit(device_t); 50059503772Szrj const char *ata_pcivendor2str(device_t dev); 50113b0cf9eSzrj int ata_legacy(device_t); 50213b0cf9eSzrj void ata_generic_intr(void *data); 50343156ad7Szrj int ata_setup_interrupt(device_t dev, void *intr_func); 50413b0cf9eSzrj void ata_teardown_interrupt(device_t dev); 50559503772Szrj void ata_set_desc(device_t dev); 50659503772Szrj const struct ata_chip_id *ata_match_chip(device_t dev, const struct ata_chip_id *index); 50759503772Szrj const struct ata_chip_id *ata_find_chip(device_t dev, const struct ata_chip_id *index, int slot); 50813b0cf9eSzrj int ata_check_80pin(device_t dev, int mode); 50913b0cf9eSzrj int ata_mode2idx(int mode); 510c1b3d7c5SThomas E. Spanjaard 511c1b3d7c5SThomas E. Spanjaard /* global prototypes ata-chipset.c */ 512c1b3d7c5SThomas E. Spanjaard int ata_generic_ident(device_t); 513878a3234Szrj int ata_cenatek_ident(device_t dev); 514878a3234Szrj int ata_micron_ident(device_t dev); 515878a3234Szrj int ata_adaptec_ident(device_t dev); 5163ec9ecbcSMatthew Dillon int ata_ahci_ident(device_t); 517c1b3d7c5SThomas E. Spanjaard int ata_acard_ident(device_t); 518c1b3d7c5SThomas E. Spanjaard int ata_ali_ident(device_t); 519c1b3d7c5SThomas E. Spanjaard int ata_amd_ident(device_t); 520c1b3d7c5SThomas E. Spanjaard int ata_ati_ident(device_t); 521c1b3d7c5SThomas E. Spanjaard int ata_cyrix_ident(device_t); 522c1b3d7c5SThomas E. Spanjaard int ata_cypress_ident(device_t); 523c1b3d7c5SThomas E. Spanjaard int ata_highpoint_ident(device_t); 524c1b3d7c5SThomas E. Spanjaard int ata_intel_ident(device_t); 525c1b3d7c5SThomas E. Spanjaard int ata_ite_ident(device_t); 526c1b3d7c5SThomas E. Spanjaard int ata_jmicron_ident(device_t); 527c1b3d7c5SThomas E. Spanjaard int ata_marvell_ident(device_t); 528c1b3d7c5SThomas E. Spanjaard int ata_national_ident(device_t); 529c1b3d7c5SThomas E. Spanjaard int ata_nvidia_ident(device_t); 53087870bc8SMatthew Dillon int ata_netcell_ident(device_t); 531c1b3d7c5SThomas E. Spanjaard int ata_promise_ident(device_t); 532c1b3d7c5SThomas E. Spanjaard int ata_serverworks_ident(device_t); 533c1b3d7c5SThomas E. Spanjaard int ata_sii_ident(device_t); 534c1b3d7c5SThomas E. Spanjaard int ata_sis_ident(device_t); 535c1b3d7c5SThomas E. Spanjaard int ata_via_ident(device_t); 536