/* setup_pex() - Configure the SerDes device to PCI Express mode @dev: The device to configure @type: The PCI Express type to configure for (x1 or x2)  */
static void setup_pex(struct udevice *dev, enum pex_type type)
/* setup_pex() - Configure the SerDes device to PCI Express mode @dev: The device to configure @type: The PCI Express type to configure for (x1 or x2)  */
static void setup_pex(struct udevice *dev, enum pex_type type)
{
	struct mpc83xx_serdes_priv *priv = dev_get_priv(dev);
	setbits_be32(&priv->regs->srdscr1, SRDSCR1_PLLBW);
	clrsetbits_be32(&priv->regs->srdscr2,
			SRDSCR2_SEIC_MASK,
			SRDSCR2_SEIC_PEX);
	out_be32(&priv->regs->srdscr3, SRDSCR3_SDFM_SATA_PEX);
	if (type == PEX_X2)
		out_be32(&priv->regs->srdscr4,
			 priv->rfcks | SRDSCR4_PROT_PEX | SRDSCR4_PLANE_X2);
	else
		out_be32(&priv->regs->srdscr4,
			 priv->rfcks | SRDSCR4_PROT_PEX);
}