Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
flexcop-usb.h
Go to the documentation of this file.
1 /*
2  * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
3  * flexcop-usb.h - header file for the USB part
4  * see flexcop.c for copyright information
5  */
6 #ifndef __FLEXCOP_USB_H_INCLUDED__
7 #define __FLEXCOP_USB_H_INCLUDED__
8 
9 #include <linux/usb.h>
10 
11 /* transfer parameters */
12 #define B2C2_USB_FRAMES_PER_ISO 4
13 #define B2C2_USB_NUM_ISO_URB 4
14 
15 #define B2C2_USB_CTRL_PIPE_IN usb_rcvctrlpipe(fc_usb->udev, 0)
16 #define B2C2_USB_CTRL_PIPE_OUT usb_sndctrlpipe(fc_usb->udev, 0)
17 #define B2C2_USB_DATA_PIPE usb_rcvisocpipe(fc_usb->udev, 0x81)
18 
19 struct flexcop_usb {
20  struct usb_device *udev;
22 
26 
29 
30  u8 tmp_buffer[1023+190];
32 };
33 
34 #if 0
35 /* request types TODO What is its use?*/
36 typedef enum {
37 
38 } flexcop_usb_request_type_t;
39 #endif
40 
41 /* request */
42 typedef enum {
52 
53 /* function definition for I2C_REQUEST */
54 typedef enum {
61  /* DKT 020208 - add this to support special case of DiSEqC */
65 
66 /* function definition for UTILITY request 0x12
67  * DKT 020304 - new utility function */
68 typedef enum {
81  /* DKT 020326 - add function for v1.14 */
88 
89 #define B2C2_WAIT_FOR_OPERATION_RW (1*HZ)
90 #define B2C2_WAIT_FOR_OPERATION_RDW (3*HZ)
91 #define B2C2_WAIT_FOR_OPERATION_WDW (1*HZ)
92 
93 #define B2C2_WAIT_FOR_OPERATION_V8READ (3*HZ)
94 #define B2C2_WAIT_FOR_OPERATION_V8WRITE (3*HZ)
95 #define B2C2_WAIT_FOR_OPERATION_V8FLASH (3*HZ)
96 
97 typedef enum {
103 
104 #define V8_MEMORY_EXTENDED (1 << 15)
105 #define USB_MEM_READ_MAX 32
106 #define USB_MEM_WRITE_MAX 1
107 #define USB_FLASH_MAX 8
108 #define V8_MEMORY_PAGE_SIZE 0x8000 /* 32K */
109 #define V8_MEMORY_PAGE_MASK 0x7FFF
110 
111 #endif