bktr_mem.h revision 331722
1130812Smarcel/* $FreeBSD: stable/11/sys/dev/bktr/bktr_mem.h 331722 2018-03-29 02:50:57Z eadler $ */
2130812Smarcel
3130812Smarcel/*
4130812Smarcel * This is prt of the Driver for Video Capture Cards (Frame grabbers)
5130812Smarcel * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879
6130812Smarcel * chipset.
7130812Smarcel * Copyright Roger Hardiman.
8130812Smarcel *
9130812Smarcel * bktr_mem : This kernel module allows us to keep our allocated
10130812Smarcel *            contiguous memory for the video buffer, DMA programs and VBI data
11130812Smarcel *            while the main bktr driver is unloaded and reloaded.
12130812Smarcel *            This avoids the problem of trying to allocate contiguous each
13130812Smarcel *            time the bktr driver is loaded.
14130812Smarcel */
15130812Smarcel
16130812Smarcel/*-
17130812Smarcel * 1. Redistributions of source code must retain the
18130812Smarcel * Copyright (c) 2000 Roger Hardiman
19130812Smarcel * All rights reserved.
20130812Smarcel *
21130812Smarcel * Redistribution and use in source and binary forms, with or without
22130812Smarcel * modification, are permitted provided that the following conditions
23130812Smarcel * are met:
24130812Smarcel * 1. Redistributions of source code must retain the above copyright
25130812Smarcel *    notice, this list of conditions and the following disclaimer.
26130812Smarcel * 2. Redistributions in binary form must reproduce the above copyright
27130812Smarcel *    notice, this list of conditions and the following disclaimer in the
28130812Smarcel *    documentation and/or other materials provided with the distribution.
29130812Smarcel * 3. All advertising materials mentioning features or use of this software
30130812Smarcel *    must display the following acknowledgement:
31130812Smarcel *      This product includes software developed by Roger Hardiman
32130812Smarcel * 4. The name of the author may not be used to endorse or promote products
33130812Smarcel *    derived from this software without specific prior written permission.
34130812Smarcel *
35130812Smarcel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
36130812Smarcel * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
37130812Smarcel * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38130812Smarcel * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
39130812Smarcel * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
40130812Smarcel * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
41130812Smarcel * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
42130812Smarcel * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
43130812Smarcel * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
44130812Smarcel * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
45130812Smarcel * POSSIBILITY OF SUCH DAMAGE.
46130812Smarcel */
47130812Smarcel
48130812Smarcel
49130812Smarcel/* Support this number of devices */
50130812Smarcel#define BKTR_MEM_MAX_DEVICES	8
51130812Smarcel
52130812Smarcel/* Define a name for each block of memory we need to keep hold of */
53130812Smarcel#define BKTR_MEM_DMA_PROG       1
54130812Smarcel#define BKTR_MEM_ODD_DMA_PROG   2
55130812Smarcel#define BKTR_MEM_VBIDATA        3
56130812Smarcel#define BKTR_MEM_VBIBUFFER      4
57130812Smarcel#define BKTR_MEM_BUF            5
58130812Smarcel
59130812Smarcel/* Prototypes */
60130812Smarcelint         bktr_has_stored_addresses(int unit);
61130812Smarcelvoid        bktr_store_address(int unit, int type, vm_offset_t addr);
62130812Smarcelvm_offset_t bktr_retrieve_address(int unit, int type);
63130812Smarcel
64130812Smarcel