lukem
3f7d8d47b6
add RCSID
2001-11-13 08:01:09 +00:00
thorpej
44e529fecc
Use BUS_DMA_READ and BUS_DMA_WRITE in some obvious places.
2001-07-19 16:36:14 +00:00
briggs
180bf3d3ac
Clean up a couple of printf-format warnings.
2001-02-12 15:49:19 +00:00
thorpej
275539f03c
NBPG -> PAGE_SIZE
2000-11-14 18:21:00 +00:00
mrg
7e81221f5a
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
2000-06-28 16:27:51 +00:00
simonb
889c658b5b
Change the kernel mmap interface so that the offset to map is an
...
"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-06-26 04:55:19 +00:00
thorpej
52a2804a5c
Add a new function call to the ISA DMA API: isa_dmamaxsize(), which returns
...
the maximum transfer size for the specified DMA channel. Make all clients
of ISA DMA use this call to determine their maximum transfer size.
2000-02-07 22:07:27 +00:00
mycroft
ee5f90d04c
If bus_dmamap_create() fails, free the DMA channel.
1999-03-22 07:06:09 +00:00
mycroft
10817df7f0
Oops; remove obsolete code.
1999-02-22 02:33:48 +00:00
mycroft
bd575a4ff6
Add support for demand mode with auto-init.
1999-02-22 02:32:43 +00:00
mrg
db3051d720
fix problems in many d_mmap routines:
...
- 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-11-19 15:38:20 +00:00
thorpej
1b5fbe0b89
DRQ 4 is used to chain the two 8237s together. Make sure it's always
...
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-07-08 05:23:23 +00:00
thorpej
ad3073beaf
Add an additional ISA DMA mode: LOOPDEMAND. This is for devices, such
...
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-28 06:59:35 +00:00
thorpej
ab5b45577b
Don't panic if a DRQ is already allocated. Instead, just return EAGAIN
...
to indicate that the resource is unavailable.
1998-06-25 19:18:05 +00:00
thorpej
680a3d77f4
Add isa_dma{freeze,thaw}(), used to temporarily stop and then restart
...
all ISA DMA. Needed by e.g. the SmartCard reader for Sharks.
1998-06-09 01:04:17 +00:00
thorpej
ff76b8e96b
Change the ISA DMA API to take an isa_chipset_tag_t rather than
...
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-06-09 00:00:21 +00:00
thorpej
8abe76d2f0
Add offset and length parameters to bus_dmamap_sync(), used for specifiying
...
partial syncs of a DMA mapping.
1998-02-04 05:12:46 +00:00
thorpej
7e062e8a4e
Enable use of bus_dmamem_mmap().
1997-09-05 01:48:33 +00:00
augustss
420b75952f
Insert a sanity check so we get a panic instead of a kernel page
...
fault if the DMA map is missing.
1997-08-30 17:33:49 +00:00
augustss
3bcc377a4c
Implement a function to test if a drq is taken and use it
...
in two drivers. There are still many drivers left to fix...
1997-08-04 22:13:32 +00:00
augustss
cf8a170732
Don't panic when creating a bus dma map for a taken dma channel,
...
it can happen during probing.
1997-07-31 22:20:47 +00:00
augustss
a63034762b
Audio: Remove the machine dependant code I put in audio.c by mistake.
...
This adds another method to audio_hw_if. Also remove a field from
audio_hw_if that was not read-only.
1997-07-28 20:56:05 +00:00
augustss
9745684ebe
Changes to the sudio system:
...
- 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-07-27 01:16:32 +00:00
thorpej
11e78a6b0d
Pull thorpej-bus-dma branch into mainline.
1997-06-06 23:43:45 +00:00
mycroft
9a7f1bfa84
Use single mode, not demand mode, for auto-initialize transfers.
1997-05-29 21:46:07 +00:00
mycroft
e9028468cd
Don't use the TC bit to check for wraparound in isa_dmacount(); remember the
...
transfer length and use that.
1997-05-28 20:02:39 +00:00
mycroft
188dec4d19
Clean up a bit, and export isa_dmamask() and isa_dmaunmask() interfaces.
1997-03-21 02:17:11 +00:00
mycroft
3523bc35d5
Add an isa_dmacount() function, to get the current residual count on a channel.
1997-03-21 00:00:21 +00:00
christos
86373f8cf9
backout kprintf changes
1996-10-13 01:37:04 +00:00
christos
58953408cb
printf -> kprintf, sprintf -> ksprintf
1996-10-10 22:04:48 +00:00
christos
e8a8a6298c
- prototype fixes
1996-04-29 20:02:32 +00:00
mycroft
004f5e8d39
Fix a slight biff with 16-bit DMA in last change.
1996-03-31 20:51:43 +00:00
mycroft
d8026ad9ef
Oops; switched two bits.
1996-03-01 04:35:27 +00:00
mycroft
f3b29ca5d2
Remove two unneeded `if's.
1996-03-01 04:13:25 +00:00
mycroft
546ad9e88b
Add support to the ISA DMA framework for auto-initialize mode.
...
Add experimental SB16 code, disabled for now.
1996-03-01 04:08:13 +00:00
mycroft
3ec5928403
Keep the terminal count information around, as it's self-clearing.
1996-02-22 06:21:48 +00:00
mycroft
4d6412e7bf
Move the terminal count check into a separate function.
1996-02-20 04:17:05 +00:00
cgd
8a640328ed
clean up several ISA device interfaces: autoconfiguration, header
...
inclusion, and interrupt configuration. more work still needs to be done,
but it's getting better...
1995-04-17 12:06:30 +00:00
mycroft
e25c1817cf
kernel_pmap --> pmap_kernel()
1995-04-10 13:08:28 +00:00
mycroft
61800cfa25
Convert port, IRQ, and DRQ numbers to ints.
1994-11-18 22:07:32 +00:00
mycroft
854d8d96dc
Rearrange slightly.
1994-11-04 19:25:34 +00:00
cgd
022ee8f7fe
new RCS ID format.
1994-10-27 04:14:23 +00:00
cgd
057dc4deec
quiet compiler warnings
1994-05-23 03:02:13 +00:00
mycroft
2f66816d8b
Rename two files.
1994-04-24 01:34:05 +00:00
mycroft
221b25fd9d
Separate DMA functions.
1994-04-22 22:58:50 +00:00
mycroft
3810963ed5
Add at_setup_dmachan(). Minor cleanup.
1993-10-22 20:24:14 +00:00
mycroft
6067dc9ea8
Minor cleanup.
1993-10-17 05:34:23 +00:00
mycroft
c73d85d341
Panic if DMA with odd length attempted on a 16-bit channel.
1993-10-16 03:55:59 +00:00
mycroft
4f94812b29
New file with DMA code from isa.c, modified to check for some errors.
1993-10-14 05:22:57 +00:00