1. 27 4月, 2008 7 次提交
    • B
      ide: add struct ide_dma_ops (take 3) · 5e37bdc0
      Bartlomiej Zolnierkiewicz 提交于
      Add struct ide_dma_ops and convert core code + drivers to use it.
      
      While at it:
      
      * Drop "ide_" prefix from ->ide_dma_end and ->ide_dma_test_irq methods.
      
      * Drop "ide_" "infixes" from DMA methods.
      
      * au1xxx-ide.c:
        - use auide_dma_{test_irq,end}() directly in auide_dma_timeout()
      
      * pdc202xx_old.c:
        - drop "old_" "infixes" from DMA methods
      
      * siimage.c:
        - add siimage_dma_test_irq() helper
        - print SATA warning in siimage_init_one()
      
      * Remove no longer needed ->init_hwif implementations.
      
      v2:
      * Changes based on review from Sergei:
        - s/siimage_ide_dma_test_irq/siimage_dma_test_irq/
        - s/drive->hwif/hwif/ in idefloppy_pc_intr().
        - fix patch description w.r.t. au1xxx-ide changes
        - fix au1xxx-ide build
        - fix naming for cmd64*_dma_ops
        - drop "ide_" and "old_" infixes
        - s/hpt3xxx_dma_ops/hpt37x_dma_ops/
        - s/hpt370x_dma_ops/hpt370_dma_ops/
        - use correct DMA ops for HPT302/N, HPT371/N and HPT374
        - s/it821x_smart_dma_ops/it821x_pass_through_dma_ops/
      
      v3:
      * Two bugs slipped in v2 (noticed by Sergei):
        - use correct DMA ops for HPT374 (for real this time)
        - handle HPT370/HPT370A properly
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5e37bdc0
    • B
      ide: do complete DMA setup in ->init_dma method (take 2) · b123f56e
      Bartlomiej Zolnierkiewicz 提交于
      * Make ide_hwif_setup_dma() return an error value.
      
      * Pass 'const struct ide_port_info *d' instead of 'unsigned long dmabase'
        to ->init_dma method and make it return an error value.
      
      * Rename ide_get_or_set_dma_base() to ide_pci_dma_base(),
        change ordering of its arguments and then export it.
      
      * Export ide_pci_set_master().
      
      * Do complete DMA setup inside ->init_dma method and update ->init_dma
        users accordingly.
      
      * Sanitize code for DMA setup in ide_init_port().
      
      v2:
      * Fix for CONFIG_BLK_DEV_IDEDMA_PCI=n configs
        (from Jiri Slaby <jirislaby@gmail.com>):
      
        Fix following compiler warning by returning EINVAL:
      
        In file included from ANYTHING-INCLUDING-IDE.H:45:
        include/linux/ide.h: In function ‘ide_hwif_setup_dma’:
        include/linux/ide.h:1022: warning: no return statement in function returning non-void
      
      Cc: Jiri Slaby <jirislaby@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b123f56e
    • B
      ide: cleanup ide_setup_dma() · 63158d5c
      Bartlomiej Zolnierkiewicz 提交于
      * There is no need to call ide_release_dma_engine().
      
      * Move the code up to (and including) ide_allocate_dma_engine()
        call to the callers of ide_setup_dma().
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      63158d5c
    • B
      ide: factor out setting PCI bus-mastering from ide_hwif_setup_dma() · d54452fb
      Bartlomiej Zolnierkiewicz 提交于
      Factor out setting PCI bus-mastering from ide_hwif_setup_dma()
      to ide_pci_set_master() helper.
      
      While at it:
      
      * don't read PCI Command register if not necessary
      
      * use PCI device name instead of hwif->name
      
      * cleanup ide_hwif_setup_dma() a bit
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      d54452fb
    • B
      ide: move ide_setup_dma() call out from ->init_dma method · 23658f8a
      Bartlomiej Zolnierkiewicz 提交于
      There should be no functional changes caused by this patch.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      23658f8a
    • B
      ide: remove ->cds field from ide_hwif_t (take 2) · 5e59c236
      Bartlomiej Zolnierkiewicz 提交于
      * Use hwif->name instead of cds->name in ide_allocate_dma_engine().
      
      * Use pci_name(dev) instead of cds->name in init_dma_pdc202xx().
      
      * Remove no longer needed ->cds field from ide_hwif_t.
      
      v2:
      
      * scc_pata.c also needs to be updated now (noticed by Stephen Rothwell).
      
      There should be no functional changes caused by this patch.
      
      Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
      Cc: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5e59c236
    • B
      ide: manage resources for PCI devices in ide_pci_enable() (take 3) · 0d1bad21
      Bartlomiej Zolnierkiewicz 提交于
      * Reserve PCI BARs 0-3 (0-1 for single port controllers) in
        ide_pci_enable() and remove ide_hwif_request_regions() call
        from ide_device_add_all() (also cleanup resource management
        in scc_pata host driver).
      
      * Fix handling of PCI BAR 4 in ide_pci_enable(), then cleanup
        ide_iomio_dma() (+ init_hwif_trm290() in trm290 host driver)
        and remove ide_release[_iomio]_dma().
      
      v2:
      * Fixup trm290 host driver.
      
      v3:
      * Because of scc_pata host driver changes we need to call
        pci_request_selected_regions() also in setup_mmio_scc().
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0d1bad21
  2. 26 4月, 2008 5 次提交
  3. 18 4月, 2008 3 次提交
  4. 03 2月, 2008 3 次提交
  5. 02 2月, 2008 6 次提交
  6. 27 1月, 2008 6 次提交
    • B
    • B
      ide: use ide_init_port_hw() in setup-pci.c · 79127c37
      Bartlomiej Zolnierkiewicz 提交于
      * Move setting hwif->gendev.parent from ide_pci_setup_ports()
        to ide_hwif_configure().
      
      * Always set hwif->io_ports in ide_hwif_configure().
      
      * Use ide_init_port_hw() in ide_hwif_configure().
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      79127c37
    • B
      ide: always use ide_std_init_ports() in setup-pci.c · 6828fc9a
      Bartlomiej Zolnierkiewicz 提交于
      * ide_init_hwif_ports() call in setup-pci.c::ide_hwif_configure()
        doesn't depend on the default cotrol register offset, default IRQ
        or ppc_ide_md.ide_init_hwif implementations so ide_std_init_ports()
        can always be used.
      
      * Since 'base' is always non-zero and thus hwif->io_ports[IDE_DATA_OFFSET]
        is also non-zero always clear hwif->noprobe.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      6828fc9a
    • B
      ide: make remaining built-in only IDE host drivers modular (take 2) · ade2daf9
      Bartlomiej Zolnierkiewicz 提交于
      * Make remaining built-in only IDE host drivers modular, add ide-scan-pci.c
        file for probing PCI host drivers registered with IDE core (special case
        for built-in IDE and CONFIG_IDEPCI_PCIBUS_ORDER=y) and then take care of
        the ordering in which all IDE host drivers are probed when IDE is built-in
        during link time.
      
      * Move probing of gayle, falconide, macide, q40ide and buddha (m68k arch
        specific) host drivers, before PCI ones (no PCI on m68k), ide-cris (cris
        arch specific), cmd640 (x86 arch specific) and pmac (ppc arch specific).
      
      * Move probing of ide-cris (cris arch specific) host driver before cmd640
        (x86 arch specific).
      
      * Move probing of mpc8xx (ppc specific) host driver before ide-pnp (depends
        on ISA and none of ppc platform that use mpc8xx supports ISA) and ide-h8300
        (h8300 arch specific).
      
      * Add "probe_vlb" kernel parameter to cmd640 host driver and update
        Documentation/ide.txt accordingly.
      
      * Make IDE_ARM config option visible so it can also be disabled if needed.
      
      * Remove bogus comment from ide.c while at it.
      
      v2:
      * Fix two issues spotted by Sergei:
        - replace ENOMEM error value by ENOENT in ide-h8300 host driver
        - fix MODULE_PARM_DESC() in cmd640 host driver
      
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ade2daf9
    • B
      ide: merge ->fixup and ->quirkproc methods · f01393e4
      Bartlomiej Zolnierkiewicz 提交于
      * Assign drive->quirk_list in ->quirkproc implementations:
        - hpt366.c::hpt3xx_quirkproc()
        - pdc202xx_new.c::pdcnew_quirkproc()
        - pdc202xx_old.c::pdc202xx_quirkproc()
      
      * Make ->quirkproc void.
      
      * Move calling ->quirkproc from do_identify() to probe_hwif().
      
      * Convert it821x_fixups() to it821x_quirkproc() in it821x.c.
      
      * Convert siimage_fixup() to sil_quirkproc() in siimage.c, also remove
        no longer needed drive->present check from is_dev_seagate_sata().
      
      * Convert ide_undecoded_slave() to accept 'drive' instead of 'hwif'
        as an argument.  Then convert ide_register_hw() to accept 'quirkproc'
        argument instead of 'fixup' one.
      
      * Remove no longer needed ->fixup method.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f01393e4
    • B
      ide: (hopefully) fix VDMA for CS5520 · aea5d375
      Bartlomiej Zolnierkiewicz 提交于
      * Set the correct hwif->dma_base for the second channel in
        ide_get_or_set_dma_base().
      
      * Remove DMA enable code from cs5520_set_pio_mode(), this can
        be handled by the generic ->dma_host_on method now.
      
      * Add VDMA check to ide_config_drive_speed().
      
      * drive->using_dma was never enabled since cs5520 host driver's
        ->ide_dma_on method overrided the generic ->ide_dma_on (so
        __ide_dma_on() was never called, drive->using_dma was never set
        and VDMA was never used since it depends on drive->using_dma).
      
        Fix it by using ->dma_host_on method instead of ->ide_dma_on
        (also add matching ->dma_host_off method).
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      aea5d375
  7. 13 12月, 2007 2 次提交
  8. 14 11月, 2007 1 次提交
  9. 20 10月, 2007 7 次提交