summaryrefslogtreecommitdiff
path: root/sys/dev/isa/isadma.c
AgeCommit message (Collapse)Author
2018-05-29fix off-by-one in the mapping of the ISA DMA page registers, they actuallyjdolecek
start at 0x81; the code used bus_space_map() starting from 0x80 but used +1 offset for actual I/O, now it maps starting 0x81 and does I/O without offset the reads and writes work exactly the same as before, but this frees 0x80 for being mapped independantly patch provided in PR kern/52468 by Jonathan Chapman; checked against the spec and also FreeBSD sys/x86/isa/isa_dma.c
2010-11-13Don't pull in the whole uvm(9) API to access only PAGE_SIZE anduebayasi
some other constants. These are provided by sys/param.h now.
2010-07-26Add PAE to ALL kernel, so that most paddr_t format string errors get caughtjym
during compilation. While here, fix the compilation for ALL.
2010-04-19Add default implementations for bus_space_is_equal(9),dyoung
bus_space_tag_create(9), and bus_space_tag_destroy(9). Use bus_space_is_equal(9) throughout the kernel to compare bus_space_tag_t's. Tested on i386 and on sparc64.
2010-03-22isadma.c: #if 0 some diagnostic code that compares two bus_space_tag_t's.dyoung
pcdisplay.c: #if 0 some code that compares two bus_space_tag_t's in order to see if pcdisplay0 is console. It does not seem to be helpful to compare the tags; maybe the author intended to compare some other bus property? MI code should not compare an opaque type such as bus_space_tag_t!
2009-08-18Let us safely detach the ISA bus and devices attaching to the ISAdyoung
bus: 1 Add isadetach() for detaching the ISA bus, and add some helper routines that release resources held for ISA DMA. 2 In isachilddetached(), forget references to child devices. While I am here, change ISA_DMA_DRQ_ISFREE(...) == 0 to the simpler expression, !ISA_DMA_DRQ_ISFREE(...).
2009-05-12struct device * -> device_t, no functional changes intended.cegger
2009-03-14ANSIfy another 1261 function definitions.dsl
The only ones left in sys are beyond by sed script! (or in sys/dist or sys/external) Mostly they have function pointer parameters.
2009-02-13More printf format fixes.bouyer
2008-04-28Remove clause 3 and 4 from TNF licensesmartin
2008-04-08use aprint_*_dev and device_xnamecegger
2007-10-19machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.had
2007-03-04Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.christos
2005-12-11merge ktrace-lwp.christos
2005-02-04de-__Pperry
2003-05-09A few ISA sound drivers like to share dma channels, and hence deferredfvdl
isa_dmamap_create() calls to their open/close entrypoints. This worked with some luck, but broke on i386 when _bus_dmamap_create started to allocate bounce buffers upfront, since memory below 16M may well not be available when the sound devices is opened for the Nth time. To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free, wrappers around already existing bitmask macros. These are expected to be used before an isa_dmamap_create call, and after an isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers, they're deferred until open/close. All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done at attach time.
2003-02-01Add extensible malloc types, adapted from FreeBSD. This turnsthorpej
malloc types into a structure, a pointer to which is passed around, instead of an int constant. Allow the limit to be adjusted when the malloc type is defined, or with a function call, as suggested by Jonathan Stone.
2002-09-27remove trailing \n in panic(). approved perry.provos
2001-11-13add RCSIDlukem
2001-07-19Use BUS_DMA_READ and BUS_DMA_WRITE in some obvious places.thorpej
2001-02-12Clean up a couple of printf-format warnings.briggs
2000-11-14NBPG -> PAGE_SIZEthorpej
2000-06-28remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>mrg
2000-06-26Change the kernel mmap interface so that the offset to map is ansimonb
"off_t" and the return value is a "paddr_t" to allow mappings at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which only changed the offset to a "vm_offset_t". Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-02-07Add a new function call to the ISA DMA API: isa_dmamaxsize(), which returnsthorpej
the maximum transfer size for the specified DMA channel. Make all clients of ISA DMA use this call to determine their maximum transfer size.
1999-03-22If bus_dmamap_create() fails, free the DMA channel.mycroft
1999-02-22Oops; remove obsolete code.mycroft
1999-02-22Add support for demand mode with auto-init.mycroft
1998-11-19fix problems in many d_mmap routines:mrg
- returned EOPNOTSUPP rather than -1. - no check for negative offset. many of these fix potential security problems in these drivers. XXX XXX XXX the d_mmap cdev routine should be changed to have a prototype like: paddr_t (*d_mmap) __P((dev_t, off_t, int)); by someone!
1998-07-08DRQ 4 is used to chain the two 8237s together. Make sure it's alwaysthorpej
cascaded and that it will be unmasked when DMA is thawed after being frozen. (This also has the effect of making sure that no device ever erroneously gets DRQ 4.)
1998-06-28Add an additional ISA DMA mode: LOOPDEMAND. This is for devices, suchthorpej
as the Shark's CS8900 Ethernet, which want to use the DMA controller in this mode (as opposed to single mode). [Editor's note: committed from a Shark using a new bus_dma back-end and a CS8900 driver converted to use the MI code :-]
1998-06-25Don't panic if a DRQ is already allocated. Instead, just return EAGAINthorpej
to indicate that the resource is unavailable.
1998-06-09Add isa_dma{freeze,thaw}(), used to temporarily stop and then restartthorpej
all ISA DMA. Needed by e.g. the SmartCard reader for Sharks.
1998-06-09Change the ISA DMA API to take an isa_chipset_tag_t rather thanthorpej
a struct device * corresponding to the ISA bus device. The ISA DMA controller driver functions have been renamed and now take a struct isa_dma_state *, and are called indirectly by machine-dependent code which provides the DMA state. These changes allow e.g. `ofisa' (the OpenFirmware configuration mechanism for the ISA bus, used by e.g. Sharks) to use the MI ISA DMA controller code.
1998-02-04Add offset and length parameters to bus_dmamap_sync(), used for specifiyingthorpej
partial syncs of a DMA mapping.
1997-09-05Enable use of bus_dmamem_mmap().thorpej
1997-08-30Insert a sanity check so we get a panic instead of a kernel pageaugustss
fault if the DMA map is missing.
1997-08-04Implement a function to test if a drq is taken and use itaugustss
in two drivers. There are still many drivers left to fix...
1997-07-31Don't panic when creating a bus dma map for a taken dma channel,augustss
it can happen during probing.
1997-07-28Audio: Remove the machine dependant code I put in audio.c by mistake.augustss
This adds another method to audio_hw_if. Also remove a field from audio_hw_if that was not read-only.
1997-07-27Changes to the sudio system:augustss
- It is now possible to handle devices that want "looping" DMA, e.g. the SoundBlaster correctly. The WSS and SB drivers use this. To do this several new methods were introduced in audio_hw_if. - Different silence handling (forced by previous change). - The audio driver can now be mmap()-ed, but due to problems in the VM system only for writing for now. - The OSS (Linux) audio emulation takes advantage of some of the new features.
1997-06-06Pull thorpej-bus-dma branch into mainline.thorpej
1997-05-29Use single mode, not demand mode, for auto-initialize transfers.mycroft
1997-05-28Don't use the TC bit to check for wraparound in isa_dmacount(); remember themycroft
transfer length and use that.
1997-03-21Clean up a bit, and export isa_dmamask() and isa_dmaunmask() interfaces.mycroft
1997-03-21Add an isa_dmacount() function, to get the current residual count on a channel.mycroft
1996-10-13backout kprintf changeschristos
1996-10-10printf -> kprintf, sprintf -> ksprintfchristos
1996-04-29- prototype fixeschristos
1996-03-31Fix a slight biff with 16-bit DMA in last change.mycroft