xgene_enet_xgmac.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* Applied Micro X-Gene SoC Ethernet Driver
  2. *
  3. * Copyright (c) 2014, Applied Micro Circuits Corporation
  4. * Authors: Iyappan Subramanian <isubramanian@apm.com>
  5. * Keyur Chudgar <kchudgar@apm.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the
  9. * Free Software Foundation; either version 2 of the License, or (at your
  10. * option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #ifndef __XGENE_ENET_XGMAC_H__
  21. #define __XGENE_ENET_XGMAC_H__
  22. #define BLOCK_AXG_MAC_OFFSET 0x0800
  23. #define BLOCK_AXG_MAC_CSR_OFFSET 0x2000
  24. #define AXGMAC_CONFIG_0 0x0000
  25. #define AXGMAC_CONFIG_1 0x0004
  26. #define HSTMACRST BIT(31)
  27. #define HSTTCTLEN BIT(31)
  28. #define HSTTFEN BIT(30)
  29. #define HSTRCTLEN BIT(29)
  30. #define HSTRFEN BIT(28)
  31. #define HSTPPEN BIT(7)
  32. #define HSTDRPLT64 BIT(5)
  33. #define HSTLENCHK BIT(3)
  34. #define HSTMACADR_LSW_ADDR 0x0010
  35. #define HSTMACADR_MSW_ADDR 0x0014
  36. #define HSTMAXFRAME_LENGTH_ADDR 0x0020
  37. #define XG_RSIF_CONFIG_REG_ADDR 0x00a0
  38. #define XCLE_BYPASS_REG0_ADDR 0x0160
  39. #define XCLE_BYPASS_REG1_ADDR 0x0164
  40. #define XG_CFG_BYPASS_ADDR 0x0204
  41. #define XG_LINK_STATUS_ADDR 0x0228
  42. #define XG_ENET_SPARE_CFG_REG_ADDR 0x040c
  43. #define XG_ENET_SPARE_CFG_REG_1_ADDR 0x0410
  44. #define XGENET_RX_DV_GATE_REG_0_ADDR 0x0804
  45. extern struct xgene_mac_ops xgene_xgmac_ops;
  46. extern struct xgene_port_ops xgene_xgport_ops;
  47. #endif /* __XGENE_ENET_XGMAC_H__ */