lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3sz47d75gpt76vqajuvdz2jo5y53pp72w7gsxwiywsbuuwwpzg@gsqcjqyuakfd>
Date: Thu, 8 Feb 2024 20:53:22 -0600
From: Bjorn Andersson <andersson@...nel.org>
To: Krishna Kurapati <quic_kriskura@...cinc.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, 
	Rob Herring <robh+dt@...nel.org>, Wesley Cheng <quic_wcheng@...cinc.com>, 
	Konrad Dybcio <konrad.dybcio@...aro.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
	Conor Dooley <conor+dt@...nel.org>, Thinh Nguyen <Thinh.Nguyen@...opsys.com>, 
	Felipe Balbi <balbi@...nel.org>, devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org, 
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org, quic_ppratap@...cinc.com, 
	quic_jackp@...cinc.com, Harsh Agarwal <quic_harshq@...cinc.com>
Subject: Re: [PATCH v14 4/9] usb: dwc3: core: Refactor PHY logic to support
 Multiport Controller

On Tue, Feb 06, 2024 at 10:48:20AM +0530, Krishna Kurapati wrote:
> From: Harsh Agarwal <quic_harshq@...cinc.com>
> 
> Currently the DWC3 driver supports only single port controller
> which requires at least one HS PHY and at most one SS PHY.
> 
> But the DWC3 USB controller can be connected to multiple ports and
> each port can have their own PHYs. Each port of the multiport
> controller can either be HS+SS capable or HS only capable
> Proper quantification of them is required to modify GUSB2PHYCFG
> and GUSB3PIPECTL registers appropriately.
> 
> Add support for detecting, obtaining and configuring PHYs supported
> by a multiport controller. Limit support to multiport controllers
> with up to four ports for now (e.g. as needed for SC8280XP).
> 
> Signed-off-by: Harsh Agarwal <quic_harshq@...cinc.com>
> Co-developed-by: Krishna Kurapati <quic_kriskura@...cinc.com>
> Signed-off-by: Krishna Kurapati <quic_kriskura@...cinc.com>

Reviewed-by: Bjorn Andersson <andersson@...nel.org>

> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
[..]
> @@ -740,7 +745,35 @@ static int dwc3_phy_setup(struct dwc3 *dwc)
>  	if (dwc->ulpi_ext_vbus_drv)
>  		reg |= DWC3_GUSB2PHYCFG_ULPIEXTVBUSDRV;
>  
> -	dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
> +	dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(index), reg);
> +
> +	return 0;
> +}
> +
> +/**

The format of this kernel-doc comment is not correct, but it's only
moved in this patchset so I think it should be fixed in a separate
patch.

Regards,
Bjorn

> + * dwc3_phy_setup - Configure USB PHY Interface of DWC3 Core
> + * @dwc: Pointer to our controller context structure
> + *
> + * Returns 0 on success. The USB PHY interfaces are configured but not
> + * initialized. The PHY interfaces and the PHYs get initialized together with
> + * the core in dwc3_core_init.
> + */
> +static int dwc3_phy_setup(struct dwc3 *dwc)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