2 * linux/drivers/bluetooth/brf6150/brf6150.h
4 * Copyright (C) 2005 Nokia Corporation
5 * Written by Ville Tervo <ville.tervo@nokia.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include <asm/arch/board.h>
24 #ifndef __DRIVERS_BLUETOOTH_BRF6150_H
25 #define __DRIVERS_BLUETOOTH_BRF6150_H
27 #define UART_SYSC_OMAP_RESET 0x02
28 #define UART_SYSS_RESETDONE 0x01
29 #define UART_OMAP_SCR_EMPTY_THR 0x08
30 #define UART_OMAP_SCR_WAKEUP 0x10
31 #define UART_OMAP_SSR_WAKEUP 0x02
32 #define UART_OMAP_SSR_TXFULL 0x01
39 unsigned long uart_base;
42 struct sk_buff_head txq;
43 struct sk_buff *rx_skb;
44 const struct omap_bluetooth_config *btinfo;
45 const struct firmware *fw_entry;
48 struct completion fw_completion;
49 struct completion init_completion;
50 struct tasklet_struct tx_task;
52 unsigned long garbage_bytes;
53 unsigned long rx_state;
57 struct timer_list pm_timer;
60 #define BT_DEVICE "nokia_btuart"
61 #define BT_DRIVER "nokia_btuart"
63 #define MAX_BAUD_RATE 921600
64 #define UART_CLOCK 48000000
65 #define BT_INIT_DIVIDER 320
66 #define BT_BAUDRATE_DIVIDER 384000000
67 #define BT_SYSCLK_DIV 1000
68 #define INIT_SPEED 120000
70 #define H4_TYPE_SIZE 1
72 /* H4+ packet types */
73 #define H4_CMD_PKT 0x01
74 #define H4_ACL_PKT 0x02
75 #define H4_SCO_PKT 0x03
76 #define H4_EVT_PKT 0x04
77 #define H4_NEG_PKT 0x06
78 #define H4_ALIVE_PKT 0x07
81 #define WAIT_FOR_PKT_TYPE 1
82 #define WAIT_FOR_HEADER 2
83 #define WAIT_FOR_DATA 3
86 struct hci_event_hdr hev;
87 struct hci_ev_cmd_complete cmd;
89 } __attribute__ ((packed));
91 #endif /* __DRIVERS_BLUETOOTH_BRF6150_H */