> On Thu, Apr 12, 2012 at 09:19:29PM +0000, Paul Zimmerman wrote: >> > From: Felipe Balbi [mailto:balbi@xxxxxx] >> > Sent: Thursday, April 12, 2012 6:08 AM >> > >> > This will prevent dwc3.ko from ioremapping >> > the entire memory space, thus preventing xHCI >> > from requesting its own part of the address. >> > >> > Signed-off-by: Felipe Balbi <balbi@xxxxxx> >> > --- >> > drivers/usb/dwc3/core.c | 26 +++++++--- >> > drivers/usb/dwc3/core.h | 122 >> +++++++++++++++++++++++------------------------ >> > 2 files changed, 80 insertions(+), 68 deletions(-) >> > >> > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c >> > index e7c853a..3c69d1a 100644 >> > --- a/drivers/usb/dwc3/core.c >> > +++ b/drivers/usb/dwc3/core.c >> > @@ -405,6 +405,7 @@ static void dwc3_core_exit(struct dwc3 *dwc) >> > static int __devinit dwc3_probe(struct platform_device *pdev) >> > { >> > struct device_node *node = pdev->dev.of_node; >> > + struct resource host_resource[2]; >> > struct resource *res; >> > struct dwc3 *dwc; >> > struct device *dev = &pdev->dev; >> > @@ -431,7 +432,24 @@ static int __devinit dwc3_probe(struct >> platform_device *pdev) >> > return -ENODEV; >> > } >> > >> > - dwc->res = res; >> > + irq = platform_get_irq(pdev, 0); >> > + if (irq < 0) { >> > + dev_err(dev, "missing IRQ\n"); >> > + return -ENODEV; >> > + } >> > + >> > + host_resource[0].start = res->start; >> > + host_resource[0].end = res->start + 0x7fff; >> > + host_resource[0].flags = IORESOURCE_MEM; >> > + >> > + host_resource[1].start = irq; >> > + host_resource[1].end = irq; >> > + host_resource[1].flags = IORESOURCE_IRQ; >> > + >> > + dwc->res = host_resource; >> > + >> > + /* Skip host address space */ >> > + res->start += 0xc100; >> >> Maybe it would be a good idea to make the Device address space end >> at 0xcbff? And then add another resource for OTG starting at >> 0xcc00. That would allow the OTG driver to have its own address >> space. Not sure if that's necessary, I'm just thinking out loud >> here. > > Maybe... but the otg driver will be linked to this same driver, so will > be needed at all ? I think the only piece which is a separate driver is > xHCI. Ido, what do you think ? Yes, I agree, need only to split xHCI address space, since OTG driver is not requesting the memory region again and there is no benefit doing so. > -- > balbi > Ido -- Consultant for Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html