[PATCH v2 RFC] drivers/usb/host/ehci-fsl: Fix interrupt setup in host mode.

Sergei Shtylyov sergei.shtylyov at gmail.com
Sun Jun 26 18:49:46 AEST 2022


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".

> Fixes: a1a2b7125e10 (Drop static setup of IRQ resource from DT core)
> Reported-by Christian Zigotzky <chzigotzky at xenosoft.de>
> Signed-off-by Darren Stevens <darren at stevens-zone.net>
> ---
>  v2 - Fixed coding style, removed a couple of unneeded initializations,
>       cc'd Layerscape maintainers.
> 
> Tested on AmigaOne X5000/20 and X5000/40 not sure if this is entirely
> correct fix though. Contains code by Rob Herring (in fsl-mph-dr-of.c)
> 
> diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
> index 385be30..8bd258a 100644
> --- a/drivers/usb/host/ehci-fsl.c
> +++ b/drivers/usb/host/ehci-fsl.c
[...]
> @@ -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?

[...]

MBR, Sergey


More information about the Linuxppc-dev mailing list