enet.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Applied Micro X-Gene SoC Ethernet v2 Driver
  3. *
  4. * Copyright (c) 2017, Applied Micro Circuits Corporation
  5. * Author(s): Iyappan Subramanian <isubramanian@apm.com>
  6. * Keyur Chudgar <kchudgar@apm.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License as published by the
  10. * Free Software Foundation; either version 2 of the License, or (at your
  11. * option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. */
  21. #ifndef __XGENE_ENET_V2_ENET_H__
  22. #define __XGENE_ENET_V2_ENET_H__
  23. #define ENET_CLKEN 0xc008
  24. #define ENET_SRST 0xc000
  25. #define ENET_SHIM 0xc010
  26. #define CFG_MEM_RAM_SHUTDOWN 0xd070
  27. #define BLOCK_MEM_RDY 0xd074
  28. #define MEM_RDY 0xffffffff
  29. #define DEVM_ARAUX_COH BIT(19)
  30. #define DEVM_AWAUX_COH BIT(3)
  31. #define CFG_FORCE_LINK_STATUS_EN 0x229c
  32. #define FORCE_LINK_STATUS 0x22a0
  33. #define CFG_LINK_AGGR_RESUME 0x27c8
  34. #define RX_DV_GATE_REG 0x2dfc
  35. void xge_wr_csr(struct xge_pdata *pdata, u32 offset, u32 val);
  36. u32 xge_rd_csr(struct xge_pdata *pdata, u32 offset);
  37. int xge_port_reset(struct net_device *ndev);
  38. void xge_port_init(struct net_device *ndev);
  39. #endif /* __XGENE_ENET_V2_ENET__H__ */