halmac_pcie_88xx.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. ******************************************************************************/
  15. #ifndef _HALMAC_PCIE_88XX_H_
  16. #define _HALMAC_PCIE_88XX_H_
  17. #include "../halmac_api.h"
  18. #if (HALMAC_88XX_SUPPORT && HALMAC_PCIE_SUPPORT)
  19. enum halmac_ret_status
  20. init_pcie_cfg_88xx(struct halmac_adapter *adapter);
  21. enum halmac_ret_status
  22. deinit_pcie_cfg_88xx(struct halmac_adapter *adapter);
  23. enum halmac_ret_status
  24. cfg_pcie_rx_agg_88xx(struct halmac_adapter *adapter,
  25. struct halmac_rxagg_cfg *cfg);
  26. u8
  27. reg_r8_pcie_88xx(struct halmac_adapter *adapter, u32 offset);
  28. enum halmac_ret_status
  29. reg_w8_pcie_88xx(struct halmac_adapter *adapter, u32 offset, u8 value);
  30. u16
  31. reg_r16_pcie_88xx(struct halmac_adapter *adapter, u32 offset);
  32. enum halmac_ret_status
  33. reg_w16_pcie_88xx(struct halmac_adapter *adapter, u32 offset, u16 value);
  34. u32
  35. reg_r32_pcie_88xx(struct halmac_adapter *adapter, u32 offset);
  36. enum halmac_ret_status
  37. reg_w32_pcie_88xx(struct halmac_adapter *adapter, u32 offset, u32 value);
  38. enum halmac_ret_status
  39. cfg_txagg_pcie_align_88xx(struct halmac_adapter *adapter, u8 enable,
  40. u16 align_size);
  41. enum halmac_ret_status
  42. tx_allowed_pcie_88xx(struct halmac_adapter *adapter, u8 *buf, u32 size);
  43. u32
  44. pcie_indirect_reg_r32_88xx(struct halmac_adapter *adapter, u32 offset);
  45. enum halmac_ret_status
  46. pcie_reg_rn_88xx(struct halmac_adapter *adapter, u32 offset, u32 size,
  47. u8 *value);
  48. enum halmac_ret_status
  49. set_pcie_bulkout_num_88xx(struct halmac_adapter *adapter, u8 num);
  50. enum halmac_ret_status
  51. get_pcie_tx_addr_88xx(struct halmac_adapter *adapter, u8 *buf, u32 size,
  52. u32 *cmd53_addr);
  53. enum halmac_ret_status
  54. get_pcie_bulkout_id_88xx(struct halmac_adapter *adapter, u8 *buf, u32 size,
  55. u8 *id);
  56. enum halmac_ret_status
  57. mdio_write_88xx(struct halmac_adapter *adapter, u8 addr, u16 data, u8 speed);
  58. u16
  59. mdio_read_88xx(struct halmac_adapter *adapter, u8 addr, u8 speed);
  60. enum halmac_ret_status
  61. dbi_w32_88xx(struct halmac_adapter *adapter, u16 addr, u32 data);
  62. u32
  63. dbi_r32_88xx(struct halmac_adapter *adapter, u16 addr);
  64. enum halmac_ret_status
  65. dbi_w8_88xx(struct halmac_adapter *adapter, u16 addr, u8 data);
  66. u8
  67. dbi_r8_88xx(struct halmac_adapter *adapter, u16 addr);
  68. enum halmac_ret_status
  69. trxdma_check_idle_88xx(struct halmac_adapter *adapter);
  70. void
  71. en_ref_autok_88xx(struct halmac_adapter *dapter, u8 en);
  72. #endif /* HALMAC_88XX_SUPPORT */
  73. #endif/* _HALMAC_PCIE_88XX_H_ */