net: ethernet: fec: move GPR register offset and bit into DT
authorFugang Duan <fugang.duan@nxp.com>
Mon, 25 May 2020 16:27:10 +0000 (00:27 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 May 2020 03:21:43 +0000 (20:21 -0700)
commit8a448bf832af537d26aa557d183a16943dce4510
treee6730fb900c89b555b0745fd04821c21bdb3bef3
parent09d0310f07672b7e3e60cf719b96c803f4830e5c
net: ethernet: fec: move GPR register offset and bit into DT

The commit da722186f654 (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 da722186f654 (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: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c