net: fec: add Wake-on-LAN support
authorNimrod Andy <B38611@freescale.com>
Wed, 24 Dec 2014 09:30:39 +0000 (17:30 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Dec 2014 18:06:50 +0000 (13:06 -0500)
commitde40ed31b3c577cefd7b54972365a272ecbe9dd6
tree2d74ddd3e075563f713332dfe0449bd5567a557c
parent03366a33db91abd298457b0f707187247f1a6b7d
net: fec: add Wake-on-LAN support

Support for Wake-on-LAN using Magic Packet. ENET IP supports sleep mode
in low power status, when system enter suspend status, Magic packet can
wake up system even if all SOC clocks are gate. The patch doing below things:
- flagging the device as a wakeup source for the system, as well as
  its Wake-on-LAN interrupt
- prepare the hardware for entering WoL mode
- add standard ethtool WOL interface
- enable the ENET interrupt to wake us

Tested on i.MX6q/dl sabresd, sabreauto boards, i.MX6SX arm2 boards.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/devicetree/bindings/net/fsl-fec.txt
drivers/net/ethernet/freescale/fec.h
drivers/net/ethernet/freescale/fec_main.c
include/linux/fec.h