diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-07-09 17:17:57 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-07-09 17:17:57 -0400 |
commit | 75b1d97535327d0428c6bffd9d5407e65546fd5d (patch) | |
tree | 3271a13a27ed2a7896b7018bc2fceac62eba1b2e /drivers/ide/ppc/pmac.c | |
parent | 15a4f943e729d8ba215ee551df6d7988ba14ac00 (diff) |
ide: convert ide_find_best_mode() users to use ide_max_dma_mode()
ide-timing.h:
* remove handling of DMA modes from ide_find_best_mode() and rename it to
ide_find_best_pio_mode()
* drop no longer needed "map" argument from ide_find_best_pio_mode()
and delete needless ->id check
* remove no longer needed XFER_SWDMA and XFER_UDMA* defines
au1xxx-ide.c:
* use ide_max_dma_mode() instead of ide_find_best_mode()
* remove needless CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA #ifdef
amd74xx.c:
* store UDMA masks in amd_ide_chip[] and while at it make "base" field
to be u8 instead of unsigned long
* convert the driver to use UDMA masks from amd_ide_chip[]
* use ide_max_dma_mode() and ide_find_best_pio_mode() instead
of ide_find_best_mode()
* delete stale comment from amd74xx_ide_dma_check()
* remove no longer needed AMD_UDMA* defines
via82cxxx.c:
* remove unused DISPLAY_VIA_TIMINGS define
* store UDMA masks in via_isa_bridges[] and while at it make "flags" field
to be u8 instead of u16
* convert the driver to use UDMA masks from via_isa_bridges[]
* use ide_max_dma_mode() and ide_find_best_pio_mode() instead
of ide_find_best_mode()
* remove no longer needed VIA_UDMA* defines
pmac.c:
* use ide_max_dma_mode() instead of ide_find_best_mode()
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Diffstat (limited to 'drivers/ide/ppc/pmac.c')
-rw-r--r-- | drivers/ide/ppc/pmac.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index f9bada093d19..5e3077409457 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -1821,28 +1821,11 @@ pmac_ide_dma_check(ide_drive_t *drive) | |||
1821 | enable = 0; | 1821 | enable = 0; |
1822 | 1822 | ||
1823 | if (enable) { | 1823 | if (enable) { |
1824 | short mode; | 1824 | u8 mode = ide_max_dma_mode(drive); |
1825 | 1825 | ||
1826 | map = XFER_MWDMA; | 1826 | if (mode >= XFER_UDMA_0) |
1827 | if (pmif->kind == controller_kl_ata4 | ||
1828 | || pmif->kind == controller_un_ata6 | ||
1829 | || pmif->kind == controller_k2_ata6 | ||
1830 | || pmif->kind == controller_sh_ata6) { | ||
1831 | map |= XFER_UDMA; | ||
1832 | if (pmif->cable_80) { | ||
1833 | map |= XFER_UDMA_66; | ||
1834 | if (pmif->kind == controller_un_ata6 || | ||
1835 | pmif->kind == controller_k2_ata6 || | ||
1836 | pmif->kind == controller_sh_ata6) | ||
1837 | map |= XFER_UDMA_100; | ||
1838 | if (pmif->kind == controller_sh_ata6) | ||
1839 | map |= XFER_UDMA_133; | ||
1840 | } | ||
1841 | } | ||
1842 | mode = ide_find_best_mode(drive, map); | ||
1843 | if (mode & XFER_UDMA) | ||
1844 | drive->using_dma = pmac_ide_udma_enable(drive, mode); | 1827 | drive->using_dma = pmac_ide_udma_enable(drive, mode); |
1845 | else if (mode & XFER_MWDMA) | 1828 | else if (mode >= XFER_MW_DMA_0) |
1846 | drive->using_dma = pmac_ide_mdma_enable(drive, mode); | 1829 | drive->using_dma = pmac_ide_mdma_enable(drive, mode); |
1847 | hwif->OUTB(0, IDE_CONTROL_REG); | 1830 | hwif->OUTB(0, IDE_CONTROL_REG); |
1848 | /* Apply settings to controller */ | 1831 | /* Apply settings to controller */ |