mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-04 06:54:27 -05:00 
			
		
		
		
	ar71xx: move mdio_bus reset code
SVN-Revision: 18749
This commit is contained in:
		
							parent
							
								
									ac40715c5f
								
							
						
					
					
						commit
						d38fd20cb7
					
				@ -917,13 +917,6 @@ static int __init ag71xx_probe(struct platform_device *pdev)
 | 
			
		||||
 | 
			
		||||
	ag71xx_dump_regs(ag);
 | 
			
		||||
 | 
			
		||||
	/* Reset the mdio bus explicitly */
 | 
			
		||||
	if (ag->mii_bus) {
 | 
			
		||||
		mutex_lock(&ag->mii_bus->mdio_lock);
 | 
			
		||||
		ag->mii_bus->reset(ag->mii_bus);
 | 
			
		||||
		mutex_unlock(&ag->mii_bus->mdio_lock);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	platform_set_drvdata(pdev, dev);
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
 | 
			
		||||
@ -308,6 +308,11 @@ int ag71xx_phy_connect(struct ag71xx *ag)
 | 
			
		||||
		return -ENODEV;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/* Reset the mdio bus explicitly */
 | 
			
		||||
	mutex_lock(&ag->mii_bus->mdio_lock);
 | 
			
		||||
	ag->mii_bus->reset(ag->mii_bus);
 | 
			
		||||
	mutex_unlock(&ag->mii_bus->mdio_lock);
 | 
			
		||||
 | 
			
		||||
	if (pdata->phy_mask)
 | 
			
		||||
		return ag71xx_phy_connect_multi(ag);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user