diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-13 10:13:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-13 10:13:27 -0700 |
commit | bcd11eaa222fce31d0b59cdbfdf9b8c47067f15a (patch) | |
tree | aac97cbc4508829740b4b5a186f3f9ed5a24c081 /drivers/ide/pci/cs5535.c | |
parent | c8c55bcb43d790d97790cfa319d80045a71fde39 (diff) | |
parent | 99149a485958ada512eafc34fe36a80cb63fa56c (diff) | |
download | kernel_samsung_smdk4412-bcd11eaa222fce31d0b59cdbfdf9b8c47067f15a.zip kernel_samsung_smdk4412-bcd11eaa222fce31d0b59cdbfdf9b8c47067f15a.tar.gz kernel_samsung_smdk4412-bcd11eaa222fce31d0b59cdbfdf9b8c47067f15a.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (27 commits)
alim15x3: remove redundant m5229_revision check
sc1200: fix ->dma_base equal zero handling
cs5520: fix ->dma_base equal zero handling
sgiioc4: add missing ->dma_base check
cs5535: add missing ->dma_base check
ide: remove CONFIG_IDEDMA_IVB config option
ide: change master/slave IDENTIFY order
ide: move ide_config_drive_speed() calls to upper layers (take 2)
pdc202xx_new: check ide_config_drive_speed() return value
cs5535: check ide_config_drive_speed() return value
amd74xx/via82cxxx: check ide_config_drive_speed() return value
au1xxx: fix au1xxx_set_pio_mode()
icside: use ide_tune_dma()
ide-pmac: fix PIO setup and enable autotune
ide-pmac: use ide_tune_dma() (take 2)
ide-pmac: remove pmac_ide_do_setfeature() (take 2)
ide-pmac: remove nIEN clearing from pmac_ide_do_setfeature()
ide-pmac: use __ide_wait_stat()
ide-pmac: remove extra good status wait from pmac_ide_do_setfeature()
ide: add __ide_wait_stat() helper
...
Diffstat (limited to 'drivers/ide/pci/cs5535.c')
-rw-r--r-- | drivers/ide/pci/cs5535.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c index 383b7ec..2578657 100644 --- a/drivers/ide/pci/cs5535.c +++ b/drivers/ide/pci/cs5535.c @@ -131,24 +131,21 @@ static void cs5535_set_speed(ide_drive_t *drive, const u8 speed) } } -/**** - * cs5535_set_drive - Configure the drive to the new speed - * @drive: Drive to set up - * @speed: desired speed +/** + * cs5535_set_dma_mode - set host controller for DMA mode + * @drive: drive + * @speed: DMA mode * - * cs5535_set_drive() configures the drive and the chipset to a - * new speed. It also can be called by upper layers. + * Programs the chipset for DMA mode. */ -static int cs5535_set_drive(ide_drive_t *drive, u8 speed) + +static void cs5535_set_dma_mode(ide_drive_t *drive, const u8 speed) { - ide_config_drive_speed(drive, speed); cs5535_set_speed(drive, speed); - - return 0; } /** - * cs5535_set_pio_mode - PIO setup + * cs5535_set_pio_mode - set host controller for PIO mode * @drive: drive * @pio: PIO mode number * @@ -157,7 +154,6 @@ static int cs5535_set_drive(ide_drive_t *drive, u8 speed) static void cs5535_set_pio_mode(ide_drive_t *drive, const u8 pio) { - ide_config_drive_speed(drive, XFER_PIO_0 + pio); cs5535_set_speed(drive, XFER_PIO_0 + pio); } @@ -194,12 +190,16 @@ static u8 __devinit cs5535_cable_detect(struct pci_dev *dev) */ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif) { - int i; - hwif->autodma = 0; hwif->set_pio_mode = &cs5535_set_pio_mode; - hwif->speedproc = &cs5535_set_drive; + hwif->set_dma_mode = &cs5535_set_dma_mode; + + hwif->drives[1].autotune = hwif->drives[0].autotune = 1; + + if (hwif->dma_base == 0) + return; + hwif->ide_dma_check = &cs5535_dma_check; hwif->atapi_dma = 1; @@ -211,11 +211,7 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif) if (!noautodma) hwif->autodma = 1; - /* just setting autotune and not worrying about bios timings */ - for (i = 0; i < 2; i++) { - hwif->drives[i].autotune = 1; - hwif->drives[i].autodma = hwif->autodma; - } + hwif->drives[1].autodma = hwif->drives[0].autodma = hwif->autodma; } static ide_pci_device_t cs5535_chipset __devinitdata = { @@ -223,7 +219,7 @@ static ide_pci_device_t cs5535_chipset __devinitdata = { .init_hwif = init_hwif_cs5535, .autodma = AUTODMA, .bootable = ON_BOARD, - .host_flags = IDE_HFLAG_SINGLE, + .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE, .pio_mask = ATA_PIO4, }; |