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 /* AR3K module configuration APIs for HCI-bridge operation */
24 
25 #ifndef AR3KCONFIG_H_
26 #define AR3KCONFIG_H_
27 
28 #include <net/bluetooth/bluetooth.h>
29 #include <net/bluetooth/hci_core.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #define AR3K_CONFIG_FLAG_FORCE_MINBOOT_EXIT         (1 << 0)
36 #define AR3K_CONFIG_FLAG_SET_AR3K_BAUD              (1 << 1)
37 #define AR3K_CONFIG_FLAG_AR3K_BAUD_CHANGE_DELAY     (1 << 2)
38 #define AR3K_CONFIG_FLAG_SET_AR6K_SCALE_STEP        (1 << 3)
39 
40 
41 struct ar3k_config_info {
42     u32 Flags;           /* config flags */
43     void                     *pHCIDev;        /* HCI bridge device     */
44     struct hci_transport_properties *pHCIProps;      /* HCI bridge props      */
45     struct hif_device               *pHIFDevice;     /* HIF layer device      */
46 
47     u32 AR3KBaudRate;    /* AR3K operational baud rate */
48     u16 AR6KScale;       /* AR6K UART scale value */
49     u16 AR6KStep;        /* AR6K UART step value  */
50     struct hci_dev           *pBtStackHCIDev; /* BT Stack HCI dev */
51     u32 PwrMgmtEnabled;  /* TLPM enabled? */
52     u16 IdleTimeout;     /* TLPM idle timeout */
53     u16 WakeupTimeout;   /* TLPM wakeup timeout */
54     u8 bdaddr[6];       /* Bluetooth device address */
55 };
56 
57 int AR3KConfigure(struct ar3k_config_info *pConfigInfo);
58 
59 int AR3KConfigureExit(void *config);
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
65 #endif /*AR3KCONFIG_H_*/
66