#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/platform_device.h>
#include <linux/platform_data/usb-omap.h>
#include <linux/pm_runtime.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/err.h>
#include "omap-usb.h"
#define USBHS_DRIVER_NAME …
#define OMAP_EHCI_DEVICE …
#define OMAP_OHCI_DEVICE …
#define OMAP_UHH_REVISION …
#define OMAP_UHH_SYSCONFIG …
#define OMAP_UHH_SYSCONFIG_MIDLEMODE …
#define OMAP_UHH_SYSCONFIG_CACTIVITY …
#define OMAP_UHH_SYSCONFIG_SIDLEMODE …
#define OMAP_UHH_SYSCONFIG_ENAWAKEUP …
#define OMAP_UHH_SYSCONFIG_SOFTRESET …
#define OMAP_UHH_SYSCONFIG_AUTOIDLE …
#define OMAP_UHH_SYSSTATUS …
#define OMAP_UHH_HOSTCONFIG …
#define OMAP_UHH_HOSTCONFIG_ULPI_BYPASS …
#define OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS …
#define OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS …
#define OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS …
#define OMAP_UHH_HOSTCONFIG_INCR4_BURST_EN …
#define OMAP_UHH_HOSTCONFIG_INCR8_BURST_EN …
#define OMAP_UHH_HOSTCONFIG_INCR16_BURST_EN …
#define OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN …
#define OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS …
#define OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS …
#define OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS …
#define OMAP4_UHH_HOSTCONFIG_APP_START_CLK …
#define OMAP4_UHH_SYSCONFIG_IDLEMODE_CLEAR …
#define OMAP4_UHH_SYSCONFIG_NOIDLE …
#define OMAP4_UHH_SYSCONFIG_STDBYMODE_CLEAR …
#define OMAP4_UHH_SYSCONFIG_NOSTDBY …
#define OMAP4_UHH_SYSCONFIG_SOFTRESET …
#define OMAP4_P1_MODE_CLEAR …
#define OMAP4_P1_MODE_TLL …
#define OMAP4_P1_MODE_HSIC …
#define OMAP4_P2_MODE_CLEAR …
#define OMAP4_P2_MODE_TLL …
#define OMAP4_P2_MODE_HSIC …
#define OMAP_UHH_DEBUG_CSR …
#define OMAP_USBHS_REV1 …
#define OMAP_USBHS_REV2 …
#define is_omap_usbhs_rev1(x) …
#define is_omap_usbhs_rev2(x) …
#define is_ehci_phy_mode(x) …
#define is_ehci_tll_mode(x) …
#define is_ehci_hsic_mode(x) …
struct usbhs_hcd_omap { … };
static const char usbhs_driver_name[] = …;
static u64 usbhs_dmamask = …;
static inline void usbhs_write(void __iomem *base, u32 reg, u32 val)
{ … }
static inline u32 usbhs_read(void __iomem *base, u32 reg)
{ … }
static const char * const port_modes[] = …;
static struct platform_device *omap_usbhs_alloc_child(const char *name,
struct resource *res, int num_resources, void *pdata,
size_t pdata_size, struct device *dev)
{ … }
static int omap_usbhs_alloc_children(struct platform_device *pdev)
{ … }
static bool is_ohci_port(enum usbhs_omap_port_mode pmode)
{ … }
static int usbhs_runtime_resume(struct device *dev)
{ … }
static int usbhs_runtime_suspend(struct device *dev)
{ … }
static unsigned omap_usbhs_rev1_hostconfig(struct usbhs_hcd_omap *omap,
unsigned reg)
{ … }
static unsigned omap_usbhs_rev2_hostconfig(struct usbhs_hcd_omap *omap,
unsigned reg)
{ … }
static void omap_usbhs_init(struct device *dev)
{ … }
static int usbhs_omap_get_dt_pdata(struct device *dev,
struct usbhs_omap_platform_data *pdata)
{ … }
static const struct of_device_id usbhs_child_match_table[] = …;
static int usbhs_omap_probe(struct platform_device *pdev)
{ … }
static int usbhs_omap_remove_child(struct device *dev, void *data)
{ … }
static void usbhs_omap_remove(struct platform_device *pdev)
{ … }
static const struct dev_pm_ops usbhsomap_dev_pm_ops = …;
static const struct of_device_id usbhs_omap_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, usbhs_omap_dt_ids);
static struct platform_driver usbhs_omap_driver = …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_ALIAS(…) …;
MODULE_DESCRIPTION(…) …;
static int omap_usbhs_drvinit(void)
{ … }
fs_initcall_sync(omap_usbhs_drvinit);
static void omap_usbhs_drvexit(void)
{ … }
module_exit(omap_usbhs_drvexit);