diff options
Diffstat (limited to 'drivers/ide/pci/alim15x3.c')
-rw-r--r-- | drivers/ide/pci/alim15x3.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 31d4e50647d5..8ee2b48d105d 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/alim15x3.c Version 0.26 Jul 14 2007 | 2 | * linux/drivers/ide/pci/alim15x3.c Version 0.27 Aug 27 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 1998-2000 Michel Aubry, Maintainer | 4 | * Copyright (C) 1998-2000 Michel Aubry, Maintainer |
5 | * Copyright (C) 1998-2000 Andrzej Krzysztofowicz, Maintainer | 5 | * Copyright (C) 1998-2000 Andrzej Krzysztofowicz, Maintainer |
@@ -665,34 +665,29 @@ static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif) | |||
665 | hwif->udma_filter = &ali_udma_filter; | 665 | hwif->udma_filter = &ali_udma_filter; |
666 | 666 | ||
667 | /* don't use LBA48 DMA on ALi devices before rev 0xC5 */ | 667 | /* don't use LBA48 DMA on ALi devices before rev 0xC5 */ |
668 | hwif->no_lba48_dma = (m5229_revision <= 0xC4) ? 1 : 0; | 668 | if (m5229_revision <= 0xC4) |
669 | hwif->host_flags |= IDE_HFLAG_NO_LBA48_DMA; | ||
669 | 670 | ||
670 | if (!hwif->dma_base) { | 671 | if (hwif->dma_base == 0) |
671 | hwif->drives[0].autotune = 1; | ||
672 | hwif->drives[1].autotune = 1; | ||
673 | return; | 672 | return; |
674 | } | ||
675 | 673 | ||
676 | /* | 674 | /* |
677 | * check in ->init_dma guarantees m5229_revision >= 0x20 here | 675 | * check in ->init_dma guarantees m5229_revision >= 0x20 here |
678 | */ | 676 | */ |
679 | 677 | ||
680 | if (m5229_revision > 0x20) | 678 | if (m5229_revision == 0x20) |
681 | hwif->atapi_dma = 1; | 679 | hwif->host_flags |= IDE_HFLAG_NO_ATAPI_DMA; |
682 | 680 | ||
683 | if (m5229_revision <= 0x20) | 681 | if (m5229_revision <= 0x20) |
684 | hwif->ultra_mask = 0x00; /* no udma */ | 682 | hwif->ultra_mask = 0x00; /* no udma */ |
685 | else if (m5229_revision < 0xC2) | 683 | else if (m5229_revision < 0xC2) |
686 | hwif->ultra_mask = 0x07; /* udma0-2 */ | 684 | hwif->ultra_mask = ATA_UDMA2; |
687 | else if (m5229_revision == 0xC2 || m5229_revision == 0xC3) | 685 | else if (m5229_revision == 0xC2 || m5229_revision == 0xC3) |
688 | hwif->ultra_mask = 0x1f; /* udma0-4 */ | 686 | hwif->ultra_mask = ATA_UDMA4; |
689 | else if (m5229_revision == 0xC4) | 687 | else if (m5229_revision == 0xC4) |
690 | hwif->ultra_mask = 0x3f; /* udma0-5 */ | 688 | hwif->ultra_mask = ATA_UDMA5; |
691 | else | 689 | else |
692 | hwif->ultra_mask = 0x7f; /* udma0-6 */ | 690 | hwif->ultra_mask = ATA_UDMA6; |
693 | |||
694 | hwif->mwdma_mask = 0x07; | ||
695 | hwif->swdma_mask = 0x07; | ||
696 | 691 | ||
697 | hwif->dma_setup = &ali15x3_dma_setup; | 692 | hwif->dma_setup = &ali15x3_dma_setup; |
698 | 693 | ||
@@ -776,9 +771,10 @@ static ide_pci_device_t ali15x3_chipset __devinitdata = { | |||
776 | .init_chipset = init_chipset_ali15x3, | 771 | .init_chipset = init_chipset_ali15x3, |
777 | .init_hwif = init_hwif_ali15x3, | 772 | .init_hwif = init_hwif_ali15x3, |
778 | .init_dma = init_dma_ali15x3, | 773 | .init_dma = init_dma_ali15x3, |
779 | .autodma = AUTODMA, | 774 | .host_flags = IDE_HFLAG_BOOTABLE, |
780 | .bootable = ON_BOARD, | ||
781 | .pio_mask = ATA_PIO5, | 775 | .pio_mask = ATA_PIO5, |
776 | .swdma_mask = ATA_SWDMA2, | ||
777 | .mwdma_mask = ATA_MWDMA2, | ||
782 | }; | 778 | }; |
783 | 779 | ||
784 | /** | 780 | /** |