Re: [RFC PATCH v11 net-next 06/10] net: dsa: microchip: add support for phylink management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 25, 2022 at 10:23:37PM +0530, Prasanna Vengateshan wrote:
> +static void lan937x_apply_rgmii_delay(struct ksz_device *dev, int port,
> +				      phy_interface_t interface, u8 val)
> +{
> +	struct ksz_port *p = &dev->ports[port];
> +
> +	/* Clear Ingress & Egress internal delay enabled bits */
> +	val &= ~(PORT_RGMII_ID_EG_ENABLE | PORT_RGMII_ID_IG_ENABLE);
> +
> +	/* if the delay is 0, do not enable DLL */
> +	if (p->rgmii_tx_val) {
> +		lan937x_update_rgmii_tx_rx_delay(dev, port, true);
> +		dev_info(dev->dev, "Applied rgmii tx delay for the port %d\n",
> +			 port);
> +		val |= PORT_RGMII_ID_EG_ENABLE;
> +	}
> +
> +	/* if the delay is 0, do not enable DLL */
> +	if (p->rgmii_rx_val) {
> +		lan937x_update_rgmii_tx_rx_delay(dev, port, false);
> +		dev_info(dev->dev, "Applied rgmii rx delay for the port %d\n",
> +			 port);
> +		val |= PORT_RGMII_ID_IG_ENABLE;
> +	}
> +
> +	/* Enable RGMII internal delays */
> +	lan937x_pwrite8(dev, port, REG_PORT_XMII_CTRL_1, val);

"interface" doesn't appear to be used in this function, do you need to
pass it?

Other than that, the patch looks good, thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux