#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/err.h>
#include <linux/pm_runtime.h>
#include <linux/platform_data/usb-omap.h>
#include <linux/of.h>
#include "omap-usb.h"
#define USBTLL_DRIVER_NAME …
#define OMAP_USBTLL_REVISION …
#define OMAP_USBTLL_SYSCONFIG …
#define OMAP_USBTLL_SYSCONFIG_CACTIVITY …
#define OMAP_USBTLL_SYSCONFIG_SIDLEMODE …
#define OMAP_USBTLL_SYSCONFIG_ENAWAKEUP …
#define OMAP_USBTLL_SYSCONFIG_SOFTRESET …
#define OMAP_USBTLL_SYSCONFIG_AUTOIDLE …
#define OMAP_USBTLL_SYSSTATUS …
#define OMAP_USBTLL_SYSSTATUS_RESETDONE …
#define OMAP_USBTLL_IRQSTATUS …
#define OMAP_USBTLL_IRQENABLE …
#define OMAP_TLL_SHARED_CONF …
#define OMAP_TLL_SHARED_CONF_USB_90D_DDR_EN …
#define OMAP_TLL_SHARED_CONF_USB_180D_SDR_EN …
#define OMAP_TLL_SHARED_CONF_USB_DIVRATION …
#define OMAP_TLL_SHARED_CONF_FCLK_REQ …
#define OMAP_TLL_SHARED_CONF_FCLK_IS_ON …
#define OMAP_TLL_CHANNEL_CONF(num) …
#define OMAP_TLL_CHANNEL_CONF_FSLSMODE_SHIFT …
#define OMAP_TLL_CHANNEL_CONF_DRVVBUS …
#define OMAP_TLL_CHANNEL_CONF_CHRGVBUS …
#define OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF …
#define OMAP_TLL_CHANNEL_CONF_ULPI_ULPIAUTOIDLE …
#define OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE …
#define OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE …
#define OMAP_TLL_CHANNEL_CONF_MODE_TRANSPARENT_UTMI …
#define OMAP_TLL_CHANNEL_CONF_CHANMODE_FSLS …
#define OMAP_TLL_CHANNEL_CONF_CHANEN …
#define OMAP_TLL_FSLSMODE_6PIN_PHY_DAT_SE0 …
#define OMAP_TLL_FSLSMODE_6PIN_PHY_DP_DM …
#define OMAP_TLL_FSLSMODE_3PIN_PHY …
#define OMAP_TLL_FSLSMODE_4PIN_PHY …
#define OMAP_TLL_FSLSMODE_6PIN_TLL_DAT_SE0 …
#define OMAP_TLL_FSLSMODE_6PIN_TLL_DP_DM …
#define OMAP_TLL_FSLSMODE_3PIN_TLL …
#define OMAP_TLL_FSLSMODE_4PIN_TLL …
#define OMAP_TLL_FSLSMODE_2PIN_TLL_DAT_SE0 …
#define OMAP_TLL_FSLSMODE_2PIN_DAT_DP_DM …
#define OMAP_TLL_ULPI_FUNCTION_CTRL(num) …
#define OMAP_TLL_ULPI_INTERFACE_CTRL(num) …
#define OMAP_TLL_ULPI_OTG_CTRL(num) …
#define OMAP_TLL_ULPI_INT_EN_RISE(num) …
#define OMAP_TLL_ULPI_INT_EN_FALL(num) …
#define OMAP_TLL_ULPI_INT_STATUS(num) …
#define OMAP_TLL_ULPI_INT_LATCH(num) …
#define OMAP_TLL_ULPI_DEBUG(num) …
#define OMAP_TLL_ULPI_SCRATCH_REGISTER(num) …
#define OMAP_REV2_TLL_CHANNEL_COUNT …
#define OMAP_TLL_CHANNEL_COUNT …
#define OMAP_TLL_CHANNEL_1_EN_MASK …
#define OMAP_TLL_CHANNEL_2_EN_MASK …
#define OMAP_TLL_CHANNEL_3_EN_MASK …
#define OMAP_USBTLL_REV1 …
#define OMAP_USBTLL_REV2 …
#define OMAP_USBTLL_REV3 …
#define OMAP_USBTLL_REV4 …
#define is_ehci_tll_mode(x) …
#define omap_usb_mode_needs_tll(x) …
struct usbtll_omap { … };
static const char usbtll_driver_name[] = …;
static struct device *tll_dev;
static DEFINE_SPINLOCK(tll_lock);
static inline void usbtll_write(void __iomem *base, u32 reg, u32 val)
{ … }
static inline u32 usbtll_read(void __iomem *base, u32 reg)
{ … }
static inline void usbtll_writeb(void __iomem *base, u32 reg, u8 val)
{ … }
static bool is_ohci_port(enum usbhs_omap_port_mode pmode)
{ … }
static unsigned ohci_omap3_fslsmode(enum usbhs_omap_port_mode mode)
{ … }
static int usbtll_omap_probe(struct platform_device *pdev)
{ … }
static void usbtll_omap_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id usbtll_omap_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, usbtll_omap_dt_ids);
static struct platform_driver usbtll_omap_driver = …;
int omap_tll_init(struct usbhs_omap_platform_data *pdata)
{ … }
EXPORT_SYMBOL_GPL(…);
int omap_tll_enable(struct usbhs_omap_platform_data *pdata)
{ … }
EXPORT_SYMBOL_GPL(…);
int omap_tll_disable(struct usbhs_omap_platform_data *pdata)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
static int __init omap_usbtll_drvinit(void)
{ … }
fs_initcall(omap_usbtll_drvinit);
static void __exit omap_usbtll_drvexit(void)
{ … }
module_exit(omap_usbtll_drvexit);