-/* $OpenBSD: bus.h,v 1.23 2014/03/29 18:09:29 guenther Exp $ */
+/* $OpenBSD: bus.h,v 1.24 2015/01/24 20:59:42 kettenis Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom. All rights reserved.
*/
int (*_dmamem_alloc)(bus_dma_tag_t, bus_size_t, bus_size_t,
bus_size_t, bus_dma_segment_t *, int, int *, int);
+ int (*_dmamem_alloc_range)(bus_dma_tag_t, bus_size_t, bus_size_t,
+ bus_size_t, bus_dma_segment_t *, int, int *, int,
+ bus_addr_t, bus_addr_t);
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);
#define bus_dmamem_alloc(t, s, a, b, sg, n, r, f) \
(*(t)->_dmamem_alloc)((t)->_cookie, (s), (a), (b), (sg), (n), (r), (f))
+#define bus_dmamem_alloc_range(t, s, a, b, sg, n, r, f, l, h) \
+ (*(t)->_dmamem_alloc_range)((t), (s), (a), (b), (sg), \
+ (n), (r), (f), (l), (h))
#define bus_dmamem_free(t, sg, n) \
(*(t)->_dmamem_free)((t)->_cookie, (sg), (n))
#define bus_dmamem_map(t, sg, n, s, k, f) \
int _dmamem_alloc(bus_dma_tag_t, bus_size_t, bus_size_t,
bus_size_t, bus_dma_segment_t *, int, int *, int);
+int _dmamem_alloc_range( bus_dma_tag_t, bus_size_t, bus_size_t,
+ bus_size_t, bus_dma_segment_t *, int, int *, int,
+ bus_addr_t, bus_addr_t);
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);
-/* $OpenBSD: pci_machdep.c,v 1.3 2014/04/26 14:26:48 mpi Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.4 2015/01/24 20:59:42 kettenis Exp $ */
/*
* Copyright (c) 2013 Martin Pieuchot
_dmamap_unload,
_dmamap_sync,
_dmamem_alloc,
+ _dmamem_alloc_range,
_dmamem_free,
_dmamem_map,
_dmamem_unmap,
-/* $OpenBSD: bus_dma.c,v 1.1 2015/01/20 17:08:35 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.2 2015/01/24 20:59:42 kettenis Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
#include <machine/bus.h>
-int _dmamem_alloc_range( bus_dma_tag_t t, bus_size_t size,
- bus_size_t alignment, bus_size_t boundary, bus_dma_segment_t *segs,
- int nsegs, int *rsegs, int flags, vaddr_t low, vaddr_t high);
int _dmamap_load_buffer(bus_dma_tag_t, bus_dmamap_t, void *, bus_size_t,
struct proc *, int, bus_addr_t *, int *, int);
/*
int
_dmamem_alloc_range(bus_dma_tag_t t, bus_size_t size, bus_size_t alignment,
bus_size_t boundary, bus_dma_segment_t *segs, int nsegs, int *rsegs,
- int flags, vaddr_t low, vaddr_t high)
+ int flags, bus_addr_t low, bus_addr_t high)
{
vaddr_t curaddr, lastaddr;
struct vm_page *m;
-/* $OpenBSD: ehci_obio.c,v 1.4 2014/05/19 13:11:31 mpi Exp $ */
+/* $OpenBSD: ehci_obio.c,v 1.5 2015/01/24 20:59:42 kettenis Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
_dmamap_unload,
_dmamap_sync,
_dmamem_alloc,
+ _dmamem_alloc_range,
_dmamem_free,
_dmamem_map,
_dmamem_unmap,
-/* $OpenBSD: bus.h,v 1.10 2015/01/20 17:08:35 mpi Exp $ */
+/* $OpenBSD: bus.h,v 1.11 2015/01/24 20:59:42 kettenis Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom. All rights reserved.
*/
int (*_dmamem_alloc)(bus_dma_tag_t, bus_size_t, bus_size_t,
bus_size_t, bus_dma_segment_t *, int, int *, int);
+ int (*_dmamem_alloc_range)(bus_dma_tag_t, bus_size_t, bus_size_t,
+ bus_size_t, bus_dma_segment_t *, int, int *, int,
+ bus_addr_t, bus_addr_t);
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);
#define bus_dmamem_alloc(t, s, a, b, sg, n, r, f) \
(*(t)->_dmamem_alloc)((t)->_cookie, (s), (a), (b), (sg), (n), (r), (f))
+#define bus_dmamem_alloc_range(t, s, a, b, sg, n, r, f, l, h) \
+ (*(t)->_dmamem_alloc_range)((t), (s), (a), (b), (sg), \
+ (n), (r), (f), (l), (h))
#define bus_dmamem_free(t, sg, n) \
(*(t)->_dmamem_free)((t)->_cookie, (sg), (n))
#define bus_dmamem_map(t, sg, n, s, k, f) \
int _dmamem_alloc(bus_dma_tag_t, bus_size_t, bus_size_t,
bus_size_t, bus_dma_segment_t *, int, int *, int);
+int _dmamem_alloc_range( bus_dma_tag_t, bus_size_t, bus_size_t,
+ bus_size_t, bus_dma_segment_t *, int, int *, int,
+ bus_addr_t, bus_addr_t);
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);
-/* $OpenBSD: mainbus.c,v 1.5 2010/03/25 19:42:55 deraadt Exp $ */
+/* $OpenBSD: mainbus.c,v 1.6 2015/01/24 20:59:42 kettenis Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
_dmamap_unload,
_dmamap_sync,
_dmamem_alloc,
+ _dmamem_alloc_range,
_dmamem_free,
_dmamem_map,
_dmamem_unmap,