aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/hpt366.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 19:31:22 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 19:31:22 -0400
commit64fb98fc40738ae1a98bcea9ca3145b89fb71524 (patch)
tree24130f9c56b04638e91969d216db199652470a17 /drivers/ide/pci/hpt366.c
parent5f47c7eac65a45e33d7fe390effe75ec5c74f8bf (diff)
parent89636af25d75d8672aea05d258be357d0dc4bd70 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: (23 commits) ide: add support for SCSI ioctls to ide-floppy ide: remove stale changelog from setup-pci.c ide: remove stale changelog/comments/TODO from ide.c ide-cris: handle PIO auto-tuning in tune_cris_ide() ide: add PIO masks ide: remove ide_find_best_pio_mode() ide: drop "PIO data" argument from ide_get_best_pio_mode() ide: ide_find_best_pio_mode() fixes (take 2) ide: add ide_pio_cycle_time() helper (take 2) sc1200: remove stale Power Management code ide: ide_start_power_step() fix WRT disabling DMA serverworks: fix DMA serverworks: always tune PIO ide: add ide_pci_device_t.host_flags (take 2) ide: add ide_dev_has_iordy() helper (take 4) ide: make ide_get_best_pio_mode() print info if overriding PIO mode siimage: PIO mode setup fixes (take 2) atiixp: PIO mode setup fixes ide: Stop mapping ROMs IDE: Remove references to dead ETRAX-related variables. ...
Diffstat (limited to 'drivers/ide/pci/hpt366.c')
-rw-r--r--drivers/ide/pci/hpt366.c36
1 files changed, 14 insertions, 22 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index e9b07a97c340..2cd74c345a6c 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -652,7 +652,7 @@ static int hpt3xx_tune_chipset(ide_drive_t *drive, u8 speed)
652 652
653static void hpt3xx_tune_drive(ide_drive_t *drive, u8 pio) 653static void hpt3xx_tune_drive(ide_drive_t *drive, u8 pio)
654{ 654{
655 pio = ide_get_best_pio_mode(drive, pio, 4, NULL); 655 pio = ide_get_best_pio_mode(drive, pio, 4);
656 (void) hpt3xx_tune_chipset (drive, XFER_PIO_0 + pio); 656 (void) hpt3xx_tune_chipset (drive, XFER_PIO_0 + pio);
657} 657}
658 658
@@ -994,14 +994,6 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
994 */ 994 */
995 *info = *(struct hpt_info *)pci_get_drvdata(dev); 995 *info = *(struct hpt_info *)pci_get_drvdata(dev);
996 996
997 /*
998 * FIXME: Not portable. Also, why do we enable the ROM in the first place?
999 * We don't seem to be using it.
1000 */
1001 if (dev->resource[PCI_ROM_RESOURCE].start)
1002 pci_write_config_dword(dev, PCI_ROM_ADDRESS,
1003 dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
1004
1005 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, (L1_CACHE_BYTES / 4)); 997 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, (L1_CACHE_BYTES / 4));
1006 pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x78); 998 pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x78);
1007 pci_write_config_byte(dev, PCI_MIN_GNT, 0x08); 999 pci_write_config_byte(dev, PCI_MIN_GNT, 0x08);
@@ -1491,7 +1483,7 @@ static int __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d)
1491 * to both functions -- really stupid design decision... :-( 1483 * to both functions -- really stupid design decision... :-(
1492 * Bit 4 is for the primary channel, bit 5 for the secondary. 1484 * Bit 4 is for the primary channel, bit 5 for the secondary.
1493 */ 1485 */
1494 d->channels = 1; 1486 d->host_flags |= IDE_HFLAG_SINGLE;
1495 d->enablebits[0].mask = d->enablebits[0].val = 0x10; 1487 d->enablebits[0].mask = d->enablebits[0].val = 0x10;
1496 1488
1497 d->udma_mask = HPT366_ALLOW_ATA66_3 ? 1489 d->udma_mask = HPT366_ALLOW_ATA66_3 ?
@@ -1554,71 +1546,71 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
1554 .init_chipset = init_chipset_hpt366, 1546 .init_chipset = init_chipset_hpt366,
1555 .init_hwif = init_hwif_hpt366, 1547 .init_hwif = init_hwif_hpt366,
1556 .init_dma = init_dma_hpt366, 1548 .init_dma = init_dma_hpt366,
1557 .channels = 2,
1558 .autodma = AUTODMA, 1549 .autodma = AUTODMA,
1559 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1550 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1560 .bootable = OFF_BOARD, 1551 .bootable = OFF_BOARD,
1561 .extra = 240 1552 .extra = 240,
1553 .pio_mask = ATA_PIO4,
1562 },{ /* 1 */ 1554 },{ /* 1 */
1563 .name = "HPT372A", 1555 .name = "HPT372A",
1564 .init_setup = init_setup_hpt372a, 1556 .init_setup = init_setup_hpt372a,
1565 .init_chipset = init_chipset_hpt366, 1557 .init_chipset = init_chipset_hpt366,
1566 .init_hwif = init_hwif_hpt366, 1558 .init_hwif = init_hwif_hpt366,
1567 .init_dma = init_dma_hpt366, 1559 .init_dma = init_dma_hpt366,
1568 .channels = 2,
1569 .autodma = AUTODMA, 1560 .autodma = AUTODMA,
1570 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1561 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1571 .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1562 .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f,
1572 .bootable = OFF_BOARD, 1563 .bootable = OFF_BOARD,
1573 .extra = 240 1564 .extra = 240,
1565 .pio_mask = ATA_PIO4,
1574 },{ /* 2 */ 1566 },{ /* 2 */
1575 .name = "HPT302", 1567 .name = "HPT302",
1576 .init_setup = init_setup_hpt302, 1568 .init_setup = init_setup_hpt302,
1577 .init_chipset = init_chipset_hpt366, 1569 .init_chipset = init_chipset_hpt366,
1578 .init_hwif = init_hwif_hpt366, 1570 .init_hwif = init_hwif_hpt366,
1579 .init_dma = init_dma_hpt366, 1571 .init_dma = init_dma_hpt366,
1580 .channels = 2,
1581 .autodma = AUTODMA, 1572 .autodma = AUTODMA,
1582 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1573 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1583 .udma_mask = HPT302_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1574 .udma_mask = HPT302_ALLOW_ATA133_6 ? 0x7f : 0x3f,
1584 .bootable = OFF_BOARD, 1575 .bootable = OFF_BOARD,
1585 .extra = 240 1576 .extra = 240,
1577 .pio_mask = ATA_PIO4,
1586 },{ /* 3 */ 1578 },{ /* 3 */
1587 .name = "HPT371", 1579 .name = "HPT371",
1588 .init_setup = init_setup_hpt371, 1580 .init_setup = init_setup_hpt371,
1589 .init_chipset = init_chipset_hpt366, 1581 .init_chipset = init_chipset_hpt366,
1590 .init_hwif = init_hwif_hpt366, 1582 .init_hwif = init_hwif_hpt366,
1591 .init_dma = init_dma_hpt366, 1583 .init_dma = init_dma_hpt366,
1592 .channels = 2,
1593 .autodma = AUTODMA, 1584 .autodma = AUTODMA,
1594 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1585 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1595 .udma_mask = HPT371_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1586 .udma_mask = HPT371_ALLOW_ATA133_6 ? 0x7f : 0x3f,
1596 .bootable = OFF_BOARD, 1587 .bootable = OFF_BOARD,
1597 .extra = 240 1588 .extra = 240,
1589 .pio_mask = ATA_PIO4,
1598 },{ /* 4 */ 1590 },{ /* 4 */
1599 .name = "HPT374", 1591 .name = "HPT374",
1600 .init_setup = init_setup_hpt374, 1592 .init_setup = init_setup_hpt374,
1601 .init_chipset = init_chipset_hpt366, 1593 .init_chipset = init_chipset_hpt366,
1602 .init_hwif = init_hwif_hpt366, 1594 .init_hwif = init_hwif_hpt366,
1603 .init_dma = init_dma_hpt366, 1595 .init_dma = init_dma_hpt366,
1604 .channels = 2, /* 4 */
1605 .autodma = AUTODMA, 1596 .autodma = AUTODMA,
1606 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1597 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1607 .udma_mask = 0x3f, 1598 .udma_mask = 0x3f,
1608 .bootable = OFF_BOARD, 1599 .bootable = OFF_BOARD,
1609 .extra = 240 1600 .extra = 240,
1601 .pio_mask = ATA_PIO4,
1610 },{ /* 5 */ 1602 },{ /* 5 */
1611 .name = "HPT372N", 1603 .name = "HPT372N",
1612 .init_setup = init_setup_hpt372n, 1604 .init_setup = init_setup_hpt372n,
1613 .init_chipset = init_chipset_hpt366, 1605 .init_chipset = init_chipset_hpt366,
1614 .init_hwif = init_hwif_hpt366, 1606 .init_hwif = init_hwif_hpt366,
1615 .init_dma = init_dma_hpt366, 1607 .init_dma = init_dma_hpt366,
1616 .channels = 2, /* 4 */
1617 .autodma = AUTODMA, 1608 .autodma = AUTODMA,
1618 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1609 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1619 .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f, 1610 .udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f,
1620 .bootable = OFF_BOARD, 1611 .bootable = OFF_BOARD,
1621 .extra = 240 1612 .extra = 240,
1613 .pio_mask = ATA_PIO4,
1622 } 1614 }
1623}; 1615};
1624 1616