Skip to content

Commit e303d12

Browse files
bgodavarholtmann
authored andcommitted
Bluetooth: btqca: Rename ROME specific variables to generic variables
Variables which are named with rome are commonly used for all the BT SoC's. Instead of continuing further, renamed them to generic name. Signed-off-by: Balakrishna Godavarthi <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 53121a7 commit e303d12

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

drivers/bluetooth/btqca.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version)
1818
{
1919
struct sk_buff *skb;
2020
struct edl_event_hdr *edl;
21-
struct rome_version *ver;
21+
struct qca_btsoc_version *ver;
2222
char cmd;
2323
int err = 0;
2424

@@ -55,19 +55,19 @@ int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version)
5555
goto out;
5656
}
5757

58-
ver = (struct rome_version *)(edl->data);
58+
ver = (struct qca_btsoc_version *)(edl->data);
5959

6060
BT_DBG("%s: Product:0x%08x", hdev->name, le32_to_cpu(ver->product_id));
6161
BT_DBG("%s: Patch :0x%08x", hdev->name, le16_to_cpu(ver->patch_ver));
62-
BT_DBG("%s: ROM :0x%08x", hdev->name, le16_to_cpu(ver->rome_ver));
62+
BT_DBG("%s: ROM :0x%08x", hdev->name, le16_to_cpu(ver->rom_ver));
6363
BT_DBG("%s: SOC :0x%08x", hdev->name, le32_to_cpu(ver->soc_id));
6464

6565
/* QCA chipset version can be decided by patch and SoC
6666
* version, combination with upper 2 bytes from SoC
6767
* and lower 2 bytes from patch will be used.
6868
*/
6969
*soc_version = (le32_to_cpu(ver->soc_id) << 16) |
70-
(le16_to_cpu(ver->rome_ver) & 0x0000ffff);
70+
(le16_to_cpu(ver->rom_ver) & 0x0000ffff);
7171
if (*soc_version == 0)
7272
err = -EILSEQ;
7373

@@ -121,7 +121,7 @@ int qca_send_pre_shutdown_cmd(struct hci_dev *hdev)
121121
}
122122
EXPORT_SYMBOL_GPL(qca_send_pre_shutdown_cmd);
123123

