165692Sroger/* $FreeBSD: releng/10.2/sys/dev/bktr/bktr_mem.h 139749 2005-01-06 01:43:34Z imp $ */
265692Sroger
365692Sroger/*
465692Sroger * This is prt of the Driver for Video Capture Cards (Frame grabbers)
565692Sroger * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879
665692Sroger * chipset.
765692Sroger * Copyright Roger Hardiman.
865692Sroger *
965692Sroger * bktr_mem : This kernel module allows us to keep our allocated
1065692Sroger *            contiguous memory for the video buffer, DMA programs and VBI data
1165692Sroger *            while the main bktr driver is unloaded and reloaded.
1265692Sroger *            This avoids the problem of trying to allocate contiguous each
1365692Sroger *            time the bktr driver is loaded.
1465692Sroger */
1565692Sroger
16139749Simp/*-
1765692Sroger * 1. Redistributions of source code must retain the
1865692Sroger * Copyright (c) 2000 Roger Hardiman
1965692Sroger * All rights reserved.
2065692Sroger *
2165692Sroger * Redistribution and use in source and binary forms, with or without
2265692Sroger * modification, are permitted provided that the following conditions
2365692Sroger * are met:
2465692Sroger * 1. Redistributions of source code must retain the above copyright
2565692Sroger *    notice, this list of conditions and the following disclaimer.
2665692Sroger * 2. Redistributions in binary form must reproduce the above copyright
2765692Sroger *    notice, this list of conditions and the following disclaimer in the
2865692Sroger *    documentation and/or other materials provided with the distribution.
2965692Sroger * 3. All advertising materials mentioning features or use of this software
3065692Sroger *    must display the following acknowledgement:
3165692Sroger *      This product includes software developed by Roger Hardiman
3265692Sroger * 4. The name of the author may not be used to endorse or promote products
3365692Sroger *    derived from this software without specific prior written permission.
3465692Sroger *
3565692Sroger * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
3665692Sroger * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3765692Sroger * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3865692Sroger * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
3965692Sroger * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4065692Sroger * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4165692Sroger * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4265692Sroger * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
4365692Sroger * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
4465692Sroger * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4565692Sroger * POSSIBILITY OF SUCH DAMAGE.
4665692Sroger */
4765692Sroger
4865692Sroger
4965692Sroger/* Support this number of devices */
5065692Sroger#define BKTR_MEM_MAX_DEVICES	8
5165692Sroger
5265692Sroger/* Define a name for each block of memory we need to keep hold of */
5365692Sroger#define BKTR_MEM_DMA_PROG       1
5465692Sroger#define BKTR_MEM_ODD_DMA_PROG   2
5565692Sroger#define BKTR_MEM_VBIDATA        3
5665692Sroger#define BKTR_MEM_VBIBUFFER      4
5765692Sroger#define BKTR_MEM_BUF            5
5865692Sroger
5965692Sroger/* Prototypes */
6065692Srogerint         bktr_has_stored_addresses(int unit);
6165692Srogervoid        bktr_store_address(int unit, int type, vm_offset_t addr);
6265692Srogervm_offset_t bktr_retrieve_address(int unit, int type);
6365692Sroger
64