|
@@ -193,3 +193,67 @@ static int usb_power_on(struct platform_device *pdev)
|
|
|
|
|
|
static void usb_power_off(struct platform_device *pdev)
|
|
|
{
|
|
|
+ if (!phy)
|
|
|
+ return;
|
|
|
+
|
|
|
+ usb_phy_shutdown(phy);
|
|
|
+
|
|
|
+ pm_runtime_put_sync(&pdev->dev);
|
|
|
+ pm_runtime_disable(&pdev->dev);
|
|
|
+}
|
|
|
+
|
|
|
+static struct usb_ehci_pdata ehcix_pdata = {
|
|
|
+ .power_on = usb_power_on,
|
|
|
+ .power_off = usb_power_off,
|
|
|
+ .power_suspend = usb_power_off,
|
|
|
+};
|
|
|
+
|
|
|
+static struct resource ehci0_resources[] = {
|
|
|
+ [0] = {
|
|
|
+ .start = 0xffe70000,
|
|
|
+ .end = 0xffe70400 - 1,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+ [1] = {
|
|
|
+ .start = gic_spi(44),
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device ehci0_device = {
|
|
|
+ .name = "ehci-platform",
|
|
|
+ .id = 0,
|
|
|
+ .dev = {
|
|
|
+ .dma_mask = &ehci0_device.dev.coherent_dma_mask,
|
|
|
+ .coherent_dma_mask = 0xffffffff,
|
|
|
+ .platform_data = &ehcix_pdata,
|
|
|
+ },
|
|
|
+ .num_resources = ARRAY_SIZE(ehci0_resources),
|
|
|
+ .resource = ehci0_resources,
|
|
|
+};
|
|
|
+
|
|
|
+static struct resource ehci1_resources[] = {
|
|
|
+ [0] = {
|
|
|
+ .start = 0xfff70000,
|
|
|
+ .end = 0xfff70400 - 1,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+ [1] = {
|
|
|
+ .start = gic_spi(45),
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device ehci1_device = {
|
|
|
+ .name = "ehci-platform",
|
|
|
+ .id = 1,
|
|
|
+ .dev = {
|
|
|
+ .dma_mask = &ehci1_device.dev.coherent_dma_mask,
|
|
|
+ .coherent_dma_mask = 0xffffffff,
|
|
|
+ .platform_data = &ehcix_pdata,
|
|
|
+ },
|
|
|
+ .num_resources = ARRAY_SIZE(ehci1_resources),
|
|
|
+ .resource = ehci1_resources,
|
|
|
+};
|
|
|
+
|
|
|
+static struct usb_ohci_pdata ohcix_pdata = {
|