summaryrefslogtreecommitdiff
path: root/include/linux/dma-mapping.h
AgeCommit message (Collapse)Author
2007-02-09devres: device resource managementTejun Heo
Implement device resource management, in short, devres. A device driver can allocate arbirary size of devres data which is associated with a release function. On driver detach, release function is invoked on the devres data, then, devres data is freed. devreses are typed by associated release functions. Some devreses are better represented by single instance of the type while others need multiple instances sharing the same release function. Both usages are supported. devreses can be grouped using devres group such that a device driver can easily release acquired resources halfway through initialization or selectively release resources (e.g. resources for port 1 out of 4 ports). This patch adds devres core including documentation and the following managed interfaces. * alloc/free : devm_kzalloc(), devm_kzfree() * IO region : devm_request_region(), devm_release_region() * IRQ : devm_request_irq(), devm_free_irq() * DMA : dmam_alloc_coherent(), dmam_free_coherent(), dmam_declare_coherent_memory(), dmam_pool_create(), dmam_pool_destroy() * PCI : pcim_enable_device(), pcim_pin_device(), pci_is_managed() * iomap : devm_ioport_map(), devm_ioport_unmap(), devm_ioremap(), devm_ioremap_nocache(), devm_iounmap(), pcim_iomap_table(), pcim_iomap(), pcim_iounmap() Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-29[PATCH] Move valid_dma_direction() from x86_64 to generic codeRolf Eike Beer
As suggested by Muli Ben-Yehuda this function is moved to generic code as may be useful for all archs. [akpm@osdl.org: fix] Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Cc: Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-10dl2k: use DMA_48BIT_MASK constantFrancois Romieu
Typo will be harder with this one. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-04-11[PATCH] Last DMA_xBIT_MASK cleanupsTobias Klauser
These are the last conversions of pci_set_dma_mask(), pci_set_consistent_dma_mask() and pci_dma_supported() to use DMA_xBIT_MASK constants from linux/dma-mapping.h Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-28[PATCH] Replace 0xff.. with correct DMA_xBIT_MASKMatthias Gehre
Replace all occurences of 0xff.. in calls to function pci_set_dma_mask() and pci_set_consistant_dma_mask() with the corresponding DMA_xBIT_MASK from linux/dma-mapping.h. Signed-off-by: Matthias Gehre <M.Gehre@gmx.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-22[PATCH] Intruduce DMA_28BIT_MASKTobias Klauser
This patch introduces the DMA_28BIT_MASK constant in dma-mapping.h ALSA drivers using this mask are changed to use the new constant. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Jaroslav Kysela <perex@suse.cz>
2005-06-17[SCSI] Add DMA mask constants other than 32 and 64 bitLee Revell
Signed-Off-By: Lee Revell <rlrevell@joe-job.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2004-09-13[PATCH] linux/dma-mapping.h needs linux/device.hNicolas Pitre
It seems that most architectures already include linux/device.h in their own asm/dma-mapping.h. Most but not all, and some drivers fail to compile on those architectures that don't. Since everybody needs it let's include device.h from one place only and fix compilation for everybody.
2004-08-14MergeJames Bottomley
2004-07-09[PATCH] Fix sparc compile error in dma-mapping.hAndrew Morton
William Lee Irwin III <wli@holomorphy.com> wrote: > > SPLIT include/linux/autoconf.h -> include/config/* > CHK include/linux/compile.h > UPD include/linux/compile.h > In file included from include/asm/sbus.h:10, > from arch/sparc64/kernel/auxio.c:15: It needs err.h. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2004-07-07Fix incorrect prototype in the dma_declare_coherent_memory APIJames Bottomley
dma_mark_declared_memory_occupied() wasn't declared static inline in the NULL (default) implementation leading to compile failures.
2004-07-02[PATCH] dma_get_required_mask() build fixJames Bottomley
This new function fails to build on sparc64 due to nasty include dependencies. Fix that by uninlining it - it was too big for inlining anyway. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-06-30Add dma_declare_coherent_memory() APIJames Bottomley
This adds the description and a null prototype. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2004-06-29[PATCH] dma_get_required_mask()James Bottomley
This patch implements dma_get_required_mask() which may be used by drivers to probe the optimal DMA descriptor type they should be implementing on the platform. I've also tested it this time with the sym_2 driver...making it chose the correct descriptors for the platform. (although I don't have a 64 bit platform with >4GB memory, so I only confirmed it selects the 32 bit descriptors all the time...) Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-03-30[PATCH] PCI: move DMA_nnBIT_MASK to linux/dma-mapping.hRandy Dunlap
2004-03-13[PATCH] DMA: Fill gaping hole in DMA API interfaces.Andrew Morton
From: "David S. Miller" <davem@redhat.com> Currently, for an existing DMA mapping, there is a way to transfer buffer ownership back to the cpu, yet there is no way to give it back to the device again explicitly. The latter really is needed on platforms where the PCI subsystem does not snoop the cpu caches, MIPS is one example. Many drivers were expecting the existing DMA sync interface to handle both directions, which was wrong. Now, with this change, we have explicit interfaces for DMA syncing to/from the device and the cpu.
2002-12-21generic device DMA APIJames Bottomley
add dma_ API to mirror pci_ DMA API but phrased to use struct device instead of struct pci_dev. See Documentation/DMA-API.txt for details