#include <linux/bitfield.h>
#include <linux/dma-mapping.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/pm_wakeirq.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/reset.h>
#include "xhci.h"
#include "xhci-mtk.h"
#define CTRL0_IP_SW_RST …
#define CTRL1_IP_HOST_PDN …
#define CTRL2_IP_DEV_PDN …
#define STS1_IP_SLEEP_STS …
#define STS1_U3_MAC_RST …
#define STS1_XHCI_RST …
#define STS1_SYS125_RST …
#define STS1_REF_RST …
#define STS1_SYSPLL_STABLE …
#define CAP_U3_PORT_NUM(p) …
#define CAP_U2_PORT_NUM(p) …
#define CTRL_U3_PORT_HOST_SEL …
#define CTRL_U3_PORT_PDN …
#define CTRL_U3_PORT_DIS …
#define CTRL_U2_PORT_HOST_SEL …
#define CTRL_U2_PORT_PDN …
#define CTRL_U2_PORT_DIS …
#define CTRL_U2_FORCE_PLL_STB …
#define LS_EOF_CFG …
#define LSEOF_OFFSET …
#define FS_EOF_CFG …
#define FSEOF_OFFSET …
#define SS_GEN1_EOF_CFG …
#define SSG1EOF_OFFSET …
#define HFCNTR_CFG …
#define ITP_DELTA_CLK …
#define ITP_DELTA_CLK_MASK …
#define FRMCNT_LEV1_RANG …
#define FRMCNT_LEV1_RANG_MASK …
#define HSCH_CFG1 …
#define SCH3_RXFIFO_DEPTH_MASK …
#define SS_GEN2_EOF_CFG …
#define SSG2EOF_OFFSET …
#define XSEOF_OFFSET_MASK …
#define PERI_WK_CTRL1 …
#define WC1_IS_C(x) …
#define WC1_IS_EN …
#define WC1_IS_P …
#define PERI_WK_CTRL0 …
#define WC0_IS_C(x) …
#define WC0_IS_P …
#define WC0_IS_EN …
#define WC0_SSUSB0_CDEN …
#define WC0_IS_SPM_EN …
#define PERI_WK_CTRL0_8195 …
#define WC0_IS_P_95 …
#define WC0_IS_C_95(x) …
#define WC0_IS_EN_P3_95 …
#define WC0_IS_EN_P2_95 …
#define WC0_IS_EN_P1_95 …
#define PERI_WK_CTRL1_8195 …
#define WC1_IS_C_95(x) …
#define WC1_IS_P_95 …
#define WC1_IS_EN_P0_95 …
#define PERI_SSUSB_SPM_CTRL …
#define SSC_IP_SLEEP_EN …
#define SSC_SPM_INT_EN …
#define SCH_FIFO_TO_KB(x) …
enum ssusb_uwk_vers { … };
static void xhci_mtk_set_frame_interval(struct xhci_hcd_mtk *mtk)
{ … }
static void xhci_mtk_rxfifo_depth_set(struct xhci_hcd_mtk *mtk)
{ … }
static void xhci_mtk_init_quirk(struct xhci_hcd_mtk *mtk)
{ … }
static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
{ … }
static int xhci_mtk_host_disable(struct xhci_hcd_mtk *mtk)
{ … }
static int xhci_mtk_ssusb_config(struct xhci_hcd_mtk *mtk)
{ … }
static void usb_wakeup_ip_sleep_set(struct xhci_hcd_mtk *mtk, bool enable)
{ … }
static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
struct device_node *dn)
{ … }
static void usb_wakeup_set(struct xhci_hcd_mtk *mtk, bool enable)
{ … }
static int xhci_mtk_clks_get(struct xhci_hcd_mtk *mtk)
{ … }
static int xhci_mtk_vregs_get(struct xhci_hcd_mtk *mtk)
{ … }
static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci)
{ … }
static int xhci_mtk_setup(struct usb_hcd *hcd)
{ … }
static const struct xhci_driver_overrides xhci_mtk_overrides __initconst = …;
static struct hc_driver __read_mostly xhci_mtk_hc_driver;
static int xhci_mtk_probe(struct platform_device *pdev)
{ … }
static void xhci_mtk_remove(struct platform_device *pdev)
{ … }
static int __maybe_unused xhci_mtk_suspend(struct device *dev)
{ … }
static int __maybe_unused xhci_mtk_resume(struct device *dev)
{ … }
static int __maybe_unused xhci_mtk_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused xhci_mtk_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops xhci_mtk_pm_ops = …;
#define DEV_PM_OPS …
static const struct of_device_id mtk_xhci_of_match[] = …;
MODULE_DEVICE_TABLE(of, mtk_xhci_of_match);
static struct platform_driver mtk_xhci_driver = …;
static int __init xhci_mtk_init(void)
{ … }
module_init(…) …;
static void __exit xhci_mtk_exit(void)
{ … }
module_exit(xhci_mtk_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;