[PATCH v2 3/5] phy: meson-gxl-usb2: remove phy_meson_gxl_usb2_set_mode

Marek Vasut marex at denx.de
Thu Jun 20 13:54:26 CEST 2024


On 6/20/24 9:42 AM, Neil Armstrong wrote:
> Remove the public phy_meson_gxl_usb2_set_mode and move
> the implementation in the the set_mode callback.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong at linaro.org>

Reviewed-by: Marek Vasut <marex at denx.de>

> -static int _phy_meson_gxl_usb2_set_mode(struct phy *phy, enum phy_mode mode, int submode)
> -{
> -	if (submode)
> -		return -EOPNOTSUPP;
> -
> -	switch (mode) {
> -	case PHY_MODE_USB_DEVICE:
> -		phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_PERIPHERAL);
> -		break;
>   
>   	case PHY_MODE_USB_HOST:
>   	case PHY_MODE_USB_OTG:
> -		phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_HOST);
> +		val |= U2P_R0_DM_PULLDOWN;
> +		val |= U2P_R0_DP_PULLDOWN;

btw this could be a one-liner val |= macro1 | macro2 ;


More information about the U-Boot mailing list