]> err.no Git - linux-2.6/blobdiff - drivers/ata/ata_piix.c
sata_mv HighPoint 2310 support (88SX7042)
[linux-2.6] / drivers / ata / ata_piix.c
index 7bf238638e8eb7b1d22c8406f953d031923fed9d..47701b286f8b6e2a124392c8b8b2befe27051139 100644 (file)
@@ -40,7 +40,7 @@
  * Documentation
  *     Publically available from Intel web site. Errata documentation
  * is also publically available. As an aide to anyone hacking on this
- * driver the list of errata that are relevant is below.going back to
+ * driver the list of errata that are relevant is belowgoing back to
  * PIIX4. Older device documentation is now a bit tricky to find.
  *
  * The chipsets all follow very much the same design. The orginal Triton
@@ -105,9 +105,8 @@ enum {
        PIIX_FLAG_AHCI          = (1 << 27), /* AHCI possible */
        PIIX_FLAG_CHECKINTR     = (1 << 28), /* make sure PCI INTx enabled */
 
-       PIIX_PATA_FLAGS         = ATA_FLAG_SLAVE_POSS | ATA_FLAG_DETECT_POLLING,
-       PIIX_SATA_FLAGS         = ATA_FLAG_SATA | PIIX_FLAG_CHECKINTR |
-                                 ATA_FLAG_DETECT_POLLING,
+       PIIX_PATA_FLAGS         = ATA_FLAG_SLAVE_POSS,
+       PIIX_SATA_FLAGS         = ATA_FLAG_SATA | PIIX_FLAG_CHECKINTR,
 
        /* combined mode.  if set, PATA is channel 0.
         * if clear, PATA is channel 1.
@@ -125,11 +124,10 @@ enum {
        ich_pata_100            = 3,    /* ICH up to UDMA 100 */
        ich_pata_133            = 4,    /* ICH up to UDMA 133 */
        ich5_sata               = 5,
-       esb_sata                = 6,
-       ich6_sata               = 7,
-       ich6_sata_ahci          = 8,
-       ich6m_sata_ahci         = 9,
-       ich8_sata_ahci          = 10,
+       ich6_sata               = 6,
+       ich6_sata_ahci          = 7,
+       ich6m_sata_ahci         = 8,
+       ich8_sata_ahci          = 9,
 
        /* constants for mapping table */
        P0                      = 0,  /* port 0 */
@@ -146,13 +144,11 @@ enum {
 struct piix_map_db {
        const u32 mask;
        const u16 port_enable;
-       const int present_shift;
        const int map[][4];
 };
 
 struct piix_host_priv {
        const int *map;
-       const struct piix_map_db *map_db;
 };
 
 static int piix_init_one (struct pci_dev *pdev,
@@ -217,9 +213,9 @@ static const struct pci_device_id piix_pci_tbl[] = {
        /* 82801EB (ICH5) */
        { 0x8086, 0x24df, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata },
        /* 6300ESB (ICH5 variant with broken PCS present bits) */
-       { 0x8086, 0x25a3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, esb_sata },
+       { 0x8086, 0x25a3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata },
        /* 6300ESB pretending RAID */
-       { 0x8086, 0x25b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, esb_sata },
+       { 0x8086, 0x25b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata },
        /* 82801FB/FW (ICH6/ICH6W) */
        { 0x8086, 0x2651, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata },
        /* 82801FR/FRW (ICH6R/ICH6RW) */
@@ -230,14 +226,26 @@ static const struct pci_device_id piix_pci_tbl[] = {
        { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
        /* 2801GBM/GHM (ICH7M, identical to ICH6M) */
        { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci },
-       /* Enterprise Southbridge 2 (where's the datasheet?) */
+       /* Enterprise Southbridge 2 (631xESB/632xESB) */
        { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
-       /* SATA Controller 1 IDE (ICH8, no datasheet yet) */
+       /* SATA Controller 1 IDE (ICH8) */
        { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
-       /* SATA Controller 2 IDE (ICH8, ditto) */
+       /* SATA Controller 2 IDE (ICH8) */
        { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
-       /* Mobile SATA Controller IDE (ICH8M, ditto) */
+       /* Mobile SATA Controller IDE (ICH8M) */
        { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
+       /* SATA Controller IDE (ICH9) */
+       { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
+       /* SATA Controller IDE (ICH9) */
+       { 0x8086, 0x2921, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
+       /* SATA Controller IDE (ICH9) */
+       { 0x8086, 0x2926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
+       /* SATA Controller IDE (ICH9M) */
+       { 0x8086, 0x2928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
+       /* SATA Controller IDE (ICH9M) */
+       { 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
+       /* SATA Controller IDE (ICH9M) */
+       { 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
 
        { }     /* terminate list */
 };
@@ -334,7 +342,7 @@ static const struct ata_port_operations ich_pata_ops = {
 
        .port_start             = ata_port_start,
        .port_stop              = ata_port_stop,
-       .host_stop              = ata_host_stop,
+       .host_stop              = piix_host_stop,
 };
 
 static const struct ata_port_operations piix_sata_ops = {
@@ -370,7 +378,6 @@ static const struct ata_port_operations piix_sata_ops = {
 static const struct piix_map_db ich5_map_db = {
        .mask = 0x7,
        .port_enable = 0x3,
-       .present_shift = 4,
        .map = {
                /* PM   PS   SM   SS       MAP  */
                {  P0,  NA,  P1,  NA }, /* 000b */
@@ -387,7 +394,6 @@ static const struct piix_map_db ich5_map_db = {
 static const struct piix_map_db ich6_map_db = {
        .mask = 0x3,
        .port_enable = 0xf,
-       .present_shift = 4,
        .map = {
                /* PM   PS   SM   SS       MAP */
                {  P0,  P2,  P1,  P3 }, /* 00b */
@@ -400,7 +406,6 @@ static const struct piix_map_db ich6_map_db = {
 static const struct piix_map_db ich6m_map_db = {
        .mask = 0x3,
        .port_enable = 0x5,
-       .present_shift = 4,
 
        /* Map 01b isn't specified in the doc but some notebooks use
         * it anyway.  MAP 01b have been spotted on both ICH6M and
@@ -418,7 +423,6 @@ static const struct piix_map_db ich6m_map_db = {
 static const struct piix_map_db ich8_map_db = {
        .mask = 0x3,
        .port_enable = 0x3,
-       .present_shift = 8,
        .map = {
                /* PM   PS   SM   SS       MAP */
                {  P0,  P2,  P1,  P3 }, /* 00b (hardwired when in AHCI) */
@@ -430,7 +434,6 @@ static const struct piix_map_db ich8_map_db = {
 
 static const struct piix_map_db *piix_map_db_table[] = {
        [ich5_sata]             = &ich5_map_db,
-       [esb_sata]              = &ich5_map_db,
        [ich6_sata]             = &ich6_map_db,
        [ich6_sata_ahci]        = &ich6_map_db,
        [ich6m_sata_ahci]       = &ich6m_map_db,
@@ -497,17 +500,7 @@ static struct ata_port_info piix_port_info[] = {
                .port_ops       = &piix_sata_ops,
        },
 
-       /* i6300esb_sata: 6 */
-       {
-               .sht            = &piix_sht,
-               .flags          = PIIX_SATA_FLAGS,
-               .pio_mask       = 0x1f, /* pio0-4 */
-               .mwdma_mask     = 0x07, /* mwdma0-2 */
-               .udma_mask      = 0x7f, /* udma0-6 */
-               .port_ops       = &piix_sata_ops,
-       },
-
-       /* ich6_sata: 7 */
+       /* ich6_sata: 6 */
        {
                .sht            = &piix_sht,
                .flags          = PIIX_SATA_FLAGS | PIIX_FLAG_SCR,
@@ -517,7 +510,7 @@ static struct ata_port_info piix_port_info[] = {
                .port_ops       = &piix_sata_ops,
        },
 
-       /* ich6_sata_ahci: 8 */
+       /* ich6_sata_ahci: 7 */
        {
                .sht            = &piix_sht,
                .flags          = PIIX_SATA_FLAGS | PIIX_FLAG_SCR |
@@ -528,7 +521,7 @@ static struct ata_port_info piix_port_info[] = {
                .port_ops       = &piix_sata_ops,
        },
 
-       /* ich6m_sata_ahci: 9 */
+       /* ich6m_sata_ahci: 8 */
        {
                .sht            = &piix_sht,
                .flags          = PIIX_SATA_FLAGS | PIIX_FLAG_SCR |
@@ -539,7 +532,7 @@ static struct ata_port_info piix_port_info[] = {
                .port_ops       = &piix_sata_ops,
        },
 
-       /* ich8_sata_ahci: 10 */
+       /* ich8_sata_ahci: 9 */
        {
                .sht            = &piix_sht,
                .flags          = PIIX_SATA_FLAGS | PIIX_FLAG_SCR |
@@ -1046,7 +1039,6 @@ static void __devinit piix_init_sata_map(struct pci_dev *pdev,
                           "invalid MAP value %u\n", map_value);
 
        hpriv->map = map;
-       hpriv->map_db = map_db;
 }
 
 /**