OSDN Git Service

cnss2: Add support for genoa pcie
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / drivers / net / wireless / cnss2 / bus.h
1 /* Copyright (c) 2018, The Linux Foundation. All rights reserved.
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License version 2 and
5  * only version 2 as published by the Free Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  */
12
13 #ifndef _CNSS_BUS_H
14 #define _CNSS_BUS_H
15
16 #include "main.h"
17
18 #define QCA6174_VENDOR_ID               0x168C
19 #define QCA6174_DEVICE_ID               0x003E
20 #define QCA6174_REV_ID_OFFSET           0x08
21 #define QCA6174_REV3_VERSION            0x5020000
22 #define QCA6174_REV3_2_VERSION          0x5030000
23 #define QCA6290_VENDOR_ID               0x17CB
24 #define QCA6290_DEVICE_ID               0x1100
25 #define QCA6290_EMULATION_VENDOR_ID     0x168C
26 #define QCA6290_EMULATION_DEVICE_ID     0xABCD
27 #define QCN7605_VENDOR_ID               0x17CB
28 #define QCN7605_DEVICE_ID               0x1102
29
30 enum cnss_dev_bus_type cnss_get_dev_bus_type(struct device *dev);
31 enum cnss_dev_bus_type cnss_get_bus_type(unsigned long device_id);
32 void *cnss_bus_dev_to_bus_priv(struct device *dev);
33 struct cnss_plat_data *cnss_bus_dev_to_plat_priv(struct device *dev);
34 int cnss_bus_init(struct cnss_plat_data *plat_priv);
35 void cnss_bus_deinit(struct cnss_plat_data *plat_priv);
36 int cnss_bus_load_m3(struct cnss_plat_data *plat_priv);
37 int cnss_bus_alloc_fw_mem(struct cnss_plat_data *plat_priv);
38 u32 cnss_bus_get_wake_irq(struct cnss_plat_data *plat_priv);
39 int cnss_bus_force_fw_assert_hdlr(struct cnss_plat_data *plat_priv);
40 void cnss_bus_fw_boot_timeout_hdlr(unsigned long data);
41 void cnss_bus_collect_dump_info(struct cnss_plat_data *plat_priv);
42 int cnss_bus_call_driver_probe(struct cnss_plat_data *plat_priv);
43 int cnss_bus_call_driver_remove(struct cnss_plat_data *plat_priv);
44 int cnss_bus_dev_powerup(struct cnss_plat_data *plat_priv);
45 int cnss_bus_dev_shutdown(struct cnss_plat_data *plat_priv);
46 int cnss_bus_dev_crash_shutdown(struct cnss_plat_data *plat_priv);
47 int cnss_bus_dev_ramdump(struct cnss_plat_data *plat_priv);
48 int cnss_bus_register_driver_hdlr(struct cnss_plat_data *plat_priv, void *data);
49 int cnss_bus_unregister_driver_hdlr(struct cnss_plat_data *plat_priv);
50 int cnss_bus_call_driver_modem_status(struct cnss_plat_data *plat_priv,
51                                       int modem_current_status);
52 int cnss_bus_recovery_update_status(struct cnss_plat_data *plat_priv);
53 #endif /* _CNSS_BUS_H */