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