1. 07 1月, 2009 2 次提交
  2. 09 12月, 2008 1 次提交
    • B
      ide: build-fix for CONFIG_BLK_DEV_IDEDMA_PMAC=n · 53846574
      Bartlomiej Zolnierkiewicz 提交于
      IDE pmac host driver build fails with CONFIG_BLK_DEV_IDEDMA_PMAC=n
      as reported by Kamalesh:
      
      > drivers/ide/pmac.c: In function 'pmac_ide_set_pio_mode':
      > drivers/ide/pmac.c:527: error: implicit declaration of function 'kauai_lookup_timing'
      > drivers/ide/pmac.c:527: error: 'shasta_pio_timings' undeclared (first use in this function)
      > drivers/ide/pmac.c:527: error: (Each undeclared identifier is reported only once
      > drivers/ide/pmac.c:527: error: for each function it appears in.)
      > drivers/ide/pmac.c:534: error: 'kauai_pio_timings' undeclared (first use in this function)
      > drivers/ide/pmac.c: In function 'pmac_ide_do_resume':
      > drivers/ide/pmac.c:914: error: 'IDE_WAKEUP_DELAY' undeclared (first use in this function)
      > drivers/ide/pmac.c: At top level:
      > drivers/ide/pmac.c:1007: error: 'pmac_ide_init_dma' undeclared here (not in a function)
      > drivers/ide/pmac.c: In function 'pmac_ide_setup_device':
      > drivers/ide/pmac.c:1107: error: 'IDE_WAKEUP_DELAY' undeclared (first use in this function)
      > drivers/ide/pmac.c: In function 'pmac_ide_macio_attach':
      > drivers/ide/pmac.c:1209: error: 'pmac_ide_hwif_t' has no member named 'dma_regs'
      > drivers/ide/pmac.c:1210: error: 'pmac_ide_hwif_t' has no member named 'dma_regs'
      > make[2]: *** [drivers/ide/pmac.o] Error 1
      
      Fix it by removing the superfluous config option.
      Reported-and-tested-by: NKamalesh Babulal <kamalesh@linux.vnet.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      53846574
  3. 22 10月, 2008 1 次提交
  4. 14 10月, 2008 5 次提交
  5. 11 10月, 2008 1 次提交
    • B
      ide: make drive->id an union (take 2) · 4dde4492
      Bartlomiej Zolnierkiewicz 提交于
      Make drive->id an unnamed union so id can be accessed either by using
      'u16 *id' or 'struct hd_driveid *driveid'.  Then convert all existing
      drive->id users accordingly (using 'u16 *id' when possible).
      
      This is an intermediate step to make ide 'struct hd_driveid'-free.
      
      While at it:
      
      - Add missing KERN_CONTs in it821x.c.
      
      - Use ATA_ID_WORDS and ATA_ID_*_LEN defines.
      
      - Remove unnecessary checks for drive->id.
      
      - s/drive_table/table/ in ide_in_drive_list().
      
      - Cleanup ide_config_drive_speed() a bit.
      
      - s/drive1/dev1/ & s/drive0/dev0/ in ide_undecoded_slave().
      
      v2:
      Fix typo in drivers/ide/ppc/pmac.c. (From Stephen Rothwell)
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4dde4492
  6. 30 7月, 2008 1 次提交
  7. 24 7月, 2008 10 次提交
    • B
      ide: add ide_host_add() helper · 6f904d01
      Bartlomiej Zolnierkiewicz 提交于
      Add ide_host_add() helper which does ide_host_alloc()+ide_host_register(),
      then convert ide_setup_pci_device[s](), ide_legacy_device_add() and some
      host drivers to use it.
      
      While at it:
      
      * Fix ide_setup_pci_device[s](), ide_arm.c, gayle.c, ide-4drives.c,
        macide.c, q40ide.c, cmd640.c and cs5520.c to return correct error value.
      
      * -ENOENT -> -ENOMEM in rapide.c, ide-h8300.c, ide-generic.c, au1xxx-ide.c
        and pmac.c
      
      * -ENODEV -> -ENOMEM in palm_bk3710.c, ide_platform.c and delkin_cb.c
      
      * -1 -> -ENOMEM in ide-pnp.c
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      6f904d01
    • B
      ide: add struct ide_host (take 3) · 48c3c107
      Bartlomiej Zolnierkiewicz 提交于
      * Add struct ide_host which keeps pointers to host's ports.
      
      * Add ide_host_alloc[_all]() and ide_host_remove() helpers.
      
      * Pass 'struct ide_host *host' instead of 'u8 *idx' to
        ide_device_add[_all]() and rename it to ide_host_register[_all]().
      
      * Convert host drivers and core code to use struct ide_host.
      
      * Remove no longer needed ide_find_port().
      
      * Make ide_find_port_slot() static.
      
      * Unexport ide_unregister().
      
      v2:
      * Add missing 'struct ide_host *host' to macide.c.
      
      v3:
      * Fix build problem in pmac.c (s/ide_alloc_host/ide_host_alloc/)
        (Noticed by Stephen Rothwell).
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      48c3c107
    • B
      ide: add struct ide_tp_ops (take 2) · 374e042c
      Bartlomiej Zolnierkiewicz 提交于
      * Add struct ide_tp_ops for transport methods.
      
      * Add 'const struct ide_tp_ops *tp_ops' to struct ide_port_info
        and ide_hwif_t.
      
      * Set the default hwif->tp_ops in ide_init_port_data().
      
      * Set host driver specific hwif->tp_ops in ide_init_port().
      
      * Export ide_exec_command(), ide_read_status(), ide_read_altstatus(),
        ide_read_sff_dma_status(), ide_set_irq(), ide_tf_{load,read}()
        and ata_{in,out}put_data().
      
      * Convert host drivers and core code to use struct ide_tp_ops.
      
      * Remove no longer needed default_hwif_transport().
      
      * Cleanup ide_hwif_t from methods that are now in struct ide_tp_ops.
      
      While at it:
      
      * Use struct ide_port_info in falconide.c and q40ide.c.
      
      * Rename ata_{in,out}put_data() to ide_{in,out}put_data().
      
      v2:
      
      * Fix missing convertion in ns87415.c.
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      374e042c
    • B
      ide: remove ->INB, ->OUTB and ->OUTBSYNC methods · 761052e6
      Bartlomiej Zolnierkiewicz 提交于
      * Remove no longer needed ->INB, ->OUTB and ->OUTBSYNC methods.
      
      Then:
      
      * Remove no longer used default_hwif_[mm]iops() and ide_[mm_]outbsync().
      
      * Cleanup SuperIO handling in ns87415.c.
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      761052e6
    • B
      ide: add ->set_irq method · 6e6afb3b
      Bartlomiej Zolnierkiewicz 提交于
      Add ->set_irq method for setting nIEN bit of ATA Device Control
      register and use it instead of ide_set_irq().
      
      While at it:
      
      * Use ->set_irq in init_irq() and do_reset1().
      
      * Don't use HWIF() macro in ide_check_pm_state().
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      6e6afb3b
    • B
      ide: add ->exec_command method · c6dfa867
      Bartlomiej Zolnierkiewicz 提交于
      Add ->exec_command method for writing ATA Command register
      and use it instead of ->OUTBSYNC.
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      c6dfa867
    • B
      ide: pass hw_regs_t-s to ide_device_add[_all]() (take 3) · c97c6aca
      Bartlomiej Zolnierkiewicz 提交于
      * Add 'hw_regs_t **hws' argument to ide_device_add[_all]() and convert
        host drivers + ide_legacy_init_one() + ide_setup_pci_device[s]() to use
        it instead of calling ide_init_port_hw() directly.
      
        [ However if host has > 1 port we must still set hwif->chipset to hint
          consecutive ide_find_port() call that the previous slot is occupied. ]
      
      * Unexport ide_init_port_hw().
      
      v2:
      * Use defines instead of hard-coded values in buddha.c, gayle.c and q40ide.c.
        (Suggested by Geert Uytterhoeven)
      
      * Better patch description.
      
      v3:
      * Fix build problem in ide-cs.c. (Noticed by Stephen Rothwell)
      
      There should be no functional changes caused by this patch.
      
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      c97c6aca
    • B
      ide-pmac: move ide_find_port() call to pmac_ide_setup_device() (take 2) · b36ba532
      Bartlomiej Zolnierkiewicz 提交于
      Move ide_find_port() call to pmac_ide_setup_device().
      
      While at it:
      
      - fix return value (s/-ENODEV/-ENOENT/)
      
      - add DRV_NAME define and use it to set name field of pmac_port_info
      
      - use ide_find_port_slot() instead of ide_find_port()
      
      - remove superfluous error message (ide_find_port_slot() takes care of it)
      
      - drop IDE interface number from driver banner message (but include bus type)
      
      v2:
      * Build fix (thanks to Stephen Rothwell for noticing the issue).
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b36ba532
    • B
      ide-pmac: add ->init_dev method (take 4) · 07eb106f
      Bartlomiej Zolnierkiewicz 提交于
      v2/3:
      * Build fixes from Stephen Rothwell.
      
      v4:
      * Fix ->noprobe setting. (From Benjamin Herrenschmidt)
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      07eb106f
    • B
      ide-pmac: store pmif instead of hwif in ->driver_data (take 2) · 7b8797ac
      Bartlomiej Zolnierkiewicz 提交于
      * Pass pmif instead of hwif to pmac_ide_do_{suspend,resume}().
      
      * Store pmif instead of hwif in ->driver_data.
      
      * Use dev_get_drvdata() instead of ->hwif_data to obtain pmif.
      
      v2:
      * Build fixes from Stephen Rothwell.
      
      There should be no functional changes caused by this patch.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7b8797ac
  8. 17 7月, 2008 3 次提交
  9. 16 7月, 2008 1 次提交
  10. 16 6月, 2008 2 次提交
  11. 29 4月, 2008 1 次提交
    • B
      ide: add IDE_HFLAG_MMIO host flag (take 2) · c5dd43ec
      Bartlomiej Zolnierkiewicz 提交于
      * Add IDE_HFLAG_MMIO host flag and set it for hosts which use
        default_hwif_mmiops().
      
      v2:
      * Fix kernel panic in pmac host driver (',' should be '|').
      
        Thanks to Kamalesh for reporting it + testing the fix
        and to Andrew for hinting me about the source of the issue.
      
      Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Andy Whitcroft <apw@shadowen.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      c5dd43ec
  12. 27 4月, 2008 7 次提交
    • B
      ide: add struct ide_io_ports (take 3) · 4c3032d8
      Bartlomiej Zolnierkiewicz 提交于
      * Add struct ide_io_ports and use it instead of `unsigned long io_ports[]`
        in ide_hwif_t.
      
      * Rename io_ports[] in hw_regs_t to io_ports_array[].
      
      * Use un-named union for 'unsigned long io_ports_array[]' and 'struct
        ide_io_ports io_ports' in hw_regs_t.
      
      * Remove IDE_*_OFFSET defines.
      
      v2:
      * scc_pata.c build fix from Stephen Rothwell.
      
      v3:
      * Fix ctl_adrr typo in Sparc-specific part of ns87415.c.
        (Noticed by Andrew Morton)
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4c3032d8
    • B
      ide: constify struct ide_dma_ops · f37afdac
      Bartlomiej Zolnierkiewicz 提交于
      * Export ide_dma_exec_cmd() and __ide_dma_test_irq().
      
      * Constify struct ide_dma_ops.
      
      * Always set hwif->dma_ops to &sff_dma_ops in ide_setup_dma()
        (it is later overriden by ide_init_port() if needed) and drop
        'const struct ide_port_info *d' argument.
      
      While at it:
      
      * Rename __ide_dma_test_irq() to ide_dma_test_irq().
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f37afdac
    • 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-pmac: use ->init_dma method · 0d071922
      Bartlomiej Zolnierkiewicz 提交于
      * Move pmif->dma_regs check from pmac_ide_setup_device() to
        pmac_ide_init_dma().
      
      * Get 'pmif' from 'hwif->hwif_data' in pmac_ide_init_dma() and replace
        'pmac_ide_hwif_t *pmif' argument by 'const struct ide_port_info *d'.
      
      * Add pmac_ide_init_dma() implementation for CONFIG_BLK_DEV_IDEDMA_PMAC=n
        case and convert the driver to use ->init_dma method.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0d071922
    • B
      ide: cleanup setting hwif->mmio flag · 3dd89a9b
      Bartlomiej Zolnierkiewicz 提交于
      It is no longer needed to set hwif->mmio flag to tell IDE layer to not
      manage resources so cleanup host drivers that used hwif->mmio flag only
      for this purpose.
      
      Ditto for ide_legacy_init_one().
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3dd89a9b
    • B
      ide: remove ->noprobe field from ide_hwif_t · e53cd458
      Bartlomiej Zolnierkiewicz 提交于
      Update IDE PMAC host driver to use drive->noprobe instead of hwif->noprobe
      and remove hwif->noprobe completely (it is always set to zero now).
      
      There should be no functional changes caused by this patch.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e53cd458
    • B
      ide: add struct ide_port_ops (take 2) · ac95beed
      Bartlomiej Zolnierkiewicz 提交于
      * Move hooks for port/host specific methods from ide_hwif_t to
        'struct ide_port_ops'.
      
      * Add 'const struct ide_port_ops *port_ops' to 'struct ide_port_info'
        and ide_hwif_t.
      
      * Update host drivers and core code accordingly.
      
      While at it:
      
      * Rename ata66_*() cable detect functions to *_cable_detect() to match
        the standard naming. (Suggested by Sergei Shtylyov)
      
      v2:
      * Fix build for bast-ide. (Noticed by Andrew Morton)
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ac95beed
  13. 26 4月, 2008 3 次提交
  14. 18 4月, 2008 2 次提交