summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bcmsysport.h
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2014-07-01 21:08:40 -0700
committerDavid S. Miller <davem@davemloft.net>2014-07-07 20:56:47 -0700
commit83e82f4c706bbca3e2d9d7962e63605cc7a5fbd8 (patch)
tree5b594a1a1946c8c42609ae8ded841067bf94dd68 /drivers/net/ethernet/broadcom/bcmsysport.h
parent9d34c1cb01ddef8e99c7855513a578c066f8300f (diff)
downloadlinux-83e82f4c706bbca3e2d9d7962e63605cc7a5fbd8.tar.bz2
net: systemport: add Wake-on-LAN support
Support for Wake-on-LAN using Magic Packet with or without SecureOn password is implemented doing the following: - setting the password to the relevant UniMAC registers - 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 - enabling the MPD interrupt to wake us The Device Tree binding documentation is also reflected to specify the third optional Wake-on-LAN interrupt line. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bcmsysport.h')
-rw-r--r--drivers/net/ethernet/broadcom/bcmsysport.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.h b/drivers/net/ethernet/broadcom/bcmsysport.h
index 20ea7162478f..b08dab828101 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.h
+++ b/drivers/net/ethernet/broadcom/bcmsysport.h
@@ -246,6 +246,15 @@ struct bcm_rsb {
#define MIB_RX_CNT_RST (1 << 0)
#define MIB_RUNT_CNT_RST (1 << 1)
#define MIB_TX_CNT_RST (1 << 2)
+
+#define UMAC_MPD_CTRL 0x620
+#define MPD_EN (1 << 0)
+#define MSEQ_LEN_SHIFT 16
+#define MSEQ_LEN_MASK 0xff
+#define PSW_EN (1 << 27)
+
+#define UMAC_PSW_MS 0x624
+#define UMAC_PSW_LS 0x628
#define UMAC_MDF_CTRL 0x650
#define UMAC_MDF_ADDR 0x654
@@ -642,6 +651,7 @@ struct bcm_sysport_priv {
struct platform_device *pdev;
int irq0;
int irq1;
+ int wol_irq;
/* Transmit rings */
struct bcm_sysport_tx_ring tx_rings[TDMA_NUM_RINGS];
@@ -668,6 +678,8 @@ struct bcm_sysport_priv {
unsigned int tsb_en:1;
unsigned int crc_fwd:1;
u16 rev;
+ u32 wolopts;
+ unsigned int wol_irq_disabled:1;
/* MIB related fields */
struct bcm_sysport_mib mib;