Changeset 30997


Ignore:
Timestamp:
2012-03-18T23:06:12+01:00 (4 years ago)
Author:
juhosg
Message:

generic: ar8216: add a separate structure for chip specific stuff

Also add a hw_init function into that.

File:
1 edited

Legend:

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

    r30996 r30997  
    3737#define AR8X16_PROBE_RETRIES    10 
    3838 
     39struct ar8xxx_chip { 
     40}; 
     41 
    3942struct ar8216_priv { 
    4043        struct switch_dev dev; 
     
    4649        struct mutex reg_mutex; 
    4750        int chip_type; 
     51        const struct ar8xxx_chip *chip; 
    4852        bool initialized; 
    4953        bool port4_phy; 
     
    736740        } 
    737741} 
     742 
     743static const struct ar8xxx_chip ar8216_chip = { 
     744}; 
     745 
     746static const struct ar8xxx_chip ar8236_chip = { 
     747}; 
     748 
     749static const struct ar8xxx_chip ar8316_chip = { 
     750}; 
    738751 
    739752static int 
     
    811824        case 0x0101: 
    812825                priv->chip_type = AR8216; 
     826                priv->chip = &ar8216_chip; 
    813827                break; 
    814828        case 0x0301: 
    815829                priv->chip_type = AR8236; 
     830                priv->chip = &ar8236_chip; 
    816831                break; 
    817832        case 0x1000: 
    818833        case 0x1001: 
    819834                priv->chip_type = AR8316; 
     835                priv->chip = &ar8316_chip; 
    820836                break; 
    821837        default: 
Note: See TracChangeset for help on using the changeset viewer.