• Fugang Duan's avatar
    net: ethernet: fec: move GPR register offset and bit into DT · 8a448bf8
    Fugang Duan authored
    The commit da722186 (net: fec: set GPR bit on suspend by DT
    configuration) set the GPR reigster offset and bit in driver for
    wake on lan feature.
    
    But it introduces two issues here:
    - one SOC has two instances, they have different bit
    - different SOCs may have different offset and bit
    
    So to support wake-on-lan feature on other i.MX platforms, it should
    configure the GPR reigster offset and bit from DT.
    
    So the patch is to improve the commit da722186 (net: fec: set GPR
    bit on suspend by DT configuration) to support multiple ethernet
    instances on i.MX series.
    
    v2:
     * switch back to store the quirks bitmask in driver_data
    v3:
     * suggested by Sascha Hauer, use a struct fec_devinfo for
       abstracting differences between different hardware variants,
       it can give more freedom to describe the differences.
    Signed-off-by: default avatarFugang Duan <fugang.duan@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8a448bf8
fec_main.c 101 KB