1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 * Bluetooth support for Broadcom devices
6 * Copyright (C) 2015 Intel Corporation
9 #define BCM_UART_CLOCK_48MHZ 0x01
10 #define BCM_UART_CLOCK_24MHZ 0x02
12 struct bcm_update_uart_baud_rate {
17 struct bcm_write_uart_clock_setting {
21 struct bcm_set_sleep_mode {
26 __u8 host_wake_active;
27 __u8 allow_host_sleep;
29 __u8 tristate_control;
31 __u8 usb_resume_timeout;
33 __u8 pulsed_host_wake;
36 struct bcm_set_pcm_int_params {
44 struct bcm_set_pcm_format_params {
52 #if IS_ENABLED(CONFIG_BT_BCM)
54 int btbcm_check_bdaddr(struct hci_dev *hdev);
55 int btbcm_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
56 int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw);
57 int btbcm_read_pcm_int_params(struct hci_dev *hdev,
58 struct bcm_set_pcm_int_params *params);
59 int btbcm_write_pcm_int_params(struct hci_dev *hdev,
60 const struct bcm_set_pcm_int_params *params);
62 int btbcm_setup_patchram(struct hci_dev *hdev);
63 int btbcm_setup_apple(struct hci_dev *hdev);
65 int btbcm_initialize(struct hci_dev *hdev, bool *fw_load_done, bool use_autobaud_mode);
66 int btbcm_finalize(struct hci_dev *hdev, bool *fw_load_done, bool use_autobaud_mode);
70 static inline int btbcm_check_bdaddr(struct hci_dev *hdev)
75 static inline int btbcm_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
80 static inline int btbcm_read_pcm_int_params(struct hci_dev *hdev,
81 struct bcm_set_pcm_int_params *params)
86 static inline int btbcm_write_pcm_int_params(struct hci_dev *hdev,
87 const struct bcm_set_pcm_int_params *params)
92 static inline int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
97 static inline int btbcm_setup_patchram(struct hci_dev *hdev)
102 static inline int btbcm_setup_apple(struct hci_dev *hdev)
107 static inline int btbcm_initialize(struct hci_dev *hdev, bool *fw_load_done, bool use_autobaud_mode)
112 static inline int btbcm_finalize(struct hci_dev *hdev, bool *fw_load_done, bool use_autobaud_mode)