1a0685571Swiz /* $SourceForge: bktr_mem.h,v 1.2 2003/03/11 23:11:25 thomasklausner Exp $ */ 29732164fSwiz 3*0cdd0c66Swiz /* $NetBSD: bktr_mem.h,v 1.2 2003/03/12 00:14:41 wiz Exp $ */ 4a0685571Swiz /* $FreeBSD: src/sys/dev/bktr/bktr_mem.h,v 1.1 2000/09/10 14:34:08 roger Exp$ */ 59732164fSwiz 69732164fSwiz /* 79732164fSwiz * This is prt of the Driver for Video Capture Cards (Frame grabbers) 89732164fSwiz * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 99732164fSwiz * chipset. 109732164fSwiz * Copyright Roger Hardiman. 119732164fSwiz * 129732164fSwiz * bktr_mem : This kernel module allows us to keep our allocated 139732164fSwiz * contiguous memory for the video buffer, DMA programs and VBI data 149732164fSwiz * while the main bktr driver is unloaded and reloaded. 159732164fSwiz * This avoids the problem of trying to allocate contiguous each 169732164fSwiz * time the bktr driver is loaded. 179732164fSwiz */ 189732164fSwiz 199732164fSwiz /* 209732164fSwiz * 1. Redistributions of source code must retain the 219732164fSwiz * Copyright (c) 2000 Roger Hardiman 229732164fSwiz * All rights reserved. 239732164fSwiz * 249732164fSwiz * Redistribution and use in source and binary forms, with or without 259732164fSwiz * modification, are permitted provided that the following conditions 269732164fSwiz * are met: 279732164fSwiz * 1. Redistributions of source code must retain the above copyright 289732164fSwiz * notice, this list of conditions and the following disclaimer. 299732164fSwiz * 2. Redistributions in binary form must reproduce the above copyright 309732164fSwiz * notice, this list of conditions and the following disclaimer in the 319732164fSwiz * documentation and/or other materials provided with the distribution. 329732164fSwiz * 3. All advertising materials mentioning features or use of this software 339732164fSwiz * must display the following acknowledgement: 349732164fSwiz * This product includes software developed by Roger Hardiman 359732164fSwiz * 4. The name of the author may not be used to endorse or promote products 369732164fSwiz * derived from this software without specific prior written permission. 379732164fSwiz * 389732164fSwiz * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 399732164fSwiz * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 409732164fSwiz * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 419732164fSwiz * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 429732164fSwiz * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 439732164fSwiz * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 449732164fSwiz * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 459732164fSwiz * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 469732164fSwiz * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 479732164fSwiz * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 489732164fSwiz * POSSIBILITY OF SUCH DAMAGE. 499732164fSwiz */ 509732164fSwiz 519732164fSwiz 529732164fSwiz /* Support this number of devices */ 539732164fSwiz #define BKTR_MEM_MAX_DEVICES 8 549732164fSwiz 559732164fSwiz /* Define a name for each block of memory we need to keep hold of */ 569732164fSwiz #define BKTR_MEM_DMA_PROG 1 579732164fSwiz #define BKTR_MEM_ODD_DMA_PROG 2 589732164fSwiz #define BKTR_MEM_VBIDATA 3 599732164fSwiz #define BKTR_MEM_VBIBUFFER 4 609732164fSwiz #define BKTR_MEM_BUF 5 619732164fSwiz 629732164fSwiz /* Prototypes */ 639732164fSwiz int bktr_has_stored_addresses(int unit); 649732164fSwiz void bktr_store_address(int unit, int type, vm_offset_t addr); 659732164fSwiz vm_offset_t bktr_retrieve_address(int unit, int type); 669732164fSwiz 67