10 Jun, 2009
1 commit
-
There should be no functional changes caused by this patch.
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz
18 May, 2009
3 commits
-
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
Signed-off-by: Bartlomiej Zolnierkiewicz -
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
Signed-off-by: Bartlomiej Zolnierkiewicz -
* 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.cThere should be no functional changes caused by this patch.
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz
07 Apr, 2009
1 commit
-
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Signed-off-by: Yang Hongyang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
27 Mar, 2009
1 commit
-
* 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
25 Mar, 2009
5 commits
-
* Set ->irq explicitly in cs5520.c.
* Remove irq argument from ide_hw_configure().
* Remove pciirq argument from ide_pci_setup_ports().
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
-
* Return 0 instead of dev->irq in ->init_chipset implementations.
* Fix ->init_chipset method to return 'int' value instead of
'unsigned int' one.This fixes ->init_chipset handling for host drivers (cs5530, hpt366
and pdc202xx_new) for which it is possible for this method to fail.Signed-off-by: Bartlomiej Zolnierkiewicz
-
Signed-off-by: Bartlomiej Zolnierkiewicz
-
Signed-off-by: Bartlomiej Zolnierkiewicz
-
Move handling of IDE_HFLAG[_FORCE]_LEGACY_IRQS from ide_init_port()
to ide_pci_init_{one,two}().There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
07 Jan, 2009
3 commits
-
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
Signed-off-by: Bartlomiej Zolnierkiewicz -
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
-
Remove needless parens while at it.
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz
11 Oct, 2008
1 commit
-
* Keep pointer to ->init_chipset method also in
struct ide_host and set it in ide_host_alloc_all().* Add ide_pci_suspend() and ide_pci_resume() helpers
(default ->suspend and ->resume implementations).* ->init_chipset can no longer be marked __devinit.
* Add proper PCI PM support to IDE PCI host drivers
(rz1000.c and tc86c001.c are skipped for now since
they need to be converted from using ->init_hwif
to use ->init_chipset instead).v2:
* Cleanup CONFIG_PM #ifdef-s per akpm's suggestion.Cc: Andrew Morton
Cc: "Rafael J. Wysocki"
Signed-off-by: Bartlomiej Zolnierkiewicz
25 Jul, 2008
8 commits
-
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
-
While at it:
* Apply small fixes to messages (s/dma/DMA/, remove trailing '.', etc).
* Fix printk() call in ide_setup_pci_baseregs() to use KERN_INFO.
* Move printk() call from ide_pci_clear_simplex() to the caller.
* Cleanup do_ide_setup_pci_device() a bit.
* amd74xx.c: remove superfluous PCI device revision information.
* hpt366.c: fix two printk() calls in ->init_chipset to use KERN_INFO.
* pdc202xx_new.c: fix printk() call in ->init_chipset to use KERN_INFO.
* pdc202xx_old.c: fix driver message in pdc202xx_init_one().
* via82cxxx.c: fix driver warning message in via_init_one().
Signed-off-by: Bartlomiej Zolnierkiewicz
-
* Add 'unsigned long host_flags' field to struct ide_host.
* Set ->host_flags in ide_host_alloc_all().
* Always set PCI dev's ->driver_data in ide_pci_init_{one,two}().
* Add ide_pci_remove() helper (the default implementation for
struct pci_driver's ->remove method).Signed-off-by: Bartlomiej Zolnierkiewicz
-
* Add 'struct device *dev[2]' and 'void *host_priv' fields
to struct ide_host.* Set ->dev[] in ide_host_alloc_all()/ide_setup_pci_device[s]().
* Pass 'void *priv' argument to ide_setup_pci_device[s]()
and use it to set ->host_priv.* Set PCI dev's ->driver_data to point to the struct ide_host
instance if PCI host driver wants to use ->host_priv.* Rename ide_setup_pci_device[s]() to ide_pci_init_{one,two}().
Signed-off-by: Bartlomiej Zolnierkiewicz
-
* Call ide_pci_setup_ports() before do_ide_setup_pci_device()
in ide_setup_pci_device[s]().While at it:
* Remove stale FIXMEs.
Signed-off-by: Bartlomiej Zolnierkiewicz
-
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
-
* If device is in the PCI native mode respect dev->irq regardless of
'tried_config' in do_ide_setup_pci_device().* Drop no longer needed 'config' argument from ide_setup_pci_controller().
Signed-off-by: Bartlomiej Zolnierkiewicz
-
Call ->init_chipset method also for 'tried_config' / '!pciirq' conditions.
Signed-off-by: Bartlomiej Zolnierkiewicz
24 Jul, 2008
7 commits
-
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: 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: 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: Bartlomiej Zolnierkiewicz
-
* Factor out simplex handling from ide_pci_dma_base() to
ide_pci_check_simplex().* Set hwif->dma_base early in ->init_dma method / ide_hwif_setup_dma()
and reset it in ide_init_port() if DMA initialization fails.* Use ->read_sff_dma_status instead of ->INB in ide_pci_dma_base().
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
-
Export sff_dma_ops and then remove ide_setup_dma().
There should be no functional changes caused by this patch.
Signed-off-by: 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
Signed-off-by: Bartlomiej Zolnierkiewicz -
* Move ide_pci_setup_ports() call out from do_ide_setup_pci_device()
to ide_setup_pci_device[s]().* Drop no longer needed idx argument from do_ide_setup_pci_device().
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
17 Jul, 2008
4 commits
-
v2:
* sparc build fix. (From Stephen Rothwell)Signed-off-by: Bartlomiej Zolnierkiewicz
-
* Add DRV_NAME define to ide-h8300.c.
* Fix ide-h8300.c, swarm.c and sgiioc4.c to set .name field in
struct ide_port_info to DRV_NAME, then convert these host drivers
to use ide_find_port_slot() instead of ide_find_port().* Print message on error in ide_find_port_slot().
Signed-off-by: Bartlomiej Zolnierkiewicz
-
Alan has fixed PCI layer handling of PCI IDE in Compatibility mode so
PCI BAR 0/1 (and/or 2/3) content reported by kernel should never be zero.Tighten checks on PCI BARs and also fix printk() message while on it.
Signed-off-by: Bartlomiej Zolnierkiewicz
-
* Add 'parent' field to hw_regs_t for optional parent device pointer (needed
by macio PMAC IDE controllers) and set hwif->dev in ide_init_port_hw().* Update au1xxx-ide.c, sgiioc4.c, pmac.c and setup-pci.c accordingly.
v2:
* Update scc_pata.c.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
16 Jul, 2008
1 commit
-
Since scc_pata host driver no longer uses IDE PCI layer / ide_dma_setup()
and all other ->mmio users set also IDE_HFLAG_MMIO host flag we can safely
remove ->mmio flag.There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
27 Apr, 2008
5 commits
-
* 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: Sergei Shtylyov
Signed-off-by: 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 properlyAcked-by: Sergei Shtylyov
Signed-off-by: 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 ):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-voidCc: Jiri Slaby
Cc: Andrew Morton
Acked-by: Sergei Shtylyov
Signed-off-by: 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: 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: Bartlomiej Zolnierkiewicz