aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ata_piix.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-11-10 04:08:10 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-01 22:45:55 -0500
commit5e56a37c3706498b25049bb556928c461875250f (patch)
tree977f0a4b73d2f60602b239cd7ca7ffeb302209bd /drivers/ata/ata_piix.c
parent228c1590be39872022006ab81fda112a4f35ce47 (diff)
[PATCH] ata_piix: strip now unneded MAP related stuff
Now that PCS isn't used for device detection anymore... * esb_sata is identical to ich5_sata * no reason to know present_shift * no reason to store map_db in host private area The MAP table itself is left because it can be used for SCR access. Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/ata_piix.c')
-rw-r--r--drivers/ata/ata_piix.c39
1 files changed, 10 insertions, 29 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 7bf238638e8e..788a269206e6 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -125,11 +125,10 @@ enum {
125 ich_pata_100 = 3, /* ICH up to UDMA 100 */ 125 ich_pata_100 = 3, /* ICH up to UDMA 100 */
126 ich_pata_133 = 4, /* ICH up to UDMA 133 */ 126 ich_pata_133 = 4, /* ICH up to UDMA 133 */
127 ich5_sata = 5, 127 ich5_sata = 5,
128 esb_sata = 6, 128 ich6_sata = 6,
129 ich6_sata = 7, 129 ich6_sata_ahci = 7,
130 ich6_sata_ahci = 8, 130 ich6m_sata_ahci = 8,
131 ich6m_sata_ahci = 9, 131 ich8_sata_ahci = 9,
132 ich8_sata_ahci = 10,
133 132
134 /* constants for mapping table */ 133 /* constants for mapping table */
135 P0 = 0, /* port 0 */ 134 P0 = 0, /* port 0 */
@@ -146,13 +145,11 @@ enum {
146struct piix_map_db { 145struct piix_map_db {
147 const u32 mask; 146 const u32 mask;
148 const u16 port_enable; 147 const u16 port_enable;
149 const int present_shift;
150 const int map[][4]; 148 const int map[][4];
151}; 149};
152 150
153struct piix_host_priv { 151struct piix_host_priv {
154 const int *map; 152 const int *map;
155 const struct piix_map_db *map_db;
156}; 153};
157 154
158static int piix_init_one (struct pci_dev *pdev, 155static int piix_init_one (struct pci_dev *pdev,
@@ -217,9 +214,9 @@ static const struct pci_device_id piix_pci_tbl[] = {
217 /* 82801EB (ICH5) */ 214 /* 82801EB (ICH5) */
218 { 0x8086, 0x24df, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata }, 215 { 0x8086, 0x24df, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata },
219 /* 6300ESB (ICH5 variant with broken PCS present bits) */ 216 /* 6300ESB (ICH5 variant with broken PCS present bits) */
220 { 0x8086, 0x25a3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, esb_sata }, 217 { 0x8086, 0x25a3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata },
221 /* 6300ESB pretending RAID */ 218 /* 6300ESB pretending RAID */
222 { 0x8086, 0x25b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, esb_sata }, 219 { 0x8086, 0x25b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata },
223 /* 82801FB/FW (ICH6/ICH6W) */ 220 /* 82801FB/FW (ICH6/ICH6W) */
224 { 0x8086, 0x2651, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata }, 221 { 0x8086, 0x2651, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata },
225 /* 82801FR/FRW (ICH6R/ICH6RW) */ 222 /* 82801FR/FRW (ICH6R/ICH6RW) */
@@ -370,7 +367,6 @@ static const struct ata_port_operations piix_sata_ops = {
370static const struct piix_map_db ich5_map_db = { 367static const struct piix_map_db ich5_map_db = {
371 .mask = 0x7, 368 .mask = 0x7,
372 .port_enable = 0x3, 369 .port_enable = 0x3,
373 .present_shift = 4,
374 .map = { 370 .map = {
375 /* PM PS SM SS MAP */ 371 /* PM PS SM SS MAP */
376 { P0, NA, P1, NA }, /* 000b */ 372 { P0, NA, P1, NA }, /* 000b */
@@ -387,7 +383,6 @@ static const struct piix_map_db ich5_map_db = {
387static const struct piix_map_db ich6_map_db = { 383static const struct piix_map_db ich6_map_db = {
388 .mask = 0x3, 384 .mask = 0x3,
389 .port_enable = 0xf, 385 .port_enable = 0xf,
390 .present_shift = 4,
391 .map = { 386 .map = {
392 /* PM PS SM SS MAP */ 387 /* PM PS SM SS MAP */
393 { P0, P2, P1, P3 }, /* 00b */ 388 { P0, P2, P1, P3 }, /* 00b */
@@ -400,7 +395,6 @@ static const struct piix_map_db ich6_map_db = {
400static const struct piix_map_db ich6m_map_db = { 395static const struct piix_map_db ich6m_map_db = {
401 .mask = 0x3, 396 .mask = 0x3,
402 .port_enable = 0x5, 397 .port_enable = 0x5,
403 .present_shift = 4,
404 398
405 /* Map 01b isn't specified in the doc but some notebooks use 399 /* Map 01b isn't specified in the doc but some notebooks use
406 * it anyway. MAP 01b have been spotted on both ICH6M and 400 * it anyway. MAP 01b have been spotted on both ICH6M and
@@ -418,7 +412,6 @@ static const struct piix_map_db ich6m_map_db = {
418static const struct piix_map_db ich8_map_db = { 412static const struct piix_map_db ich8_map_db = {
419 .mask = 0x3, 413 .mask = 0x3,
420 .port_enable = 0x3, 414 .port_enable = 0x3,
421 .present_shift = 8,
422 .map = { 415 .map = {
423 /* PM PS SM SS MAP */ 416 /* PM PS SM SS MAP */
424 { P0, P2, P1, P3 }, /* 00b (hardwired when in AHCI) */ 417 { P0, P2, P1, P3 }, /* 00b (hardwired when in AHCI) */
@@ -430,7 +423,6 @@ static const struct piix_map_db ich8_map_db = {
430 423
431static const struct piix_map_db *piix_map_db_table[] = { 424static const struct piix_map_db *piix_map_db_table[] = {
432 [ich5_sata] = &ich5_map_db, 425 [ich5_sata] = &ich5_map_db,
433 [esb_sata] = &ich5_map_db,
434 [ich6_sata] = &ich6_map_db, 426 [ich6_sata] = &ich6_map_db,
435 [ich6_sata_ahci] = &ich6_map_db, 427 [ich6_sata_ahci] = &ich6_map_db,
436 [ich6m_sata_ahci] = &ich6m_map_db, 428 [ich6m_sata_ahci] = &ich6m_map_db,
@@ -497,17 +489,7 @@ static struct ata_port_info piix_port_info[] = {
497 .port_ops = &piix_sata_ops, 489 .port_ops = &piix_sata_ops,
498 }, 490 },
499 491
500 /* i6300esb_sata: 6 */ 492 /* ich6_sata: 6 */
501 {
502 .sht = &piix_sht,
503 .flags = PIIX_SATA_FLAGS,
504 .pio_mask = 0x1f, /* pio0-4 */
505 .mwdma_mask = 0x07, /* mwdma0-2 */
506 .udma_mask = 0x7f, /* udma0-6 */
507 .port_ops = &piix_sata_ops,
508 },
509
510 /* ich6_sata: 7 */
511 { 493 {
512 .sht = &piix_sht, 494 .sht = &piix_sht,
513 .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR, 495 .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR,
@@ -517,7 +499,7 @@ static struct ata_port_info piix_port_info[] = {
517 .port_ops = &piix_sata_ops, 499 .port_ops = &piix_sata_ops,
518 }, 500 },
519 501
520 /* ich6_sata_ahci: 8 */ 502 /* ich6_sata_ahci: 7 */
521 { 503 {
522 .sht = &piix_sht, 504 .sht = &piix_sht,
523 .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR | 505 .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR |
@@ -528,7 +510,7 @@ static struct ata_port_info piix_port_info[] = {
528 .port_ops = &piix_sata_ops, 510 .port_ops = &piix_sata_ops,
529 }, 511 },
530 512
531 /* ich6m_sata_ahci: 9 */ 513 /* ich6m_sata_ahci: 8 */
532 { 514 {
533 .sht = &piix_sht, 515 .sht = &piix_sht,
534 .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR | 516 .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR |
@@ -539,7 +521,7 @@ static struct ata_port_info piix_port_info[] = {
539 .port_ops = &piix_sata_ops, 521 .port_ops = &piix_sata_ops,
540 }, 522 },
541 523
542 /* ich8_sata_ahci: 10 */ 524 /* ich8_sata_ahci: 9 */
543 { 525 {
544 .sht = &piix_sht, 526 .sht = &piix_sht,
545 .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR | 527 .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR |
@@ -1046,7 +1028,6 @@ static void __devinit piix_init_sata_map(struct pci_dev *pdev,
1046 "invalid MAP value %u\n", map_value); 1028 "invalid MAP value %u\n", map_value);
1047 1029
1048 hpriv->map = map; 1030 hpriv->map = map;
1049 hpriv->map_db = map_db;
1050} 1031}
1051 1032
1052/** 1033/**