phydm_iqk.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2011 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. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. #ifndef __PHYDMIQK_H__
  21. #define __PHYDMIQK_H__
  22. /*--------------------------Define Parameters-------------------------------*/
  23. #define LOK_delay 1
  24. #define WBIQK_delay 10
  25. #define TX_IQK 0
  26. #define RX_IQK 1
  27. #define TXIQK 0
  28. #define RXIQK1 1
  29. #define RXIQK2 2
  30. #define kcount_limit_80m 2
  31. #define kcount_limit_others 4
  32. #define rxiqk_gs_limit 4
  33. #define NUM 4
  34. /*---------------------------End Define Parameters-------------------------------*/
  35. struct _IQK_INFORMATION {
  36. boolean LOK_fail[NUM];
  37. boolean IQK_fail[2][NUM];
  38. u32 iqc_matrix[2][NUM];
  39. u8 iqk_times;
  40. u32 rf_reg18;
  41. u32 lna_idx;
  42. u8 rxiqk_step;
  43. u8 tmp1bcc;
  44. u8 kcount;
  45. u32 iqk_channel[2];
  46. boolean IQK_fail_report[2][4][2]; /*channel/path/TRX(TX:0, RX:1) */
  47. u32 IQK_CFIR_real[2][4][2][8]; /*channel / path / TRX(TX:0, RX:1) / CFIR_real*/
  48. u32 IQK_CFIR_imag[2][4][2][8]; /*channel / path / TRX(TX:0, RX:1) / CFIR_imag*/
  49. u8 retry_count[2][4][3]; /* channel / path / (TXK:0, RXK1:1, RXK2:2) */
  50. u8 gs_retry_count[2][4][2]; /* channel / path / (GSRXK1:0, GSRXK2:1) */
  51. u8 RXIQK_fail_code[2][4]; /* channel / path 0:SRXK1 fail, 1:RXK1 fail 2:RXK2 fail */
  52. u32 LOK_IDAC[2][4]; /*channel / path*/
  53. u16 RXIQK_AGC[2][4]; /*channel / path*/
  54. u32 bypass_iqk[2][4]; /*channel / 0xc94/0xe94*/
  55. u32 tmp_GNTWL;
  56. boolean is_BTG;
  57. boolean isbnd;
  58. };
  59. #endif