ARM Sunxi Platform Development
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Jagan Teki <jagan@amarulasolutions.com>,
	Andre Przywara <andre.przywara@arm.com>
Cc: Marek Vasut <marex@denx.de>, Sam Edwards <cfsworks@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	Icenowy Zheng <uwu@icenowy.me>,
	u-boot@lists.denx.de, linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 1/3] phy: sun4i-usb: Fix of_xlate() argument check
Date: Fri, 09 Jun 2023 22:40:30 +0200	[thread overview]
Message-ID: <1935276.PYKUYFuaPT@jernej-laptop> (raw)
In-Reply-To: <20230609105621.1410483-2-andre.przywara@arm.com>

Dne petek, 09. junij 2023 ob 12:56:19 CEST je Andre Przywara napisal(a):
> In its of_xlate() function, the Allwinner USB PHY driver compares the
> args_count variable against the number of implemented USB PHYs, although
> this is the *number of arguments* to the DT phandle property. Per the DT
> binding for this PHY device, this number is always one, so this check
> will always fail if the particular SoC implements exactly one USB PHY.
> So far this affected only the V3s (which has USB support disabled), but
> the F1C100s also sports one PHY only.
> 
> Fix that check to compare args_count against exactly 1, and the args[0]
> content (requested PHY number) against the number of implemented PHYs.
> 
> This fixes USB operation on the Allwinner V3s and allows to enable USB
> on the Allwinner F1C100s SoC.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Nice catch!

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



  reply	other threads:[~2023-06-09 20:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 10:56 [PATCH 0/3] phy: sun4i: Allwinner F1C100s support and cleanup Andre Przywara
2023-06-09 10:56 ` [PATCH 1/3] phy: sun4i-usb: Fix of_xlate() argument check Andre Przywara
2023-06-09 20:40   ` Jernej Škrabec [this message]
2023-06-09 10:56 ` [PATCH 2/3] phy: sun4i-usb: add Allwinner F1C100s support Andre Przywara
2023-06-09 20:40   ` Jernej Škrabec
2023-06-09 10:56 ` [PATCH 3/3] sunxi: Kconfig: rework PHY_USB_SUN4I selection Andre Przywara
2023-06-09 20:42   ` Jernej Škrabec

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=1935276.PYKUYFuaPT@jernej-laptop \
    --to=jernej.skrabec@gmail.com \
    --cc=andre.przywara@arm.com \
    --cc=cfsworks@gmail.com \
    --cc=jagan@amarulasolutions.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=marex@denx.de \
    --cc=samuel@sholland.org \
    --cc=u-boot@lists.denx.de \
    --cc=uwu@icenowy.me \
    /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