diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2015-02-05 20:40:42 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-08 07:38:40 +0100 |
commit | 9af197a8f6ecab8c22e4ad0167616151fce5a4cb (patch) | |
tree | 95f757336beda2400a803524c21a5ea2e2207119 /drivers/net/dsa/bcm_sf2_regs.h | |
parent | net: dsa: bcm_sf2: move GPHY enabling to its own function (diff) | |
download | linux-9af197a8f6ecab8c22e4ad0167616151fce5a4cb.tar.xz linux-9af197a8f6ecab8c22e4ad0167616151fce5a4cb.zip |
net: dsa: bcm_sf2: implement GPHY power down
Implement the power on/off recommended procedure for the Single GPHY we
have on our Starfighter 2 switch. In order to make sure we get proper
LED link/activity signaling during suspend, switch the link indication
from the Switch/MAC to the PHY.
Finally, since the GPHY needs to be reset to be put in low power mode,
we will loose any context applied to it: workarounds, EEE etc.. so we
need to call phy_init_hw() to get our fixups re-applied successfully.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/bcm_sf2_regs.h')
-rw-r--r-- | drivers/net/dsa/bcm_sf2_regs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/dsa/bcm_sf2_regs.h b/drivers/net/dsa/bcm_sf2_regs.h index 1bb49cb699ab..cabdfa5e217a 100644 --- a/drivers/net/dsa/bcm_sf2_regs.h +++ b/drivers/net/dsa/bcm_sf2_regs.h @@ -61,6 +61,10 @@ #define LPI_COUNT_SHIFT 9 #define LPI_COUNT_MASK 0x3F +#define REG_LED_CNTRL_BASE 0x90 +#define REG_LED_CNTRL(x) (REG_LED_CNTRL_BASE + (x) * 4) +#define SPDLNK_SRC_SEL (1 << 24) + /* Register set relative to 'INTRL2_0' and 'INTRL2_1' */ #define INTRL2_CPU_STATUS 0x00 #define INTRL2_CPU_SET 0x04 |