From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
USB list <linux-usb@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>, Bin Liu <b-liu@ti.com>
Subject: Re: [PATCH 7/7] usb: musb: convert to devm_platform_ioremap_resource_byname
Date: Fri, 13 Nov 2020 16:26:43 +0800 [thread overview]
Message-ID: <1605256003.31607.26.camel@mhfsdcap03> (raw)
In-Reply-To: <CAMuHMdU8ow7J-Db_v3HUM8MmPfYcNpirzpUFmjUQrneeaVGFoA@mail.gmail.com>
On Thu, 2020-11-12 at 15:08 +0100, Geert Uytterhoeven wrote:
> Hi Chunfeng,
>
> On Wed, Jul 22, 2020 at 9:54 AM Chunfeng Yun <chunfeng.yun@mediatek.com> wrote:
> > Use devm_platform_ioremap_resource_byname() to simplify code
> >
> > Cc: Bin Liu <b-liu@ti.com>
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
>
> Thanks for your patch, which is now commit 2d30e408a2a6b344 ("usb: musb:
> convert to devm_platform_ioremap_resource_byname") in v5.9.
>
> > --- a/drivers/usb/musb/musb_dsps.c
> > +++ b/drivers/usb/musb/musb_dsps.c
> > @@ -429,12 +429,10 @@ static int dsps_musb_init(struct musb *musb)
> > struct platform_device *parent = to_platform_device(dev->parent);
> > const struct dsps_musb_wrapper *wrp = glue->wrp;
> > void __iomem *reg_base;
> > - struct resource *r;
> > u32 rev, val;
> > int ret;
> >
> > - r = platform_get_resource_byname(parent, IORESOURCE_MEM, "control");
> > - reg_base = devm_ioremap_resource(dev, r);
> > + reg_base = devm_platform_ioremap_resource_byname(parent, "control");
> > if (IS_ERR(reg_base))
> > return PTR_ERR(reg_base);
> > musb->ctrl_base = reg_base;
>
> On Beaglebone Black, where each interface has 2 children:
>
> musb-dsps 47401c00.usb: can't request region for resource [mem
> 0x47401800-0x474019ff]
> musb-hdrc musb-hdrc.1: musb_init_controller failed with status -16
> musb-hdrc: probe of musb-hdrc.1 failed with error -16
> musb-dsps 47401400.usb: can't request region for resource [mem
> 0x47401000-0x474011ff]
> musb-hdrc musb-hdrc.0: musb_init_controller failed with status -16
> musb-hdrc: probe of musb-hdrc.0 failed with error -16
>
> Before, devm_ioremap_resource() was called on "dev" ("musb-hdrc.0" or
> "musb-hdrc.1"), after it is called on "&pdev->dev" ("47401400.usb" or
> "47401c00.usb"), leading to a duplicate region request, which fails.
>
My bad, I didn't notice that, thanks a lot.
And sorry, I missed your message
> I have sent a revert:
> https://lore.kernel.org/linux-usb/20201112135900.3822599-1-geert+renesas@glider.be/
>
> Gr{oetje,eeting}s,
>
> Geert
>
next prev parent reply other threads:[~2020-11-13 8:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-22 7:51 [PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname Chunfeng Yun
2020-07-22 7:51 ` [PATCH 2/7] usb: phy: am335x: " Chunfeng Yun
2020-07-22 7:51 ` [PATCH 3/7] usb: cdns3: " Chunfeng Yun
2020-07-22 8:46 ` Peter Chen
2020-07-22 7:51 ` [PATCH 4/7] usb: dwc3: " Chunfeng Yun
2020-07-27 12:55 ` Patrice CHOTARD
2020-07-22 7:51 ` [PATCH 5/7] usb: gadget: r8a66597: " Chunfeng Yun
2020-07-22 7:51 ` [PATCH 6/7] usb: gadget: tegra-xudc: " Chunfeng Yun
2020-07-22 7:51 ` [PATCH 7/7] usb: musb: " Chunfeng Yun
2020-11-12 14:08 ` Geert Uytterhoeven
2020-11-13 8:26 ` Chunfeng Yun [this message]
2020-09-07 7:42 ` [PATCH 1/7] usb: mtu3: " Felipe Balbi
2020-09-18 3:38 ` Chunfeng Yun
2020-09-24 7:20 ` Felipe Balbi
2020-09-24 8:58 ` Chunfeng Yun
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=1605256003.31607.26.camel@mhfsdcap03 \
--to=chunfeng.yun@mediatek.com \
--cc=b-liu@ti.com \
--cc=balbi@kernel.org \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
/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