diff options
author | Tejun Heo <htejun@gmail.com> | 2006-09-10 17:29:03 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-11 08:52:29 -0400 |
commit | 6708374178d225ef77571ed23b30e8a93c36add5 (patch) | |
tree | 1d07dcc9a3be36ab7015d783ac4c2bfa5879e2f3 /drivers/scsi | |
parent | 62f1d0e6de138b91d55fbd7d579c837ed62e9e31 (diff) |
[PATCH] ata_piix: add map 01b for ICH7M
Although the document says otherwise, some ich7m uses map 01b. This
patch adds separate map DB for ICH7M and adds map entry for 01b.
This was spotted on an ASUS laptop by Jonathan Dieter.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Jonathan Dieter <jdieter@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ata_piix.c | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index 2d20caf377f5..a9bb3cb7e89b 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
@@ -123,7 +123,8 @@ enum { | |||
123 | ich6_sata = 4, | 123 | ich6_sata = 4, |
124 | ich6_sata_ahci = 5, | 124 | ich6_sata_ahci = 5, |
125 | ich6m_sata_ahci = 6, | 125 | ich6m_sata_ahci = 6, |
126 | ich8_sata_ahci = 7, | 126 | ich7m_sata_ahci = 7, |
127 | ich8_sata_ahci = 8, | ||
127 | 128 | ||
128 | /* constants for mapping table */ | 129 | /* constants for mapping table */ |
129 | P0 = 0, /* port 0 */ | 130 | P0 = 0, /* port 0 */ |
@@ -188,7 +189,7 @@ static const struct pci_device_id piix_pci_tbl[] = { | |||
188 | /* 82801GB/GR/GH (ICH7, identical to ICH6) */ | 189 | /* 82801GB/GR/GH (ICH7, identical to ICH6) */ |
189 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 190 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
190 | /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ | 191 | /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ |
191 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci }, | 192 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7m_sata_ahci }, |
192 | /* Enterprise Southbridge 2 (where's the datasheet?) */ | 193 | /* Enterprise Southbridge 2 (where's the datasheet?) */ |
193 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 194 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
194 | /* SATA Controller 1 IDE (ICH8, no datasheet yet) */ | 195 | /* SATA Controller 1 IDE (ICH8, no datasheet yet) */ |
@@ -336,6 +337,24 @@ static const struct piix_map_db ich6m_map_db = { | |||
336 | }, | 337 | }, |
337 | }; | 338 | }; |
338 | 339 | ||
340 | static const struct piix_map_db ich7m_map_db = { | ||
341 | .mask = 0x3, | ||
342 | .port_enable = 0x5, | ||
343 | .present_shift = 4, | ||
344 | |||
345 | /* Map 01b isn't specified in the doc but some notebooks use | ||
346 | * it anyway. ATM, the only case spotted carries subsystem ID | ||
347 | * 1025:0107. This is the only difference from ich6m. | ||
348 | */ | ||
349 | .map = { | ||
350 | /* PM PS SM SS MAP */ | ||
351 | { P0, P2, RV, RV }, /* 00b */ | ||
352 | { IDE, IDE, P1, P3 }, /* 01b */ | ||
353 | { P0, P2, IDE, IDE }, /* 10b */ | ||
354 | { RV, RV, RV, RV }, | ||
355 | }, | ||
356 | }; | ||
357 | |||
339 | static const struct piix_map_db ich8_map_db = { | 358 | static const struct piix_map_db ich8_map_db = { |
340 | .mask = 0x3, | 359 | .mask = 0x3, |
341 | .port_enable = 0x3, | 360 | .port_enable = 0x3, |
@@ -355,6 +374,7 @@ static const struct piix_map_db *piix_map_db_table[] = { | |||
355 | [ich6_sata] = &ich6_map_db, | 374 | [ich6_sata] = &ich6_map_db, |
356 | [ich6_sata_ahci] = &ich6_map_db, | 375 | [ich6_sata_ahci] = &ich6_map_db, |
357 | [ich6m_sata_ahci] = &ich6m_map_db, | 376 | [ich6m_sata_ahci] = &ich6m_map_db, |
377 | [ich7m_sata_ahci] = &ich7m_map_db, | ||
358 | [ich8_sata_ahci] = &ich8_map_db, | 378 | [ich8_sata_ahci] = &ich8_map_db, |
359 | }; | 379 | }; |
360 | 380 | ||
@@ -444,6 +464,18 @@ static struct ata_port_info piix_port_info[] = { | |||
444 | .port_ops = &piix_sata_ops, | 464 | .port_ops = &piix_sata_ops, |
445 | }, | 465 | }, |
446 | 466 | ||
467 | /* ich7m_sata_ahci */ | ||
468 | { | ||
469 | .sht = &piix_sht, | ||
470 | .host_flags = ATA_FLAG_SATA | | ||
471 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | | ||
472 | PIIX_FLAG_AHCI, | ||
473 | .pio_mask = 0x1f, /* pio0-4 */ | ||
474 | .mwdma_mask = 0x07, /* mwdma0-2 */ | ||
475 | .udma_mask = 0x7f, /* udma0-6 */ | ||
476 | .port_ops = &piix_sata_ops, | ||
477 | }, | ||
478 | |||
447 | /* ich8_sata_ahci */ | 479 | /* ich8_sata_ahci */ |
448 | { | 480 | { |
449 | .sht = &piix_sht, | 481 | .sht = &piix_sht, |