Merge from vendor branch LIBPCAP:
[dragonfly.git] / sys / dev / video / bktr / bktr_mem.h
1 /* $FreeBSD: src/sys/dev/bktr/bktr_mem.h,v 1.1.2.1 2000/09/11 08:24:41 roger Exp $ */
2 /* $DragonFly: src/sys/dev/video/bktr/bktr_mem.h,v 1.2 2003/06/17 04:28:23 dillon Exp $ */
3
4 /*
5  * This is prt of the Driver for Video Capture Cards (Frame grabbers)
6  * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879
7  * chipset.
8  * Copyright Roger Hardiman.
9  *
10  * bktr_mem : This kernel module allows us to keep our allocated
11  *            contiguous memory for the video buffer, DMA programs and VBI data
12  *            while the main bktr driver is unloaded and reloaded.
13  *            This avoids the problem of trying to allocate contiguous each
14  *            time the bktr driver is loaded.
15  */
16
17 /*
18  * 1. Redistributions of source code must retain the
19  * Copyright (c) 2000 Roger Hardiman
20  * All rights reserved.
21  *
22  * Redistribution and use in source and binary forms, with or without
23  * modification, are permitted provided that the following conditions
24  * are met:
25  * 1. Redistributions of source code must retain the above copyright
26  *    notice, this list of conditions and the following disclaimer.
27  * 2. Redistributions in binary form must reproduce the above copyright
28  *    notice, this list of conditions and the following disclaimer in the
29  *    documentation and/or other materials provided with the distribution.
30  * 3. All advertising materials mentioning features or use of this software
31  *    must display the following acknowledgement:
32  *      This product includes software developed by Roger Hardiman
33  * 4. The name of the author may not be used to endorse or promote products
34  *    derived from this software without specific prior written permission.
35  *
36  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
37  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
38  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
40  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
41  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
42  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
43  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
44  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
45  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
46  * POSSIBILITY OF SUCH DAMAGE.
47  */
48
49
50 /* Support this number of devices */
51 #define BKTR_MEM_MAX_DEVICES    8
52
53 /* Define a name for each block of memory we need to keep hold of */
54 #define BKTR_MEM_DMA_PROG       1
55 #define BKTR_MEM_ODD_DMA_PROG   2
56 #define BKTR_MEM_VBIDATA        3
57 #define BKTR_MEM_VBIBUFFER      4
58 #define BKTR_MEM_BUF            5
59
60 /* Prototypes */
61 int         bktr_has_stored_addresses(int unit);
62 void        bktr_store_address(int unit, int type, vm_offset_t addr);
63 vm_offset_t bktr_retrieve_address(int unit, int type);
64