-
Notifications
You must be signed in to change notification settings - Fork 3
/
pt3_misc.h
81 lines (64 loc) · 1.7 KB
/
pt3_misc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#ifndef __PT3_MISC_H__
#define __PT3_MISC_H__
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/bus.h>
#include <sys/condvar.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <machine/bus.h>
#include <machine/resource.h>
#include <sys/rman.h>
#define ssize_t size_t
#define pt3_vzalloc(A) malloc(A,M_DEVBUF,M_NOWAIT)
#define vzalloc(A) malloc(A,M_DEVBUF,M_NOWAIT)
#define kzalloc(A,B) malloc(A,M_DEVBUF,M_NOWAIT)
#define vfree(A) free(A,M_DEVBUF)
#define kfree(A) free(A,M_DEVBUF)
#define __u32 uint32_t
#define __u8 uint8_t
#define __u16 uint16_t
#define __u64 uint64_t
#define __s32 int32_t
#define dma_addr_t uint32_t
#define __user
#define loff_t off_t
#define likely(a) a
#define unlikely(a) a
#define INIT_DUMMY_RESET 0x0c
#define msecs_to_jiffies(ms) MSTOTICK(ms)
#define schedule_timeout_interruptible(A) ptx_pause("pt3",A)
#define do_gettimeofday(time) microtime(time)
#include "pt3_com.h"
#include "pt3_pci.h"
#include "pt3_bus.h"
#include "pt3_i2c.h"
#include "pt3_tc.h"
#include "pt3_qm.h"
#include "pt3_mx.h"
#include "pt3_dma.h"
typedef struct _PT3_TUNER {
int tuner_no;
PT3_TC *tc_s;
PT3_TC *tc_t;
PT3_QM *qm;
PT3_MX *mx;
int issleep[2]; /* ISDB-T & S sleep status(issleep used pt3_pci.c), qm/mx->sleep ?? */
} PT3_TUNER;
typedef struct _PT3_CHANNEL PT3_CHANNEL;
struct _PT3_CHANNEL {
__u32 valid ;
PT3_TUNER *tuner;
int type ;
PT3_I2C *i2c;
PT3_DMA *dma;
int id;
int freq;
int rstart;
};
#include "ptx.h"
#endif