diff options
Diffstat (limited to 'sys/arch/i386/include/bus.h')
-rw-r--r-- | sys/arch/i386/include/bus.h | 186 |
1 files changed, 93 insertions, 93 deletions
diff --git a/sys/arch/i386/include/bus.h b/sys/arch/i386/include/bus.h index 3ac591f0149..7ab5bc7ef48 100644 --- a/sys/arch/i386/include/bus.h +++ b/sys/arch/i386/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.32 2002/03/07 18:08:08 jason Exp $ */ +/* $OpenBSD: bus.h,v 1.33 2002/03/14 01:26:33 millert Exp $ */ /* $NetBSD: bus.h,v 1.6 1996/11/10 03:19:25 thorpej Exp $ */ /*- @@ -93,26 +93,26 @@ typedef u_long bus_size_t; typedef int bus_space_tag_t; typedef u_long bus_space_handle_t; -int bus_space_map __P((bus_space_tag_t t, bus_addr_t addr, - bus_size_t size, int cacheable, bus_space_handle_t *bshp)); +int bus_space_map(bus_space_tag_t t, bus_addr_t addr, + bus_size_t size, int cacheable, bus_space_handle_t *bshp); /* like bus_space_map(), but without extent map checking/allocation */ -int _bus_space_map __P((bus_space_tag_t t, bus_addr_t addr, - bus_size_t size, int cacheable, bus_space_handle_t *bshp)); -void bus_space_unmap __P((bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t size)); -int bus_space_subregion __P((bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp)); - -int bus_space_alloc __P((bus_space_tag_t t, bus_addr_t rstart, +int _bus_space_map(bus_space_tag_t t, bus_addr_t addr, + bus_size_t size, int cacheable, bus_space_handle_t *bshp); +void bus_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, + bus_size_t size); +int bus_space_subregion(bus_space_tag_t t, bus_space_handle_t bsh, + bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp); + +int bus_space_alloc(bus_space_tag_t t, bus_addr_t rstart, bus_addr_t rend, bus_size_t size, bus_size_t align, bus_size_t boundary, int cacheable, bus_addr_t *addrp, - bus_space_handle_t *bshp)); -void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t size)); + bus_space_handle_t *bshp); +void bus_space_free(bus_space_tag_t t, bus_space_handle_t bsh, + bus_size_t size); /* - * u_intN_t bus_space_read_N __P((bus_space_tag_t tag, - * bus_space_handle_t bsh, bus_size_t offset)); + * u_intN_t bus_space_read_N(bus_space_tag_t tag, + * bus_space_handle_t bsh, bus_size_t offset); * * Read a 1, 2, 4, or 8 byte quantity from bus space * described by tag/handle/offset. @@ -135,9 +135,9 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #endif /* - * void bus_space_read_multi_N __P((bus_space_tag_t tag, + * void bus_space_read_multi_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * u_intN_t *addr, size_t count)); + * u_intN_t *addr, size_t count); * * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle/offset and copy into buffer provided. @@ -190,9 +190,9 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #endif /* - * void bus_space_read_raw_multi_N __P((bus_space_tag_t tag, + * void bus_space_read_raw_multi_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * u_int8_t *addr, size_t count)); + * u_int8_t *addr, size_t count); * * Read `count' bytes in 2, 4 or 8 byte wide quantities from bus space * described by tag/handle/offset and copy into buffer provided. The buffer @@ -211,9 +211,9 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #endif /* - * void bus_space_read_region_N __P((bus_space_tag_t tag, + * void bus_space_read_region_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * u_intN_t *addr, size_t count)); + * u_intN_t *addr, size_t count); * * Read `count' 1, 2, 4, or 8 byte quantities from bus space * described by tag/handle and starting at `offset' and copy into @@ -270,9 +270,9 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #endif /* - * void bus_space_read_raw_region_N __P((bus_space_tag_t tag, + * void bus_space_read_raw_region_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * u_int8_t *addr, size_t count)); + * u_int8_t *addr, size_t count); * * Read `count' bytes in 2, 4 or 8 byte wide quantities from bus space * described by tag/handle and starting at `offset' and copy into @@ -292,9 +292,9 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #endif /* - * void bus_space_write_N __P((bus_space_tag_t tag, + * void bus_space_write_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * u_intN_t value)); + * u_intN_t value); * * Write the 1, 2, 4, or 8 byte value `value' to bus space * described by tag/handle/offset. @@ -326,9 +326,9 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #endif /* - * void bus_space_write_multi_N __P((bus_space_tag_t tag, + * void bus_space_write_multi_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * const u_intN_t *addr, size_t count)); + * const u_intN_t *addr, size_t count); * * Write `count' 1, 2, 4, or 8 byte quantities from the buffer * provided to bus space described by tag/handle/offset. @@ -382,9 +382,9 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #endif /* - * void bus_space_write_raw_multi_N __P((bus_space_tag_t tag, + * void bus_space_write_raw_multi_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * const u_int8_t *addr, size_t count)); + * const u_int8_t *addr, size_t count); * * Write `count' bytes in 2, 4 or 8 byte wide quantities from the buffer * provided to bus space described by tag/handle/offset. The buffer @@ -403,9 +403,9 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #endif /* - * void bus_space_write_region_N __P((bus_space_tag_t tag, + * void bus_space_write_region_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * const u_intN_t *addr, size_t count)); + * const u_intN_t *addr, size_t count); * * Write `count' 1, 2, 4, or 8 byte quantities from the buffer provided * to bus space described by tag/handle starting at `offset'. @@ -462,9 +462,9 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #endif /* - * void bus_space_write_raw_region_N __P((bus_space_tag_t tag, + * void bus_space_write_raw_region_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * const u_int8_t *addr, size_t count)); + * const u_int8_t *addr, size_t count); * * Write `count' bytes in 2, 4 or 8 byte wide quantities to bus space * described by tag/handle and starting at `offset' from the @@ -484,9 +484,9 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #endif /* - * void bus_space_set_multi_N __P((bus_space_tag_t tag, + * void bus_space_set_multi_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * u_intN_t val, size_t count)); + * u_intN_t val, size_t count); * * Write the 1, 2, 4, or 8 byte value `val' to bus space described * by tag/handle/offset `count' times. @@ -555,9 +555,9 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #endif /* - * void bus_space_set_region_N __P((bus_space_tag_t tag, + * void bus_space_set_region_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * u_intN_t val, size_t count)); + * u_intN_t val, size_t count); * * Write `count' 1, 2, 4, or 8 byte value `val' to bus space described * by tag/handle starting at `offset'. @@ -626,10 +626,10 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, #endif /* - * void bus_space_copy_N __P((bus_space_tag_t tag, + * void bus_space_copy_N(bus_space_tag_t tag, * bus_space_handle_t bsh1, bus_size_t off1, * bus_space_handle_t bsh2, bus_size_t off2, - * size_t count)); + * size_t count); * * Copy `count' 1, 2, 4, or 8 byte values from bus space starting * at tag/bsh1/off1 to bus space starting at tag/bsh2/off2. @@ -714,9 +714,9 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh, /* * Bus read/write barrier methods. * - * void bus_space_barrier __P((bus_space_tag_t tag, + * void bus_space_barrier(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, - * bus_size_t len, int flags)); + * bus_size_t len, int flags); * * Note: the i386 does not currently require barriers, but we must * provide the flags to MI code. @@ -785,33 +785,33 @@ struct i386_bus_dma_tag { /* * DMA mapping methods. */ - int (*_dmamap_create) __P((bus_dma_tag_t, bus_size_t, int, - bus_size_t, bus_size_t, int, bus_dmamap_t *)); - void (*_dmamap_destroy) __P((bus_dma_tag_t, bus_dmamap_t)); - int (*_dmamap_load) __P((bus_dma_tag_t, bus_dmamap_t, void *, - bus_size_t, struct proc *, int)); - int (*_dmamap_load_mbuf) __P((bus_dma_tag_t, bus_dmamap_t, - struct mbuf *, int)); - int (*_dmamap_load_uio) __P((bus_dma_tag_t, bus_dmamap_t, - struct uio *, int)); - int (*_dmamap_load_raw) __P((bus_dma_tag_t, bus_dmamap_t, - bus_dma_segment_t *, int, bus_size_t, int)); - void (*_dmamap_unload) __P((bus_dma_tag_t, bus_dmamap_t)); - void (*_dmamap_sync) __P((bus_dma_tag_t, bus_dmamap_t, - bus_addr_t, bus_size_t, int)); + int (*_dmamap_create)(bus_dma_tag_t, bus_size_t, int, + bus_size_t, bus_size_t, int, bus_dmamap_t *); + void (*_dmamap_destroy)(bus_dma_tag_t, bus_dmamap_t); + int (*_dmamap_load)(bus_dma_tag_t, bus_dmamap_t, void *, + bus_size_t, struct proc *, int); + int (*_dmamap_load_mbuf)(bus_dma_tag_t, bus_dmamap_t, + struct mbuf *, int); + int (*_dmamap_load_uio)(bus_dma_tag_t, bus_dmamap_t, + struct uio *, int); + int (*_dmamap_load_raw)(bus_dma_tag_t, bus_dmamap_t, + bus_dma_segment_t *, int, bus_size_t, int); + void (*_dmamap_unload)(bus_dma_tag_t, bus_dmamap_t); + void (*_dmamap_sync)(bus_dma_tag_t, bus_dmamap_t, + bus_addr_t, bus_size_t, int); /* * DMA memory utility functions. */ - int (*_dmamem_alloc) __P((bus_dma_tag_t, bus_size_t, bus_size_t, - bus_size_t, bus_dma_segment_t *, int, int *, int)); - void (*_dmamem_free) __P((bus_dma_tag_t, - bus_dma_segment_t *, int)); - int (*_dmamem_map) __P((bus_dma_tag_t, bus_dma_segment_t *, - int, size_t, caddr_t *, int)); - void (*_dmamem_unmap) __P((bus_dma_tag_t, caddr_t, size_t)); - paddr_t (*_dmamem_mmap) __P((bus_dma_tag_t, bus_dma_segment_t *, - int, off_t, int, int)); + int (*_dmamem_alloc)(bus_dma_tag_t, bus_size_t, bus_size_t, + bus_size_t, bus_dma_segment_t *, int, int *, int); + void (*_dmamem_free)(bus_dma_tag_t, + bus_dma_segment_t *, int); + int (*_dmamem_map)(bus_dma_tag_t, bus_dma_segment_t *, + int, size_t, caddr_t *, int); + void (*_dmamem_unmap)(bus_dma_tag_t, caddr_t, size_t); + paddr_t (*_dmamem_mmap)(bus_dma_tag_t, bus_dma_segment_t *, + int, off_t, int, int); }; #define bus_dmamap_create(t, s, n, m, b, f, p) \ @@ -869,37 +869,37 @@ struct i386_bus_dmamap { }; #ifdef _I386_BUS_DMA_PRIVATE -int _bus_dmamap_create __P((bus_dma_tag_t, bus_size_t, int, bus_size_t, - bus_size_t, int, bus_dmamap_t *)); -void _bus_dmamap_destroy __P((bus_dma_tag_t, bus_dmamap_t)); -int _bus_dmamap_load __P((bus_dma_tag_t, bus_dmamap_t, void *, - bus_size_t, struct proc *, int)); -int _bus_dmamap_load_mbuf __P((bus_dma_tag_t, bus_dmamap_t, - struct mbuf *, int)); -int _bus_dmamap_load_uio __P((bus_dma_tag_t, bus_dmamap_t, - struct uio *, int)); -int _bus_dmamap_load_raw __P((bus_dma_tag_t, bus_dmamap_t, - bus_dma_segment_t *, int, bus_size_t, int)); -void _bus_dmamap_unload __P((bus_dma_tag_t, bus_dmamap_t)); -void _bus_dmamap_sync __P((bus_dma_tag_t, bus_dmamap_t, bus_addr_t, - bus_size_t, int)); - -int _bus_dmamem_alloc __P((bus_dma_tag_t tag, bus_size_t size, +int _bus_dmamap_create(bus_dma_tag_t, bus_size_t, int, bus_size_t, + bus_size_t, int, bus_dmamap_t *); +void _bus_dmamap_destroy(bus_dma_tag_t, bus_dmamap_t); +int _bus_dmamap_load(bus_dma_tag_t, bus_dmamap_t, void *, + bus_size_t, struct proc *, int); +int _bus_dmamap_load_mbuf(bus_dma_tag_t, bus_dmamap_t, + struct mbuf *, int); +int _bus_dmamap_load_uio(bus_dma_tag_t, bus_dmamap_t, + struct uio *, int); +int _bus_dmamap_load_raw(bus_dma_tag_t, bus_dmamap_t, + bus_dma_segment_t *, int, bus_size_t, int); +void _bus_dmamap_unload(bus_dma_tag_t, bus_dmamap_t); +void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_addr_t, + bus_size_t, int); + +int _bus_dmamem_alloc(bus_dma_tag_t tag, bus_size_t size, bus_size_t alignment, bus_size_t boundary, - bus_dma_segment_t *segs, int nsegs, int *rsegs, int flags)); -void _bus_dmamem_free __P((bus_dma_tag_t tag, bus_dma_segment_t *segs, - int nsegs)); -int _bus_dmamem_map __P((bus_dma_tag_t tag, bus_dma_segment_t *segs, - int nsegs, size_t size, caddr_t *kvap, int flags)); -void _bus_dmamem_unmap __P((bus_dma_tag_t tag, caddr_t kva, - size_t size)); -paddr_t _bus_dmamem_mmap __P((bus_dma_tag_t tag, bus_dma_segment_t *segs, - int nsegs, off_t off, int prot, int flags)); - -int _bus_dmamem_alloc_range __P((bus_dma_tag_t tag, bus_size_t size, + bus_dma_segment_t *segs, int nsegs, int *rsegs, int flags); +void _bus_dmamem_free(bus_dma_tag_t tag, bus_dma_segment_t *segs, + int nsegs); +int _bus_dmamem_map(bus_dma_tag_t tag, bus_dma_segment_t *segs, + int nsegs, size_t size, caddr_t *kvap, int flags); +void _bus_dmamem_unmap(bus_dma_tag_t tag, caddr_t kva, + size_t size); +paddr_t _bus_dmamem_mmap(bus_dma_tag_t tag, bus_dma_segment_t *segs, + int nsegs, off_t off, int prot, int flags); + +int _bus_dmamem_alloc_range(bus_dma_tag_t tag, bus_size_t size, bus_size_t alignment, bus_size_t boundary, bus_dma_segment_t *segs, int nsegs, int *rsegs, int flags, - vm_offset_t low, vm_offset_t high)); + vm_offset_t low, vm_offset_t high); #endif /* _I386_BUS_DMA_PRIVATE */ #endif /* _I386_BUS_H_ */ |