[PATCH v4 2/9] phy: starfive: Add Starfive JH7110 USB 2.0 PHY driver

Marek Vasut marex at denx.de
Fri Aug 30 03:15:05 CEST 2024


On 8/29/24 3:30 AM, Minda Chen wrote:

[...]

> +menu "Starfive PHY driver"
> +
> +config PHY_STARFIVE_JH7110_USB2
> +	bool "Starfive JH7110 USB 2.0 PHY driver"
> +	select PHY

Can this PHY_STARFIVE_JH7110_USB2 symbol be selected if CONFIG_PHY is 
not set ? I think it cannot, so this 'select PHY' is unnecessary and 
should be removed.

[...]

> +static void usb2_set_ls_keepalive(struct jh7110_usb2_phy *phy, bool set)
> +{
> +	/* Host mode enable the LS speed keep-alive signal */
> +	if (set)
> +		clrsetbits_le32(phy->regs + USB_LS_KEEPALIVE_OFF,
> +				USB_LS_KEEPALIVE_ENABLE,
> +				USB_LS_KEEPALIVE_ENABLE);
> +	else
> +		clrsetbits_le32(phy->regs + USB_LS_KEEPALIVE_OFF,
> +				USB_LS_KEEPALIVE_ENABLE, 0);

Either use clrbits_le32() or use rework the function this way:

		clrsetbits_le32(phy->regs + USB_LS_KEEPALIVE_OFF,
				USB_LS_KEEPALIVE_ENABLE,
				set ? USB_LS_KEEPALIVE_ENABLE : 0);

[...]


More information about the U-Boot mailing list