drivers/usb/host/ehci-fsl: Fix interrupt setup in host mode.
Rob Herring
robh at kernel.org
Tue Jun 28 01:52:22 AEST 2022
On Sun, Jun 26, 2022 at 2:03 PM Darren Stevens <darren at stevens-zone.net> wrote:
>
> Hello Sergei
>
> On 26/06/2022, Sergei Shtylyov wrote:
> > Hello!
> >
> > On 6/25/22 11:41 PM, Darren Stevens wrote:
> >
> >> In patch a1a2b7125e10 (Drop static setup of IRQ resource from DT
> >> core) we stopped platform_get_resource() from returning the IRQ, as all
> >
> > In commit a1a2b7125e10 ("Drop static setup of IRQ resource from DT core")
> >
> >> drivers were supposed to have switched to platform_get_irq()
> >> Unfortunately the Freescale EHCI driver in host mode got missed. Fix
> >> it. Also fix allocation of resources to work with current kernel.
> >
> > The basic rule (especially for the fixes) is "do one thing per patch".
>
> I thought I'd done that, this is the minimum amount of changes that fix what changed in the specified commit.
>
> > [...]
> >> @@ -92,15 +89,18 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev)
> >> goto err1;
> >> }
> >>
> >> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >> - hcd->regs = devm_ioremap_resource(&pdev->dev, res);
> >> + tmp = of_address_to_resource(dn, 0, &res);
> >
> > Hm, why? What does this fix?
>
> With baseline the mouse and keyboard on our machines don't work - dmesg reports no interrupt. Fixing the interrupt detection throws a 'invalid resoure' error instead (No idea why), which these lines fix. Both problems disappear if we revert the 'fixes' patch.
>
I see the problem. You need to keep the
platform_device_add_resources() call in fsl-mph-dr-of.c so that the
memory resource is copied from the parent to the child device.
Rob
More information about the Linuxppc-dev
mailing list