#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/usb/otg.h>
#include <linux/usb/ulpi.h>
#include <linux/usb/hcd.h>
#include <linux/platform_data/usb-ehci-mxc.h>
#define DRIVER_DESC "Freescale On-Chip EHCI Host driver"
static const char hcd_name[] = "ehci-mxc";
#define ULPI_VIEWPORT_OFFSET 0x170
struct clk *usbclk, *ahbclk, *phyclk;
static struct hc_driver __read_mostly ehci_mxc_hc_driver;
static const struct ehci_driver_overrides ehci_mxc_overrides __initconst = {
.extra_priv_size = sizeof(struct ehci_mxc_priv),
static int ehci_mxc_drv_probe(struct platform_device *pdev)
struct mxc_usbh_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct ehci_mxc_priv *priv;
struct device *dev = &pdev->dev;
dev_err(dev, "No platform data given, bailing out.\n");
irq = platform_get_irq(pdev, 0);
hcd = usb_create_hcd(&ehci_mxc_hc_driver, dev, dev_name(dev));
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
hcd->regs = devm_ioremap_resource(&pdev->dev, res);
ret = PTR_ERR(hcd->regs);