diff options
-rw-r--r-- | drivers/usb/dwc2/hcd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index a2d4997d822c..1826a91c13c5 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -42,6 +42,7 @@ #include <linux/module.h> #include <linux/spinlock.h> #include <linux/interrupt.h> +#include <linux/platform_device.h> #include <linux/dma-mapping.h> #include <linux/delay.h> #include <linux/io.h> @@ -5033,6 +5034,8 @@ static void dwc2_hcd_release(struct dwc2_hsotg *hsotg) */ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq) { + struct platform_device *pdev = to_platform_device(hsotg->dev); + struct resource *res; struct usb_hcd *hcd; struct dwc2_host_chan *channel; u32 hcfg; @@ -5093,6 +5096,10 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq) hcd->has_tt = 1; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + hcd->rsrc_start = res->start; + hcd->rsrc_len = resource_size(res); + ((struct wrapper_priv_data *)&hcd->hcd_priv)->hsotg = hsotg; hsotg->priv = hcd; |