#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/usb/role.h>
#include <linux/usb/usb_phy_generic.h>
#include "musb_core.h"
#include "musb_dma.h"
#define USB_L1INTS …
#define USB_L1INTM …
#define MTK_MUSB_TXFUNCADDR …
#define MUSB_RXTOG …
#define MUSB_RXTOGEN …
#define MUSB_TXTOG …
#define MUSB_TXTOGEN …
#define MTK_TOGGLE_EN …
#define TX_INT_STATUS …
#define RX_INT_STATUS …
#define USBCOM_INT_STATUS …
#define DMA_INT_STATUS …
#define DMA_INTR_STATUS_MSK …
#define DMA_INTR_UNMASK_SET_MSK …
#define MTK_MUSB_CLKS_NUM …
struct mtk_glue { … };
static int mtk_musb_clks_get(struct mtk_glue *glue)
{ … }
static int mtk_otg_switch_set(struct mtk_glue *glue, enum usb_role role)
{ … }
static int musb_usb_role_sx_set(struct usb_role_switch *sw, enum usb_role role)
{ … }
static enum usb_role musb_usb_role_sx_get(struct usb_role_switch *sw)
{ … }
static int mtk_otg_switch_init(struct mtk_glue *glue)
{ … }
static void mtk_otg_switch_exit(struct mtk_glue *glue)
{ … }
static irqreturn_t generic_interrupt(int irq, void *__hci)
{ … }
static irqreturn_t mtk_musb_interrupt(int irq, void *dev_id)
{ … }
static u32 mtk_musb_busctl_offset(u8 epnum, u16 offset)
{ … }
static u8 mtk_musb_clearb(void __iomem *addr, unsigned int offset)
{ … }
static u16 mtk_musb_clearw(void __iomem *addr, unsigned int offset)
{ … }
static int mtk_musb_set_mode(struct musb *musb, u8 mode)
{ … }
static int mtk_musb_init(struct musb *musb)
{ … }
static u16 mtk_musb_get_toggle(struct musb_qh *qh, int is_out)
{ … }
static u16 mtk_musb_set_toggle(struct musb_qh *qh, int is_out, struct urb *urb)
{ … }
static int mtk_musb_exit(struct musb *musb)
{ … }
static const struct musb_platform_ops mtk_musb_ops = …;
#define MTK_MUSB_MAX_EP_NUM …
#define MTK_MUSB_RAM_BITS …
static struct musb_fifo_cfg mtk_musb_mode_cfg[] = …;
static const struct musb_hdrc_config mtk_musb_hdrc_config = …;
static const struct platform_device_info mtk_dev_info = …;
static int mtk_musb_probe(struct platform_device *pdev)
{ … }
static void mtk_musb_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id mtk_musb_match[] = …;
MODULE_DEVICE_TABLE(of, mtk_musb_match);
#endif
static struct platform_driver mtk_musb_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;