diff options
Diffstat (limited to 'drivers/ide/ppc')
-rw-r--r-- | drivers/ide/ppc/pmac.c | 42 |
1 files changed, 12 insertions, 30 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 4559e29446e9..3dce80092fff 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -828,38 +828,20 @@ static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
828 | tl[0] = *timings; | 828 | tl[0] = *timings; |
829 | tl[1] = *timings2; | 829 | tl[1] = *timings2; |
830 | 830 | ||
831 | switch(speed) { | ||
832 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | 831 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC |
833 | case XFER_UDMA_6: | 832 | if (speed >= XFER_UDMA_0) { |
834 | case XFER_UDMA_5: | 833 | if (pmif->kind == controller_kl_ata4) |
835 | case XFER_UDMA_4: | 834 | ret = set_timings_udma_ata4(&tl[0], speed); |
836 | case XFER_UDMA_3: | 835 | else if (pmif->kind == controller_un_ata6 |
837 | case XFER_UDMA_2: | 836 | || pmif->kind == controller_k2_ata6) |
838 | case XFER_UDMA_1: | 837 | ret = set_timings_udma_ata6(&tl[0], &tl[1], speed); |
839 | case XFER_UDMA_0: | 838 | else if (pmif->kind == controller_sh_ata6) |
840 | if (pmif->kind == controller_kl_ata4) | 839 | ret = set_timings_udma_shasta(&tl[0], &tl[1], speed); |
841 | ret = set_timings_udma_ata4(&tl[0], speed); | 840 | else |
842 | else if (pmif->kind == controller_un_ata6 | 841 | ret = -1; |
843 | || pmif->kind == controller_k2_ata6) | 842 | } else |
844 | ret = set_timings_udma_ata6(&tl[0], &tl[1], speed); | 843 | set_timings_mdma(drive, pmif->kind, &tl[0], &tl[1], speed); |
845 | else if (pmif->kind == controller_sh_ata6) | ||
846 | ret = set_timings_udma_shasta(&tl[0], &tl[1], speed); | ||
847 | else | ||
848 | ret = 1; | ||
849 | break; | ||
850 | case XFER_MW_DMA_2: | ||
851 | case XFER_MW_DMA_1: | ||
852 | case XFER_MW_DMA_0: | ||
853 | set_timings_mdma(drive, pmif->kind, &tl[0], &tl[1], speed); | ||
854 | break; | ||
855 | case XFER_SW_DMA_2: | ||
856 | case XFER_SW_DMA_1: | ||
857 | case XFER_SW_DMA_0: | ||
858 | return; | ||
859 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | 844 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ |
860 | default: | ||
861 | ret = 1; | ||
862 | } | ||
863 | if (ret) | 845 | if (ret) |
864 | return; | 846 | return; |
865 | 847 | ||