summaryrefslogtreecommitdiffstats
path: root/drivers/ide/sgiioc4.c
Commit message (Collapse)AuthorAgeFilesLines
* ide: change ->set_dma_mode method parametersBartlomiej Zolnierkiewicz2010-01-191-1/+1
| | | | | | | Change ->set_dma_mode method parameters to match ->set_dmamode method used in struct ata_port_operations. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* sgiioc4: coding style cleanupSergei Shtylyov2009-06-151-65/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix several errors and warnings given by checkpatch.pl: - space between the asterisk and parameter name; - inconsistent spacing between operator and operands; - space between *sizeof* and open parenthesis; - #include <asm/io.h> instead of #include <linux/io.h> - use of *typedef* instead of a structure tag; - line over 80 characters. In addition to these changes, also do the following: - indent with tabs instead of spaces; - put the function's result type and name/parameters on the same line; - join back the needlessly broken lines; - get rid of needless type cast in sgiioc4_checkirq(); - remove space between the type cast and the variable name; - remove commented out field initializer; - uppercase the acronyms, lowercase the normal words in the comments; - fix up the multi-line comment style... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove hw_regs_t typedefBartlomiej Zolnierkiewicz2009-05-171-2/+2
| | | | | | | | | Remove hw_regs_t typedef and rename struct hw_regs_s to struct ide_hw. 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: pass number of ports to ide_host_{alloc,add}() (v2)Bartlomiej Zolnierkiewicz2009-05-171-2/+2
| | | | | | | | | | | | | | Pass number of ports to ide_host_{alloc,add}() and then update all users accordingly. v2: - drop no longer needed NULL initializers in buddha.c, cmd640.c and gayle.c (noticed by Sergei) 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: remove chipset field from hw_regs_tBartlomiej Zolnierkiewicz2009-05-171-1/+0
| | | | | | | | | | | | | | | | | | * Convert host drivers that still use hw_regs_t's chipset field to use the one in struct ide_port_info instead. * Move special handling of ide_pci chipset type from ide_hw_configure() to ide_init_port(). * Remove chipset field from hw_regs_t. While at it: - remove stale comment in delkin_cb.c 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: turn selectproc() method into dev_select() method (take 5)Sergei Shtylyov2009-03-311-0/+1
| | | | | | | | | | | Turn selectproc() method into dev_select() method by teaching it to write to the device register and moving it from 'struct ide_port_ops' to 'struct ide_tp_ops'. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: benh@kernel.crashing.org Cc: petkovbb@gmail.com [bart: add ->dev_select to at91_ide.c and tx4939.c (__BIG_ENDIAN case)] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: turn set_irq() method into write_devctl() methodSergei Shtylyov2009-03-311-2/+1
| | | | | | | | Turn set_irq() method with its software reset hack into write_devctl() method (for just writing a value into the device control register) at last... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: sanitize ide_build_sglist() and ide_destroy_dmatable()Bartlomiej Zolnierkiewicz2009-03-311-3/+4
| | | | | | | | | | | | | | * Move ide_map_sg() calls out from ide_build_sglist() to ide_dma_prepare(). * Pass command to ide_destroy_dmatable(). * Rename ide_build_sglist() to ide_dma_map_sg() and ide_destroy_dmatable() to ide_dma_unmap_sg(). There should be no functional changes caused by this patch. 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-7/+2
| | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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-1/+0
| | | | | | | | | | | | | | | | | | 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: pass command to ide_map_sg()Bartlomiej Zolnierkiewicz2009-03-271-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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-8/+2
| | | | | | | | | | | | | | | | * 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: allow host drivers to specify IRQ flagsBartlomiej Zolnierkiewicz2009-03-271-0/+1
| | | | | | | | | | | | | * Add ->irq_flags field to struct ide_port_info and struct ide_host. * Update host drivers and IDE PCI code to use ->irq_flags field. * Convert init_irq() and ide_intr() to use host->irq_flags. This fixes handling of shared IRQs for non-PCI hosts and removes ugly ifdeffery from core IDE code. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move read_sff_dma_status() method to 'struct ide_dma_ops'Sergei Shtylyov2009-01-061-1/+0
| | | | | | | | | | | | 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: remove HWIF() macroBartlomiej Zolnierkiewicz2009-01-061-6/+6
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: merge ide_hwgroup_t with ide_hwif_t (v2)Bartlomiej Zolnierkiewicz2009-01-061-1/+1
| | | | | | | | | | | | | | | | | | | * 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>
* [IA64] Clear up section mismatch for ioc4_ide_attach_one.Robin Holt2008-12-091-3/+3
| | | | | | | | | The generic_defconfig has three section mismatches. This clears up ioc4_ide_attach_one(). Signed-off-by: Robin Holt <holt@sgi.com> Signed-off-by: Mike Reid <mdr@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
* pci: use pci_ioremap_bar() in drivers/ideArjan van de Ven2008-10-231-1/+1
| | | | | | | | | | | Use the newly introduced pci_ioremap_bar() function in drivers/ide. pci_ioremap_bar() just takes a pci device and a bar number, with the goal of making it really hard to get wrong, while also having a central place to stick sanity checks. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* sgiioc4: use ide_host_add() (take 2)Sergei Shtylyov2008-10-231-15/+3
| | | | | | | | | | | | | | | Convert the driver to use ide_host_add() -- this seems to be a straightforward change which I'm not sure why hasn't been done yet... While doing this at last, get rid of: - useless local copy of the 'sgiioc4_port_info' variable; - unnecessary 'goto' and label... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: jeremy@sgi.com Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* sgiioc4: fix error cleanup path (take 2)Sergei Shtylyov2008-10-231-1/+3
| | | | | | | | | The driver "forgot" to call iounmap() iff request_mem_region() call failed in sgiioc4_ide_setup_pci_device()... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: jeremy@sgi.com Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove useless subdirs from drivers/ide/Bartlomiej Zolnierkiewicz2008-10-211-0/+674
Suggested-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
OpenPOWER on IntegriCloud