/* Return: 0 if setting the DP phy clock speed was successful, -ve on error  */
static int set_clk_speed(struct udevice *dev, u32 speed)
/* Return: 0 if setting the DP phy clock speed was successful, -ve on error  */
static int set_clk_speed(struct udevice *dev, u32 speed)
{
	struct dp_tx *dp_tx = dev_get_priv(dev);
	int status;
	u32 val;
	u32 mask;
	val = get_reg(dev, REG_ENABLE);
	set_reg(dev, REG_ENABLE, 0x0);
	set_reg(dev, REG_PHY_CLOCK_SELECT, speed);
	if (val)
		set_reg(dev, REG_ENABLE, 0x1);
	mask = phy_status_lanes_ready_mask(dp_tx->max_lane_count);
	status = wait_phy_ready(dev, mask);
	if (status)
		return -EIO;
	return 0;
}