#include <linux/acpi.h>
#include <linux/bits.h>
#include <linux/bitfield.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/gfp.h>
#include <linux/io.h>
#include <linux/irqreturn.h>
#include <linux/kthread.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
#include "t7xx_cldma.h"
#include "t7xx_hif_cldma.h"
#include "t7xx_mhccif.h"
#include "t7xx_modem_ops.h"
#include "t7xx_netdev.h"
#include "t7xx_pci.h"
#include "t7xx_pcie_mac.h"
#include "t7xx_port.h"
#include "t7xx_port_proxy.h"
#include "t7xx_reg.h"
#include "t7xx_state_monitor.h"
#define RT_ID_MD_PORT_ENUM …
#define RT_ID_AP_PORT_ENUM …
#define MD_FEATURE_QUERY_ID …
#define FEATURE_VER …
#define FEATURE_MSK …
#define RGU_RESET_DELAY_MS …
#define PORT_RESET_DELAY_MS …
#define FASTBOOT_RESET_DELAY_MS …
#define EX_HS_TIMEOUT_MS …
#define EX_HS_POLL_DELAY_MS …
enum mtk_feature_support_type { … };
static unsigned int t7xx_get_interrupt_status(struct t7xx_pci_dev *t7xx_dev)
{ … }
int t7xx_pci_mhccif_isr(struct t7xx_pci_dev *t7xx_dev)
{ … }
static void t7xx_clr_device_irq_via_pcie(struct t7xx_pci_dev *t7xx_dev)
{ … }
void t7xx_clear_rgu_irq(struct t7xx_pci_dev *t7xx_dev)
{ … }
static int t7xx_acpi_reset(struct t7xx_pci_dev *t7xx_dev, char *fn_name)
{ … }
static void t7xx_host_event_notify(struct t7xx_pci_dev *t7xx_dev, unsigned int event_id)
{ … }
int t7xx_reset_device(struct t7xx_pci_dev *t7xx_dev, enum reset_type type)
{ … }
static void t7xx_reset_device_via_pmic(struct t7xx_pci_dev *t7xx_dev)
{ … }
static irqreturn_t t7xx_rgu_isr_thread(int irq, void *data)
{ … }
static irqreturn_t t7xx_rgu_isr_handler(int irq, void *data)
{ … }
static void t7xx_pcie_register_rgu_isr(struct t7xx_pci_dev *t7xx_dev)
{ … }
static void t7xx_cldma_exception(struct cldma_ctrl *md_ctrl, enum hif_ex_stage stage)
{ … }
static void t7xx_md_exception(struct t7xx_modem *md, enum hif_ex_stage stage)
{ … }
static int t7xx_wait_hif_ex_hk_event(struct t7xx_modem *md, int event_id)
{ … }
static void t7xx_md_sys_sw_init(struct t7xx_pci_dev *t7xx_dev)
{ … }
struct feature_query { … };
static void t7xx_prepare_host_rt_data_query(struct t7xx_sys_info *core)
{ … }
static int t7xx_prepare_device_rt_data(struct t7xx_sys_info *core, struct device *dev,
void *data)
{ … }
static int t7xx_parse_host_rt_data(struct t7xx_fsm_ctl *ctl, struct t7xx_sys_info *core,
struct device *dev, void *data, int data_length)
{ … }
static int t7xx_core_reset(struct t7xx_modem *md)
{ … }
static void t7xx_core_hk_handler(struct t7xx_modem *md, struct t7xx_sys_info *core_info,
struct t7xx_fsm_ctl *ctl,
enum t7xx_fsm_event_state event_id,
enum t7xx_fsm_event_state err_detect)
{ … }
static void t7xx_md_hk_wq(struct work_struct *work)
{ … }
static void t7xx_ap_hk_wq(struct work_struct *work)
{ … }
void t7xx_md_event_notify(struct t7xx_modem *md, enum md_event_id evt_id)
{ … }
void t7xx_md_exception_handshake(struct t7xx_modem *md)
{ … }
static struct t7xx_modem *t7xx_md_alloc(struct t7xx_pci_dev *t7xx_dev)
{ … }
int t7xx_md_reset(struct t7xx_pci_dev *t7xx_dev)
{ … }
int t7xx_md_init(struct t7xx_pci_dev *t7xx_dev)
{ … }
void t7xx_md_exit(struct t7xx_pci_dev *t7xx_dev)
{ … }