Setting up repository
[linux-libre-firmware.git] / ath9k_htc / sboot / magpie_1_1 / inc / hif_usb.h
1 /*
2  * @File: mbox_hw.h
3  * 
4  * @Abstract: mailbox hardware definitions
5  * 
6  * @Notes: 
7  *  * 
8  * Copyright (c) 2008 Atheros Communications Inc.
9  * All rights reserved.
10  *
11  */
12
13 #ifndef __HIF_USB_H__
14 #define __HIF_USB_H__
15
16 #include <hif_api.h>
17
18 #include <sys_cfg.h>
19 #include <vdesc_api.h>
20 #include <vbuf_api.h>
21 //#include <desc.h>
22 //#include <dma_engine_api.h>
23
24 #define HIF_USB_PIPE_TX             1
25 #define HIF_USB_PIPE_RX             2
26 #define HIF_USB_PIPE_INTERRUPT      3
27 #define HIF_USB_PIPE_COMMAND        4
28 #define HIF_USB_PIPE_HP_TX          5
29 #define HIF_USB_PIPE_MP_TX          6
30
31 struct VBUF_QUEUE
32 {
33     VBUF *head;
34     VBUF *tail;
35 };
36
37     /* the mailbox hardware layer context */
38 typedef struct _HIF_USB_CONTEXT {
39     HIF_CALLBACK                hifCb; 
40     struct zsDmaQueue           dnQ;
41     struct zsTxDmaQueue         upQ;
42 #if SYSTEM_MODULE_HP_EP5
43     struct zsDmaQueue           hpdnQ;  // high priority
44 #endif
45 #if SYSTEM_MODULE_HP_EP6
46     struct zsDmaQueue           mpdnQ;  // medium priority
47 #endif
48     //struct VBUF_QUEUE           upVbufQ;
49     VBUF                                *cmdQueue;
50     struct VBUF_QUEUE           eventBufQ;
51     
52     // Left a door for extension the structure
53     void *pReserved;      
54 } HIF_USB_CONTEXT;
55
56 void hif_usb_module_install(struct hif_api *apis);
57              
58 #endif