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