mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-04 06:54:27 -05:00 
			
		
		
		
	Use new patch from Sieng Piaw Liew. Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
		
			
				
	
	
		
			26 lines
		
	
	
		
			813 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			813 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h
 | 
						|
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h
 | 
						|
@@ -79,6 +79,9 @@ struct bcm63xx_enetsw_port {
 | 
						|
 	int		force_speed;
 | 
						|
 	int		force_duplex_full;
 | 
						|
 
 | 
						|
+	int		mii_override;
 | 
						|
+	int		timing_sel;
 | 
						|
+
 | 
						|
 	const char	*name;
 | 
						|
 };
 | 
						|
 
 | 
						|
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
 | 
						|
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
 | 
						|
@@ -2227,6 +2227,10 @@ static int bcm_enetsw_open(struct net_de
 | 
						|
 
 | 
						|
 		rgmii_ctrl = enetsw_readb(priv, ENETSW_RGMII_CTRL_REG(i));
 | 
						|
 		rgmii_ctrl |= ENETSW_RGMII_CTRL_GMII_CLK_EN;
 | 
						|
+		if (priv->used_ports[i].mii_override)
 | 
						|
+			rgmii_ctrl |= ENETSW_RGMII_CTRL_MII_OVERRIDE_EN;
 | 
						|
+		if (priv->used_ports[i].timing_sel)
 | 
						|
+			rgmii_ctrl |= ENETSW_RGMII_CTRL_TIMING_SEL_EN;
 | 
						|
 		enetsw_writeb(priv, rgmii_ctrl, ENETSW_RGMII_CTRL_REG(i));
 | 
						|
 	}
 | 
						|
 
 |