From: Michael Ellerman <mpe@ellerman.id.au>
To: Darren Stevens <darren@stevens-zone.net>,
linuxppc-dev@lists.ozlabs.org, oss@buserror.net,
chzigotzky@xenosoft.de, robh@kernel.org,
stern@rowland.harvard.edu, linux-usb@vger.kernel.org,
Shawn Guo <shawnguo@kernel.org>, Li Yang <leoyang.li@nxp.com>
Subject: Re: [PATCH RFC] drivers/usb/ehci-fsl: Fix interrupt setup in host mode.
Date: Fri, 24 Jun 2022 13:45:44 +1000 [thread overview]
Message-ID: <874k0a67x3.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20220621230941.381f9791@Cyrus.lan>
Darren Stevens <darren@stevens-zone.net> writes:
> In patch a1a2b7125e1079 (Drop static setup of IRQ resource from DT
> core) we stopped platform_get_resource() from returning the IRQ, as all
> 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.
>
> Fixes:a1a2b7125e1079 (Drop static setup of IRQ resource from DT core)
> Reported-by Christian Zigotzky <chzigotzky@xenosoft.de>
> Signed-off-by Darren Stevens <darren@stevens-zone.net>
> ---
> 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)
It looks like this driver is used on some arm/arm64 boards:
$ git grep -l fsl-usb2-dr arch/arm*/boot/dts
arch/arm/boot/dts/ls1021a.dtsi
arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi
Which is for the "Layerscape-1012A family SoC".
Have we heard of any bug reports from users of those boards? Is it wired
up differently or otherwise immune to the problem?
I've added the Layerscape maintainers to Cc.
cheers
> diff --git a/drivers/usb/host/fsl-mph-dr-of.c
> b/drivers/usb/host/fsl-mph-dr-of.c index 44a7e58..766e4ab 100644
> --- a/drivers/usb/host/fsl-mph-dr-of.c
> +++ b/drivers/usb/host/fsl-mph-dr-of.c
> @@ -80,8 +80,6 @@ static struct platform_device
> *fsl_usb2_device_register( const char *name, int id)
> {
> struct platform_device *pdev;
> - const struct resource *res = ofdev->resource;
> - unsigned int num = ofdev->num_resources;
> int retval;
>
> pdev = platform_device_alloc(name, id);
> @@ -106,11 +104,8 @@ static struct platform_device
> *fsl_usb2_device_register( if (retval)
> goto error;
>
> - if (num) {
> - retval = platform_device_add_resources(pdev, res, num);
> - if (retval)
> - goto error;
> - }
> + pdev->dev.of_node = ofdev->dev.of_node;
> + pdev->dev.of_node_reused = true;
>
> retval = platform_device_add(pdev);
> if (retval)
next prev parent reply other threads:[~2022-06-24 3:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 22:09 [PATCH RFC] drivers/usb/ehci-fsl: Fix interrupt setup in host mode Darren Stevens
2022-06-22 6:11 ` Greg KH
2022-06-24 3:45 ` Michael Ellerman [this message]
2022-06-27 15:42 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874k0a67x3.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=chzigotzky@xenosoft.de \
--cc=darren@stevens-zone.net \
--cc=leoyang.li@nxp.com \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oss@buserror.net \
--cc=robh@kernel.org \
--cc=shawnguo@kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox