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