Changeset 36050


Ignore:
Timestamp:
2013-03-15T17:06:28+01:00 (5 years ago)
Author:
juhosg
Message:

generic: ar8216: start AR8327 switch from the probe routine

The AR8327 switch gets its configuration from platform
data or from the device-tree. This allows to start it
from the probe routine. Doing so makes it usable with
ethernet drivers which only connects to the PHY device
when the ethernet interface is opened.

Signed-off-by: Gabor Juhos <juhosg@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/files/drivers/net/phy/ar8216.c

    r36049 r36050  
    19461946                return -ENODEV; 
    19471947 
     1948        if (chip_is_ar8327(priv)) 
     1949                return 0; 
     1950 
    19481951        priv->phy = phydev; 
    19491952 
     
    21042107 
    21052108found: 
     2109        priv->use_count++; 
     2110 
    21062111        if (phydev->addr == 0) { 
    21072112                if (ar8xxx_has_gige(priv)) { 
     
    21122117                        phydev->advertising = ADVERTISED_100baseT_Full; 
    21132118                } 
     2119 
     2120                if (chip_is_ar8327(priv)) { 
     2121                        priv->phy = phydev; 
     2122 
     2123                        ret = ar8xxx_start(priv); 
     2124                        if (ret) 
     2125                                goto err_unregister_switch; 
     2126                } 
    21142127        } else { 
    21152128                if (ar8xxx_has_gige(priv)) { 
     
    21202133 
    21212134        phydev->priv = priv; 
    2122         priv->use_count++; 
    21232135 
    21242136        list_add(&priv->list, &ar8xxx_dev_list); 
     
    21272139 
    21282140        return 0; 
     2141 
     2142err_unregister_switch: 
     2143        if (--priv->use_count) 
     2144                goto unlock; 
     2145 
     2146        unregister_switch(&priv->dev); 
    21292147 
    21302148free_priv: 
Note: See TracChangeset for help on using the changeset viewer.