124-
static void qca_tlv_check_data(struct rome_config *config,
124+
static void qca_tlv_check_data(struct qca_fw_config *config,
125125
const struct firmware *fw)
126126
{
127127
const u8 *data;
@@ -140,8 +140,8 @@ static void qca_tlv_check_data(struct rome_config *config,
140140
BT_DBG("TLV Type\t\t : 0x%x", type_len & 0x000000ff);
141141
BT_DBG("Length\t\t : %d bytes", length);
142142

143-
config->dnld_mode = ROME_SKIP_EVT_NONE;
144-
config->dnld_type = ROME_SKIP_EVT_NONE;
143+
config->dnld_mode = QCA_SKIP_EVT_NONE;
144+
config->dnld_type = QCA_SKIP_EVT_NONE;
145145

146146
switch (config->type) {
147147
case TLV_TYPE_PATCH:
@@ -223,7 +223,7 @@ static void qca_tlv_check_data(struct rome_config *config,
223223
}
224224

225225
static int qca_tlv_send_segment(struct hci_dev *hdev, int seg_size,
226-
const u8 *data, enum rome_tlv_dnld_mode mode)
226+
const u8 *data, enum qca_tlv_dnld_mode mode)
227227
{
228228
struct sk_buff *skb;
229229
struct edl_event_hdr *edl;
@@ -235,7 +235,7 @@ static int qca_tlv_send_segment(struct hci_dev *hdev, int seg_size,
235235
cmd[1] = seg_size;
236236
memcpy(cmd + 2, data, seg_size);
237237

238-
if (mode == ROME_SKIP_EVT_VSE_CC || mode == ROME_SKIP_EVT_VSE)
238+
if (mode == QCA_SKIP_EVT_VSE_CC || mode == QCA_SKIP_EVT_VSE)
239239
return __hci_cmd_send(hdev, EDL_PATCH_CMD_OPCODE, seg_size + 2,
240240
cmd);
241241

@@ -301,7 +301,7 @@ static int qca_inject_cmd_complete_event(struct hci_dev *hdev)
301301
}
302302

303303
static int qca_download_firmware(struct hci_dev *hdev,
304-
struct rome_config *config)
304+
struct qca_fw_config *config)
305305
{
306306
const struct firmware *fw;
307307
const u8 *segment;
@@ -328,7 +328,7 @@ static int qca_download_firmware(struct hci_dev *hdev,
328328
remain -= segsize;
329329
/* The last segment is always acked regardless download mode */
330330
if (!remain || segsize < MAX_SIZE_PER_TLV_SEGMENT)
331-
config->dnld_mode = ROME_SKIP_EVT_NONE;
331+
config->dnld_mode = QCA_SKIP_EVT_NONE;
332332

333333
ret = qca_tlv_send_segment(hdev, segsize, segment,
334334
config->dnld_mode);
@@ -344,8 +344,8 @@ static int qca_download_firmware(struct hci_dev *hdev,
344344
* decrease the BT in initialization time. Here we will inject a command
345345
* complete event to avoid a command timeout error message.
346346
*/
347-
if (config->dnld_type == ROME_SKIP_EVT_VSE_CC ||
348-
config->dnld_type == ROME_SKIP_EVT_VSE)
347+
if (config->dnld_type == QCA_SKIP_EVT_VSE_CC ||
348+
config->dnld_type == QCA_SKIP_EVT_VSE)
349349
ret = qca_inject_cmd_complete_event(hdev);
350350

351351
out:
@@ -382,7 +382,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
382382
enum qca_btsoc_type soc_type, u32 soc_ver,
383383
const char *firmware_name)
384384
{
385-
struct rome_config config;
385+
struct qca_fw_config config;
386386
int err;
387387
u8 rom_ver = 0;
388388

drivers/bluetooth/btqca.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,24 @@ enum qca_baudrate {
5656
QCA_BAUDRATE_RESERVED
5757
};
5858

59-
enum rome_tlv_dnld_mode {
60-
ROME_SKIP_EVT_NONE,
61-
ROME_SKIP_EVT_VSE,
62-
ROME_SKIP_EVT_CC,
63-
ROME_SKIP_EVT_VSE_CC
59+
enum qca_tlv_dnld_mode {
60+
QCA_SKIP_EVT_NONE,
61+
QCA_SKIP_EVT_VSE,
62+
QCA_SKIP_EVT_CC,
63+
QCA_SKIP_EVT_VSE_CC
6464
};
6565

66-
enum rome_tlv_type {
66+
enum qca_tlv_type {
6767
TLV_TYPE_PATCH = 1,
6868
TLV_TYPE_NVM
6969
};
7070

71-
struct rome_config {
71+
struct qca_fw_config {
7272
u8 type;
7373
char fwname[64];
7474
uint8_t user_baud_rate;
75-
enum rome_tlv_dnld_mode dnld_mode;
76-
enum rome_tlv_dnld_mode dnld_type;
75+
enum qca_tlv_dnld_mode dnld_mode;
76+
enum qca_tlv_dnld_mode dnld_type;
7777
};
7878

7979
struct edl_event_hdr {
@@ -82,10 +82,10 @@ struct edl_event_hdr {
8282
__u8 data[0];
8383
} __packed;
8484

85-
struct rome_version {
85+
struct qca_btsoc_version {
8686
__le32 product_id;
8787
__le16 patch_ver;
88-
__le16 rome_ver;
88+
__le16 rom_ver;
8989
__le32 soc_id;
9090
} __packed;
9191

0 commit comments

Comments
 (0)