summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-dma-sff.c
Commit message (Collapse)AuthorAgeFilesLines
* ide/ata: Add export.h for EXPORT_SYMBOL/THIS_MODULE where neededPaul Gortmaker2011-10-311-0/+1
| | | | | | | | They were getting this implicitly by an include of module.h from device.h -- but we are going to clean that up and break that include chain, so include export.h explicitly now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* ide: remove wmb() from ide-dma-sff.c and scc_pata.cGrant Grundler2009-04-081-6/+3
| | | | | | | | | | | This patch: o replaces "mask" variable in ide_dma_end() with #define. o removes use of wmb() in ide-dma-sff.c and scc_pata.c. o is not tested - I don't have (or want) the HW. Signed-off-by: Grant Grundler <grundler@google.com> Cc: KOBAYASHI Yoshitake <yoshitake.kobayashi@toshiba.co.jp> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: identify data word 53 bit 1 doesn't cover words 62 and 63 (take 3)Sergei Shtylyov2009-03-311-4/+3
| | | | | | | | | | | | | The IDE code assumed for years that the bit 1 of the identify data word 53 also covers the validity of the SW/MW DMA information in words 62 and 63, but it has always covered only words 64 thru 70, with words 62 and 63 being defined in the original ATA spec, not in ATA-2... This fix however should only concern *very* old hard disks and rather old CF cards... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: set/clear drive->waiting_for_dma flag in the core codeBartlomiej Zolnierkiewicz2009-03-311-3/+0
| | | | | | | | | | Set/clear drive->waiting_for_dma flag in the core code instead of in ->dma_setup and ->dma_end methods. There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move ide_map_sg() call out of ->dma_setup method (take 2)Bartlomiej Zolnierkiewicz2009-03-311-2/+0
| | | | | | | | | | | | | | | Move ide_map_sg() call from ->dma_setup implementations and ide_destroy_dmatable() one from *_build_dmatable() to ide_dma_prepare(). There should be no functional changes caused by this patch. Sergei: Removed 'use_pio_instead' labels and replaced 'goto' with 'return 0' -- that required no changes to the follow-up patches... Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: destroy DMA mappings after ending DMA (v2)Bartlomiej Zolnierkiewicz2009-03-311-2/+0
| | | | | | | | | | | | | | | | | | | | | | Move ide_destroy_dmatable() call out from ->dma_end method to {ide_pc,cdrom_newpc,ide_dma}_intr(), ide_dma_timeout_retry() and sgiioc4_resetproc(). This causes minor/safe behavior changes w.r.t.: * cmd64x.c::cmd64{8,x}_dma_end() * cs5536.c::cs5536_dma_end() * icside.c::icside_dma_end() * it821x.c::it821x_dma_end() * scc_pata.c::__scc_dma_end() * sl82c105.c::sl82c105_dma_end() * tx4939ide.c::tx4939ide_dma_end() v2: * Fix build for CONFIG_BLK_DEV_IDEDMA=n (reported by Randy Dunlap). Cc: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ->dma_clear method and remove ->dma_timeout oneBartlomiej Zolnierkiewicz2009-03-311-2/+1
| | | | | | | | | | | | | | | | | | All custom ->dma_timeout implementations call the generic one thus it is possible to have only an optional method for resetting DMA engine instead: * Add ->dma_clear method and convert hpt366, pdc202xx_old and sl82c105 host drivers to use it. * Always use ide_dma_timeout() in ide_dma_timeout_retry() and remove ->dma_timeout method. * Make ide_dma_timeout() static. There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ->dma_timer_expiry method and remove ->dma_exec_cmd one (v2)Bartlomiej Zolnierkiewicz2009-03-271-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rename dma_timer_expiry() to ide_dma_sff_timer_expiry() and export it. * Add ->dma_timer_expiry method and use it to set hwif->expiry for ATA_PROT_DMA protocol in do_rw_taskfile(). * Initialize ->dma_timer_expiry to ide_dma_sff_timer_expiry() for SFF hosts. * Move setting hwif->expiry from ide_execute_command() to its users and drop 'expiry' argument. * Use ide_execute_command() instead of ->dma_exec_cmd in do_rw_taskfile(). * Remove ->dma_exec_cmd method and its implementations. * Unexport ide_execute_command() and ide_dma_intr(). v2: * Fix CONFIG_BLK_DEV_IDEDMA=n build (noticed by Randy Dunlap). * Fix *dma_expiry naming (suggested by Sergei Shtylyov). There should be no functional changes caused by this patch. Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: pass command to ide_map_sg()Bartlomiej Zolnierkiewicz2009-03-271-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * Set IDE_TFLAG_WRITE flag and ->rq also for ATA_CMD_PACKET commands. * Pass command to ->dma_setup method and update all its implementations accordingly. * Pass command instead of request to ide_build_sglist(), *_build_dmatable() and ide_map_sg(). While at it: * Fix scc_dma_setup() documentation + use ATA_DMA_WR define. * Rename sgiioc4_build_dma_table() to sgiioc4_build_dmatable(), change return value type to 'int' and drop unused 'ddir' argument. * Do some minor cleanups in [tx4939]ide_dma_setup(). There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move command related fields from ide_hwif_t to struct ide_cmdBartlomiej Zolnierkiewicz2009-03-271-1/+1
| | | | | | | | | | * Move command related fields from ide_hwif_t to struct ide_cmd. * Make ide_init_sg_cmd() take command and sectors number as arguments. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: call ide_build_sglist() prior to ->dma_setup (v2)Bartlomiej Zolnierkiewicz2009-03-271-4/+0
| | | | | | | | | | | | | | | | * Re-map sg table if needed in ide_build_sglist(). * Move ide_build_sglist() call from ->dma_setup to its users. * Un-export ide_build_sglist(). v2: * Build fix for CONFIG_BLK_DEV_IDEDMA=n (noticed by Randy Dunlap). There should be no functional changes caused by this patch. Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-dma-sff: factor out ide_dma_sff_write_status()Sergei Shtylyov2009-01-061-21/+16
| | | | | | | Factor out ide_dma_sff_write_status(), symmetric to ide_dma_sff_read_status(). Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move read_sff_dma_status() method to 'struct ide_dma_ops'Sergei Shtylyov2009-01-061-5/+17
| | | | | | | | | | | | Move apparently misplaced read_sff_dma_status() method from 'struct ide_tp_ops' to 'struct ide_dma_ops', renaming it to dma_sff_read_status() and making only required for SFF-8038i compatible IDE controller drivers (greatly cutting down the number of initializers) as its only user (outside ide-dma-sff.c and such drivers) appears to be ide_pci_check_simplex() which is only called for such controllers... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: merge ide_hwgroup_t with ide_hwif_t (v2)Bartlomiej Zolnierkiewicz2009-01-061-2/+2
| | | | | | | | | | | | | | | | | | | * Merge ide_hwgroup_t with ide_hwif_t. * Cleanup init_irq() accordingly, then remove no longer needed ide_remove_port_from_hwgroup() and ide_ports[]. * Remove now unused HWGROUP() macro. While at it: * ide_dump_ata_error() fixups v2: * Fix ->quirk_list check in do_ide_request() (s/hwif->cur_dev/prev_port->cur_dev). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use ATA_DMA_* defines in ide-dma-sff.cBartlomiej Zolnierkiewicz2008-12-291-29/+23
| | | | | | | In few places open-coded values were still being used. Fix it. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* trm290: add IDE_HFLAG_TRM290 host flagBartlomiej Zolnierkiewicz2008-12-291-1/+1
| | | | | | | | | * Add IDE_HFLAG_TRM290 host flag and use it in ide_build_dmatable(). * Remove no longer needed ide_trm290 chipset type. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: re-add TRM290 fix lost during ide_build_dmatable() cleanupBartlomiej Zolnierkiewicz2008-10-171-1/+1
| | | | | | | | | | | commit 14c123f37187aba0b4e0e893a969efc6820c4170 ("ide: cleanup ide_build_dmatable()") accidentally reverted TRM290 fix introduced by commit 22e05b4549bf2405d6aca128540b20cd2dd33f1f ("ide-dma: fix ide_build_dmatable() for TRM290"). Reported-by: Sergei Shtylylov <sshtylyov@ru.mvista.com> Acked-by: Sergei Shtylylov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move SFF DMA code to ide-dma-sff.cBartlomiej Zolnierkiewicz2008-10-131-0/+356
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>