drivers: net: xgene: Fix module unload crash - clkrst sequence
authorIyappan Subramanian <isubramanian@apm.com>
Tue, 26 Jul 2016 00:12:39 +0000 (17:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Jul 2016 04:51:43 +0000 (21:51 -0700)
commitbc61167ac816621c94f722177d2ae718c103005f
tree7dff7725a564e25c5eac002043a0ba7dd5ba0342
parentcb0366b7c16427a25923350b69f53a5b1345a34b
drivers: net: xgene: Fix module unload crash - clkrst sequence

This patch fixes clock reset sequence.

- Added clock reset sequence for ACPI
- Added delay in clock reset sequence to make sure pulse is generated
- Added clk_unprepare_disable() in port shutdown to make sure
  clock increment/decrement counts are matching
- Removed MII_MGMT_CONFIG programming, since it is not required
- Fixed programming XGENET_CONFIG_REG to enable SGMII mode

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Tested-by: Fushen Chen <fchen@apm.com>
Tested-by: Toan Le <toanle@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c
drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.h
drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c