The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/ata/ata-pci.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 2003, 2004 Søren Schmidt <sos@FreeBSD.org>
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  * 1. Redistributions of source code must retain the above copyright
    9  *    notice, this list of conditions and the following disclaimer,
   10  *    without modification, immediately at the beginning of the file.
   11  * 2. Redistributions in binary form must reproduce the above copyright
   12  *    notice, this list of conditions and the following disclaimer in the
   13  *    documentation and/or other materials provided with the distribution.
   14  * 3. The name of the author may not be used to endorse or promote products
   15  *    derived from this software without specific prior written permission.
   16  *
   17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   27  *
   28  * $FreeBSD$
   29  */
   30 
   31 /* structure holding chipset config info */
   32 struct ata_chip_id {
   33     u_int32_t           chipid;
   34     u_int8_t            chiprev;
   35     int                 cfg1;
   36     int                 cfg2;
   37     u_int8_t            max_dma;
   38     char                *text;
   39 };
   40 
   41 /* structure describing a PCI ATA controller */
   42 struct ata_pci_controller {
   43     int                 r_type1;
   44     int                 r_rid1;
   45     struct resource     *r_res1;
   46     int                 r_type2;
   47     int                 r_rid2;
   48     struct resource     *r_res2;
   49     struct resource     *r_irq;
   50     void                *handle;
   51     struct ata_chip_id  *chip;
   52     int                 channels;
   53     int                 (*chipinit)(device_t);
   54     int                 (*allocate)(device_t, struct ata_channel *);
   55     void                (*reset)(struct ata_channel *);
   56     void                (*dmainit)(struct ata_channel *);
   57     void                (*setmode)(struct ata_device *, int);
   58     int                 (*locking)(struct ata_channel *, int);
   59     struct {
   60     void                (*function)(void *);
   61     void                *argument;
   62     } interrupt[8];     /* SOS max ch# for now XXX */
   63     void                *driver;
   64 };
   65 
   66 /* defines for known chipset PCI id's */
   67 #define ATA_ACARD_ID            0x1191
   68 #define ATA_ATP850              0x00021191
   69 #define ATA_ATP850A             0x00041191
   70 #define ATA_ATP850R             0x00051191
   71 #define ATA_ATP860A             0x00061191
   72 #define ATA_ATP860R             0x00071191
   73 #define ATA_ATP865A             0x00081191
   74 #define ATA_ATP865R             0x00091191
   75 
   76 #define ATA_AMD_ID              0x1022
   77 #define ATA_AMD755              0x74011022
   78 #define ATA_AMD756              0x74091022
   79 #define ATA_AMD766              0x74111022
   80 #define ATA_AMD768              0x74411022
   81 #define ATA_AMD8111             0x74691022
   82 
   83 #define ATA_ACER_LABS_ID        0x10b9
   84 #define ATA_ALI_5229            0x522910b9
   85 
   86 #define ATA_CENATEK_ID          0x16ca
   87 #define ATA_CENATEK_ROCKET      0x000116ca
   88 
   89 #define ATA_CYRIX_ID            0x1078
   90 #define ATA_CYRIX_5530          0x01021078
   91 
   92 #define ATA_CYPRESS_ID          0x1080
   93 #define ATA_CYPRESS_82C693      0xc6931080
   94 
   95 #define ATA_DEC_21150           0x00221011
   96 #define ATA_DEC_21150_1         0x00231011
   97 
   98 #define ATA_HIGHPOINT_ID        0x1103
   99 #define ATA_HPT366              0x00041103
  100 #define ATA_HPT372              0x00051103
  101 #define ATA_HPT302              0x00061103
  102 #define ATA_HPT371              0x00071103
  103 #define ATA_HPT374              0x00081103
  104 
  105 #define ATA_INTEL_ID            0x8086
  106 #define ATA_I960RM              0x09628086
  107 #define ATA_I82371FB            0x12308086
  108 #define ATA_I82371SB            0x70108086
  109 #define ATA_I82371AB            0x71118086
  110 #define ATA_I82443MX            0x71998086
  111 #define ATA_I82451NX            0x84ca8086
  112 #define ATA_I82372FB            0x76018086
  113 #define ATA_I82801AB            0x24218086
  114 #define ATA_I82801AA            0x24118086
  115 #define ATA_I82801BA            0x244a8086
  116 #define ATA_I82801BA_1          0x244b8086
  117 #define ATA_I82801CA            0x248a8086
  118 #define ATA_I82801CA_1          0x248b8086
  119 #define ATA_I82801DB            0x24cb8086
  120 #define ATA_I82801DB_1          0x24ca8086
  121 #define ATA_I82801EB            0x24db8086
  122 #define ATA_I82801EB_S1         0x24d18086
  123 #define ATA_I82801EB_R1         0x24df8086
  124 #define ATA_I6300ESB            0x25a28086
  125 #define ATA_I6300ESB_S1         0x25a38086
  126 #define ATA_I6300ESB_R1         0x25b08086
  127 #define ATA_I82801FB            0x266f8086
  128 #define ATA_I82801FB_S1         0x26518086
  129 #define ATA_I82801FB_R1         0x26528086
  130 #define ATA_I82801FBM           0x26538086
  131 
  132 #define ATA_ITE_ID              0x1283
  133 #define ATA_IT8212F             0x82121283
  134  
  135 #define ATA_MICRON_ID           0x1042
  136 #define ATA_MICRON_RZ1000       0x10001042
  137 #define ATA_MICRON_RZ1001       0x10011042
  138 
  139 #define ATA_NATIONAL_ID         0x100b
  140 #define ATA_SC1100              0x0502100b
  141 
  142 #define ATA_NVIDIA_ID           0x10de
  143 #define ATA_NFORCE1             0x01bc10de
  144 #define ATA_NFORCE2             0x006510de
  145 #define ATA_NFORCE2_MCP         0x008510de
  146 #define ATA_NFORCE3             0x00d510de
  147 #define ATA_NFORCE3_PRO         0x00e510de
  148 #define ATA_NFORCE3_PRO_S1      0x00e310de
  149 #define ATA_NFORCE3_PRO_S2      0x00ee10de
  150 #define ATA_NFORCE3_MCP         0x003510de
  151 #define ATA_NFORCE3_MCP_S1      0x003610de
  152 #define ATA_NFORCE3_MCP_S2      0x003e10de
  153 #define ATA_NFORCE4             0x005310de
  154 #define ATA_NFORCE4_S1          0x005410de
  155 #define ATA_NFORCE4_S2          0x005510de
  156 
  157 
  158 #define ATA_PROMISE_ID          0x105a
  159 #define ATA_PDC20246            0x4d33105a
  160 #define ATA_PDC20262            0x4d38105a
  161 #define ATA_PDC20263            0x0d38105a
  162 #define ATA_PDC20265            0x0d30105a
  163 #define ATA_PDC20267            0x4d30105a
  164 #define ATA_PDC20268            0x4d68105a
  165 #define ATA_PDC20269            0x4d69105a
  166 #define ATA_PDC20270            0x6268105a
  167 #define ATA_PDC20271            0x6269105a
  168 #define ATA_PDC20275            0x1275105a
  169 #define ATA_PDC20276            0x5275105a
  170 #define ATA_PDC20277            0x7275105a
  171 #define ATA_PDC20318            0x3318105a
  172 #define ATA_PDC20319            0x3319105a
  173 #define ATA_PDC20371            0x3371105a
  174 #define ATA_PDC20375            0x3375105a
  175 #define ATA_PDC20376            0x3376105a
  176 #define ATA_PDC20377            0x3377105a
  177 #define ATA_PDC20378            0x3373105a
  178 #define ATA_PDC20379            0x3372105a
  179 #define ATA_PDC20571            0x3571105a
  180 #define ATA_PDC20575            0x3d75105a
  181 #define ATA_PDC20579            0x3574105a
  182 #define ATA_PDC20580            0x3570105a
  183 #define ATA_PDC40518            0x3d18105a
  184 #define ATA_PDC20617            0x6617105a
  185 #define ATA_PDC20618            0x6626105a
  186 #define ATA_PDC20619            0x6629105a
  187 #define ATA_PDC20620            0x6620105a
  188 #define ATA_PDC20621            0x6621105a
  189 #define ATA_PDC20622            0x6622105a
  190 
  191 #define ATA_SERVERWORKS_ID      0x1166
  192 #define ATA_ROSB4_ISA           0x02001166
  193 #define ATA_ROSB4               0x02111166
  194 #define ATA_CSB5                0x02121166
  195 #define ATA_CSB6                0x02131166
  196 #define ATA_CSB6_1              0x02171166
  197 
  198 #define ATA_SILICON_IMAGE_ID    0x1095
  199 #define ATA_SII3114             0x31141095
  200 #define ATA_SII3512             0x35121095
  201 #define ATA_SII3112             0x31121095
  202 #define ATA_SII3112_1           0x02401095
  203 #define ATA_SII0680             0x06801095
  204 #define ATA_CMD646              0x06461095
  205 #define ATA_CMD648              0x06481095
  206 #define ATA_CMD649              0x06491095
  207 
  208 #define ATA_SIS_ID              0x1039
  209 #define ATA_SISSOUTH            0x00081039
  210 #define ATA_SIS5511             0x55111039
  211 #define ATA_SIS5513             0x55131039
  212 #define ATA_SIS5517             0x55171039
  213 #define ATA_SIS5518             0x55181039
  214 #define ATA_SIS5571             0x55711039
  215 #define ATA_SIS5591             0x55911039
  216 #define ATA_SIS5596             0x55961039
  217 #define ATA_SIS5597             0x55971039
  218 #define ATA_SIS5598             0x55981039
  219 #define ATA_SIS5600             0x56001039
  220 #define ATA_SIS530              0x05301039
  221 #define ATA_SIS540              0x05401039
  222 #define ATA_SIS550              0x05501039
  223 #define ATA_SIS620              0x06201039
  224 #define ATA_SIS630              0x06301039
  225 #define ATA_SIS635              0x06351039
  226 #define ATA_SIS633              0x06331039
  227 #define ATA_SIS640              0x06401039
  228 #define ATA_SIS645              0x06451039
  229 #define ATA_SIS646              0x06461039
  230 #define ATA_SIS648              0x06481039
  231 #define ATA_SIS650              0x06501039
  232 #define ATA_SIS651              0x06511039
  233 #define ATA_SIS652              0x06521039
  234 #define ATA_SIS655              0x06551039
  235 #define ATA_SIS658              0x06581039
  236 #define ATA_SIS661              0x06611039
  237 #define ATA_SIS730              0x07301039
  238 #define ATA_SIS733              0x07331039
  239 #define ATA_SIS735              0x07351039
  240 #define ATA_SIS740              0x07401039
  241 #define ATA_SIS745              0x07451039
  242 #define ATA_SIS746              0x07461039
  243 #define ATA_SIS748              0x07481039
  244 #define ATA_SIS750              0x07501039
  245 #define ATA_SIS751              0x07511039
  246 #define ATA_SIS752              0x07521039
  247 #define ATA_SIS755              0x07551039
  248 #define ATA_SIS961              0x09611039
  249 #define ATA_SIS962              0x09621039
  250 #define ATA_SIS963              0x09631039
  251 #define ATA_SIS964              0x09641039
  252 #define ATA_SIS964_S            0x01801039
  253 
  254 #define ATA_VIA_ID              0x1106
  255 #define ATA_VIA82C571           0x05711106
  256 #define ATA_VIA82C586           0x05861106
  257 #define ATA_VIA82C596           0x05961106
  258 #define ATA_VIA82C686           0x06861106
  259 #define ATA_VIA8231             0x82311106
  260 #define ATA_VIA8233             0x30741106
  261 #define ATA_VIA8233A            0x31471106
  262 #define ATA_VIA8233C            0x31091106
  263 #define ATA_VIA8235             0x31771106
  264 #define ATA_VIA8237             0x32271106
  265 #define ATA_VIA8361             0x31121106
  266 #define ATA_VIA8363             0x03051106
  267 #define ATA_VIA8371             0x03911106
  268 #define ATA_VIA8662             0x31021106
  269 #define ATA_VIA6410             0x31641106
  270 #define ATA_VIA6420             0x31491106
  271 
  272 /* chipset setup related defines */
  273 #define ATPOLD          1
  274 
  275 #define ALIOLD          0x01
  276 #define ALINEW          0x02
  277 
  278 #define HPT366          0
  279 #define HPT370          1
  280 #define HPT372          2
  281 #define HPT374          3
  282 #define HPTOLD          0x01
  283 
  284 #define PROLD           0
  285 #define PRNEW           1
  286 #define PRTX            2
  287 #define PRMIO           3
  288 #define PRTX4           0x01
  289 #define PRSX4X          0x02
  290 #define PRSX6K          0x04
  291 #define PRPATA          0x08
  292 #define PRCMBO          0x10
  293 #define PRCMBO2         0x20
  294 #define PRSATA          0x40
  295 #define PRSATA2         0x80
  296 
  297 #define SWKS33          0
  298 #define SWKS66          1
  299 #define SWKS100         2
  300 
  301 #define SIIMEMIO        1
  302 #define SIIINTR         0x01
  303 #define SIISETCLK       0x02
  304 #define SIIBUG          0x04
  305 #define SII4CH          0x08
  306 
  307 #define SIS_SOUTH       1
  308 #define SISSATA         2
  309 #define SIS133NEW       3
  310 #define SIS133OLD       4
  311 #define SIS100NEW       5
  312 #define SIS100OLD       6
  313 #define SIS66           7
  314 #define SIS33           8
  315 
  316 #define VIA33           0
  317 #define VIA66           1
  318 #define VIA100          2
  319 #define VIA133          3
  320 #define AMDNVIDIA       4
  321 #define AMDCABLE        0x01
  322 #define AMDBUG          0x02
  323 #define NVIDIA          0x04
  324 #define VIACLK          0x08
  325 #define VIABUG          0x10
  326 
  327 /* global prototypes */
  328 int ata_legacy(device_t);
  329 
  330 void ata_dmainit(struct ata_channel *);
  331 int ata_dmastart(struct ata_channel *, caddr_t, int32_t, int);
  332 int ata_dmastop(struct ata_channel *);
  333 
  334 int ata_generic_ident(device_t);
  335 int ata_acard_ident(device_t);
  336 int ata_ali_ident(device_t);
  337 int ata_amd_ident(device_t);
  338 int ata_cyrix_ident(device_t);
  339 int ata_cypress_ident(device_t);
  340 int ata_highpoint_ident(device_t);
  341 int ata_intel_ident(device_t);
  342 int ata_ite_ident(device_t);
  343 int ata_national_ident(device_t);
  344 int ata_nvidia_ident(device_t);
  345 int ata_promise_ident(device_t);
  346 int ata_serverworks_ident(device_t);
  347 int ata_sii_ident(device_t);
  348 int ata_sis_ident(device_t);
  349 int ata_via_ident(device_t);

Cache object: b7bac395547f851f728416c6a74f87cd


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.