Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / drivers / staging / ath6kl / include / common / gmboxif.h
1 //------------------------------------------------------------------------------
2 // Copyright (c) 2009-2010 Atheros Corporation.  All rights reserved.
3 // 
4 //
5 // Permission to use, copy, modify, and/or distribute this software for any
6 // purpose with or without fee is hereby granted, provided that the above
7 // copyright notice and this permission notice appear in all copies.
8 //
9 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 //
17 //
18 //------------------------------------------------------------------------------
19 //==============================================================================
20 // Author(s): ="Atheros"
21 //==============================================================================
22
23 #ifndef __GMBOXIF_H__
24 #define __GMBOXIF_H__
25
26 #ifndef ATH_TARGET
27 #include "athstartpack.h"
28 #endif
29
30 /* GMBOX interface definitions */
31     
32 #define AR6K_GMBOX_CREDIT_COUNTER       1   /* we use credit counter 1 to track credits */
33 #define AR6K_GMBOX_CREDIT_SIZE_COUNTER  2   /* credit counter 2 is used to pass the size of each credit */
34
35
36     /* HCI UART transport definitions when used over GMBOX interface */
37 #define HCI_UART_COMMAND_PKT 0x01
38 #define HCI_UART_ACL_PKT     0x02
39 #define HCI_UART_SCO_PKT     0x03
40 #define HCI_UART_EVENT_PKT   0x04
41
42     /* definitions for BT HCI packets */
43 typedef PREPACK struct {
44     A_UINT16 Flags_ConnHandle;
45     A_UINT16 Length;
46 } POSTPACK BT_HCI_ACL_HEADER;
47
48 typedef PREPACK struct {
49     A_UINT16 Flags_ConnHandle;
50     A_UINT8  Length;
51 } POSTPACK BT_HCI_SCO_HEADER;
52
53 typedef PREPACK struct {
54     A_UINT16 OpCode;
55     A_UINT8  ParamLength;
56 } POSTPACK BT_HCI_COMMAND_HEADER;
57
58 typedef PREPACK struct {
59     A_UINT8  EventCode;
60     A_UINT8  ParamLength;
61 } POSTPACK BT_HCI_EVENT_HEADER;
62
63 /* MBOX host interrupt signal assignments */
64
65 #define MBOX_SIG_HCI_BRIDGE_MAX      8
66 #define MBOX_SIG_HCI_BRIDGE_BT_ON    0
67 #define MBOX_SIG_HCI_BRIDGE_BT_OFF   1
68 #define MBOX_SIG_HCI_BRIDGE_BAUD_SET 2
69 #define MBOX_SIG_HCI_BRIDGE_PWR_SAV_ON    3
70 #define MBOX_SIG_HCI_BRIDGE_PWR_SAV_OFF   4
71
72
73 #ifndef ATH_TARGET
74 #include "athendpack.h"
75 #endif
76
77 #endif /* __GMBOXIF_H__ */
78