diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-19 16:01:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-19 16:01:30 -0500 |
commit | dd397a6d1ae125686d97a20f983778c331093206 (patch) | |
tree | 2491fcd5d0c50ff72de2668439f12de55928cae8 /drivers/ide/cris/ide-cris.c | |
parent | 976fd0e29cb1647bf59f939f81a22eba55c2bf0c (diff) | |
parent | ccf352894ceef79d40d015e1deee4c46c3aa42ed (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: (30 commits)
ide: make ide_hwif_t.ide_dma_host_on void (v2)
ide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void (v2)
ide: add ide_set_dma() helper (v2)
sgiioc4: fix sgiioc4_ide_dma_check() to enable/disable DMA properly
ide: disable DMA in ->ide_dma_check for "no IORDY" case (v2)
ide: convert ide_hwif_t.mmio into flag (v2)
ide: use PIO/MMIO operations directly where possible (v2)
ide: add ide_use_fast_pio() helper (v3)
ide: unexport ide_set_xfer_rate() (v2)
ide: remove ide_drive_t.usage
ide: remove ide_pci_device_t tables with only one entry
ide: remove write-only ide_hwif_t.no_dsc flag
ide: remove write-only ide_pio_data_t.blacklisted
sis5513: sis5513_config_xfer_rate() cleanup
piix: cleanup
svwks: small cleanup
cs5530: small cleanup
hpt366: remove redundant check from init_dma_hpt366()
trm290: remove redundant CONFIG_BLK_DEV_IDEDMA #ifdef-s
au1xxx-ide: remove dead code
...
Diffstat (limited to 'drivers/ide/cris/ide-cris.c')
-rw-r--r-- | drivers/ide/cris/ide-cris.c | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c index 5797e0b5a132..6b2d152351b3 100644 --- a/drivers/ide/cris/ide-cris.c +++ b/drivers/ide/cris/ide-cris.c | |||
@@ -682,9 +682,12 @@ static void cris_ide_input_data (ide_drive_t *drive, void *, unsigned int); | |||
682 | static void cris_ide_output_data (ide_drive_t *drive, void *, unsigned int); | 682 | static void cris_ide_output_data (ide_drive_t *drive, void *, unsigned int); |
683 | static void cris_atapi_input_bytes(ide_drive_t *drive, void *, unsigned int); | 683 | static void cris_atapi_input_bytes(ide_drive_t *drive, void *, unsigned int); |
684 | static void cris_atapi_output_bytes(ide_drive_t *drive, void *, unsigned int); | 684 | static void cris_atapi_output_bytes(ide_drive_t *drive, void *, unsigned int); |
685 | static int cris_dma_off (ide_drive_t *drive); | ||
686 | static int cris_dma_on (ide_drive_t *drive); | 685 | static int cris_dma_on (ide_drive_t *drive); |
687 | 686 | ||
687 | static void cris_dma_off(ide_drive_t *drive) | ||
688 | { | ||
689 | } | ||
690 | |||
688 | static void tune_cris_ide(ide_drive_t *drive, u8 pio) | 691 | static void tune_cris_ide(ide_drive_t *drive, u8 pio) |
689 | { | 692 | { |
690 | int setup, strobe, hold; | 693 | int setup, strobe, hold; |
@@ -795,7 +798,7 @@ init_e100_ide (void) | |||
795 | 0, 0, cris_ide_ack_intr, | 798 | 0, 0, cris_ide_ack_intr, |
796 | ide_default_irq(0)); | 799 | ide_default_irq(0)); |
797 | ide_register_hw(&hw, &hwif); | 800 | ide_register_hw(&hw, &hwif); |
798 | hwif->mmio = 2; | 801 | hwif->mmio = 1; |
799 | hwif->chipset = ide_etrax100; | 802 | hwif->chipset = ide_etrax100; |
800 | hwif->tuneproc = &tune_cris_ide; | 803 | hwif->tuneproc = &tune_cris_ide; |
801 | hwif->speedproc = &speed_cris_ide; | 804 | hwif->speedproc = &speed_cris_ide; |
@@ -814,13 +817,16 @@ init_e100_ide (void) | |||
814 | hwif->OUTBSYNC = &cris_ide_outbsync; | 817 | hwif->OUTBSYNC = &cris_ide_outbsync; |
815 | hwif->INB = &cris_ide_inb; | 818 | hwif->INB = &cris_ide_inb; |
816 | hwif->INW = &cris_ide_inw; | 819 | hwif->INW = &cris_ide_inw; |
817 | hwif->ide_dma_host_off = &cris_dma_off; | 820 | hwif->dma_host_off = &cris_dma_off; |
818 | hwif->ide_dma_host_on = &cris_dma_on; | 821 | hwif->dma_host_on = &cris_dma_on; |
819 | hwif->ide_dma_off_quietly = &cris_dma_off; | 822 | hwif->dma_off_quietly = &cris_dma_off; |
820 | hwif->udma_four = 0; | 823 | hwif->udma_four = 0; |
821 | hwif->ultra_mask = cris_ultra_mask; | 824 | hwif->ultra_mask = cris_ultra_mask; |
822 | hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */ | 825 | hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */ |
823 | hwif->swdma_mask = 0x07; /* Singleword DMA 0-2 */ | 826 | hwif->swdma_mask = 0x07; /* Singleword DMA 0-2 */ |
827 | hwif->autodma = 1; | ||
828 | hwif->drives[0].autodma = 1; | ||
829 | hwif->drives[1].autodma = 1; | ||
824 | } | 830 | } |
825 | 831 | ||
826 | /* Reset pulse */ | 832 | /* Reset pulse */ |
@@ -835,11 +841,6 @@ init_e100_ide (void) | |||
835 | cris_ide_set_speed(TYPE_UDMA, ATA_UDMA2_CYC, ATA_UDMA2_DVS, 0); | 841 | cris_ide_set_speed(TYPE_UDMA, ATA_UDMA2_CYC, ATA_UDMA2_DVS, 0); |
836 | } | 842 | } |
837 | 843 | ||
838 | static int cris_dma_off (ide_drive_t *drive) | ||
839 | { | ||
840 | return 0; | ||
841 | } | ||
842 | |||
843 | static int cris_dma_on (ide_drive_t *drive) | 844 | static int cris_dma_on (ide_drive_t *drive) |
844 | { | 845 | { |
845 | return 0; | 846 | return 0; |
@@ -1045,17 +1046,10 @@ static ide_startstop_t cris_dma_intr (ide_drive_t *drive) | |||
1045 | 1046 | ||
1046 | static int cris_dma_check(ide_drive_t *drive) | 1047 | static int cris_dma_check(ide_drive_t *drive) |
1047 | { | 1048 | { |
1048 | ide_hwif_t *hwif = drive->hwif; | 1049 | if (ide_use_dma(drive) && cris_config_drive_for_dma(drive)) |
1049 | struct hd_driveid* id = drive->id; | 1050 | return 0; |
1050 | |||
1051 | if (id && (id->capability & 1)) { | ||
1052 | if (ide_use_dma(drive)) { | ||
1053 | if (cris_config_drive_for_dma(drive)) | ||
1054 | return hwif->ide_dma_on(drive); | ||
1055 | } | ||
1056 | } | ||
1057 | 1051 | ||
1058 | return hwif->ide_dma_off_quietly(drive); | 1052 | return -1; |
1059 | } | 1053 | } |
1060 | 1054 | ||
1061 | static int cris_dma_end(ide_drive_t *drive) | 1055 | static int cris_dma_end(ide_drive_t *drive) |