1 /***************************************************************************
2 * Copyright (c) 2005-2009, Broadcom Corporation.
4 * Name: crystalhd_lnx . c
7 * BCM70012 Linux driver
11 **********************************************************************
12 * This file is part of the crystalhd device driver.
14 * This driver is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, version 2 of the License.
18 * This driver is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this driver. If not, see <http://www.gnu.org/licenses/>.
25 **********************************************************************/
27 #ifndef _CRYSTALHD_LNX_H_
28 #define _CRYSTALHD_LNX_H_
30 #include <linux/module.h>
31 #include <linux/kernel.h>
32 #include <linux/errno.h>
33 #include <linux/string.h>
35 #include <linux/tty.h>
36 #include <linux/slab.h>
37 #include <linux/delay.h>
39 #include <linux/pci.h>
40 #include <linux/init.h>
41 #include <linux/interrupt.h>
42 #include <linux/pagemap.h>
46 #include <asm/pgtable.h>
47 #include <asm/system.h>
48 #include <asm/uaccess.h>
50 #include "crystalhd_cmds.h"
52 #define CRYSTAL_HD_NAME "Broadcom Crystal HD Decoder (BCM70012) Driver"
55 /* OS specific PCI information structure and adapter information. */
56 struct crystalhd_adp
{
57 /* Hardware borad/PCI specifics */
61 unsigned long pci_mem_start
;
65 unsigned long pci_i2o_start
;
69 unsigned int drv_data
;
70 unsigned int dmabits
; /* 32 | 64 */
71 unsigned int registered
;
78 unsigned int chd_dec_major
;
79 unsigned int cfg_users
;
81 crystalhd_ioctl_data
*idata_free_head
; /* ioctl data pool */
82 crystalhd_elem_t
*elem_pool_head
; /* Queue element pool */
84 struct crystalhd_cmd cmds
;
86 crystalhd_dio_req
*ua_map_free_head
;
87 struct pci_pool
*fill_byte_pool
;
91 struct crystalhd_adp
*chd_get_adp(void);
92 void chd_set_log_level(struct crystalhd_adp
*adp
, char *arg
);