Changeset 36045


Ignore:
Timestamp:
2013-03-15T16:50:02+01:00 (5 years ago)
Author:
juhosg
Message:

generic: ar8216: don't use platform_data in ar8327_init_port

Fetch the PORT_STATUS values in ar8327_hw_init and
store those in a private data stucture for later use.

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

File:
1 edited

Legend:

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

    r36044 r36045  
    7878}; 
    7979 
     80struct ar8327_data { 
     81        u32 port0_status; 
     82        u32 port6_status; 
     83}; 
     84 
    8085struct ar8xxx_priv { 
    8186        struct switch_dev dev; 
     
    9095        u8 chip_rev; 
    9196        const struct ar8xxx_chip *chip; 
     97        union { 
     98                struct ar8327_data ar8327; 
     99        } chip_data; 
    92100        bool initialized; 
    93101        bool port4_phy; 
     
    10361044        struct ar8327_platform_data *pdata; 
    10371045        struct ar8327_led_cfg *led_cfg; 
     1046        struct ar8327_data *data; 
    10381047        struct mii_bus *bus; 
    10391048        u32 pos, new_pos; 
     
    10441053        if (!pdata) 
    10451054                return -EINVAL; 
     1055 
     1056        data = &priv->chip_data.ar8327; 
     1057 
     1058        data->port0_status = ar8327_get_port_init_status(&pdata->port0_cfg); 
     1059        data->port6_status = ar8327_get_port_init_status(&pdata->port6_cfg); 
    10461060 
    10471061        t = ar8327_get_pad_cfg(pdata->pad0_cfg); 
     
    11181132ar8327_init_port(struct ar8xxx_priv *priv, int port) 
    11191133{ 
    1120         struct ar8327_platform_data *pdata; 
    11211134        u32 t; 
    11221135 
    1123         pdata = priv->phy->dev.platform_data; 
    1124  
    11251136        if (port == AR8216_PORT_CPU) 
    1126                 t = ar8327_get_port_init_status(&pdata->port0_cfg); 
     1137                t = priv->chip_data.ar8327.port0_status; 
    11271138        else if (port == 6) 
    1128                 t = ar8327_get_port_init_status(&pdata->port6_cfg); 
     1139                t = priv->chip_data.ar8327.port6_status; 
    11291140        else 
    11301141                t = AR8216_PORT_STATUS_LINK_AUTO; 
Note: See TracChangeset for help on using the changeset viewer.