From: Peter Geis <pgwipeout@gmail.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: Benjamin Gaignard <benjamin.gaignard@collabora.com>,
kishon@ti.com, Vinod Koul <vkoul@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
arm-mail-list <linux-arm-kernel@lists.infradead.org>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
kernel@collabora.com
Subject: Re: [PATCH 3/4] PHY: rockchip: USB2: Allow 64 bits reg property
Date: Mon, 14 Jun 2021 17:58:52 -0400 [thread overview]
Message-ID: <CAMdYzYrD=qtwAPc8tNRB8Ko-f_zhOVKiOsbgPPqpAi2MrDzSSA@mail.gmail.com> (raw)
In-Reply-To: <19d8cb97-d715-eb5f-5b2c-0c273937fd00@arm.com>
On Mon, Jun 14, 2021 at 1:09 PM Robin Murphy <robin.murphy@arm.com> wrote:
>
> On 2021-06-14 16:43, Benjamin Gaignard wrote:
> > In rk356x device-tree "reg" property could be coded on 64 bits.
> > Change reg type and of_property_read_ to make it works.
>
> On platforms with #address-cells=1, this isn't going to do what you
> think. Worse, it's not even going to fail, because you *can* read a
> 64-bit value from an address cell with a size cell after it...
Apologies, this was a hack and in no way ready for submission.
While I've got you here, what would be the best way to handle this?
Since previous generations #address-cells=1 and #size-cells=1, where
the rk356x #address-cells=2 and #size-cells=2 and we need to account
for both of them.
Thanks,
Peter
>
> Robin.
>
> > Signed-off-by: Peter Geis <pgwipeout@gmail.com>
> > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> > ---
> > drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> > index 46ebdb1460a3d..45518f96d7217 100644
> > --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> > +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> > @@ -1068,7 +1068,7 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev)
> > struct rockchip_usb2phy *rphy;
> > const struct rockchip_usb2phy_cfg *phy_cfgs;
> > const struct of_device_id *match;
> > - unsigned int reg;
> > + u64 reg;
> > int index, ret;
> >
> > rphy = devm_kzalloc(dev, sizeof(*rphy), GFP_KERNEL);
> > @@ -1098,7 +1098,7 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev)
> > rphy->usbgrf = NULL;
> > }
> >
> > - if (of_property_read_u32(np, "reg", ®)) {
> > + if (of_property_read_u64(np, "reg", ®)) {
> > dev_err(dev, "the reg property is not assigned in %pOFn node\n",
> > np);
> > return -EINVAL;
> >
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-06-14 22:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-14 15:43 [PATCH 0/4] Add USB2 support for rk3568 Benjamin Gaignard
2021-06-14 15:43 ` [PATCH 1/4] dt-bindings: phy: rockchip: USB2: remove useless #phy-cells property Benjamin Gaignard
2021-06-15 14:04 ` Rob Herring
2021-06-15 22:51 ` Rob Herring
2021-06-14 15:43 ` [PATCH 2/4] dt-bindings: phy: rockchip: USB2: Add compatible for rk3568 Benjamin Gaignard
2021-06-14 18:19 ` Johan Jonker
2021-06-14 15:43 ` [PATCH 3/4] PHY: rockchip: USB2: Allow 64 bits reg property Benjamin Gaignard
2021-06-14 17:09 ` Robin Murphy
2021-06-14 21:58 ` Peter Geis [this message]
2021-06-14 15:43 ` [PATCH 4/4] phy: rockchip: USB2: Add support for rk3568 Benjamin Gaignard
2021-06-14 16:33 ` [PATCH 0/4] Add USB2 " Peter Geis
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='CAMdYzYrD=qtwAPc8tNRB8Ko-f_zhOVKiOsbgPPqpAi2MrDzSSA@mail.gmail.com' \
--to=pgwipeout@gmail.com \
--cc=benjamin.gaignard@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=kernel@collabora.com \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=vkoul@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).