HalEfuseMask8821C_SDIO.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. /* #include "Mp_Precomp.h" */
  21. /* #include "../odm_precomp.h" */
  22. #include <drv_types.h>
  23. #include "HalEfuseMask8821C_SDIO.h"
  24. /******************************************************************************
  25. * MSDIO.TXT
  26. ******************************************************************************/
  27. u1Byte Array_MP_8821C_MSDIO[] = {
  28. 0xFF,
  29. 0xF3,
  30. 0xEF,
  31. 0x9E,
  32. 0x70,
  33. 0x00,
  34. 0x00,
  35. 0x00,
  36. 0x00,
  37. 0x00,
  38. 0x00,
  39. 0x03,
  40. 0xF7,
  41. 0xFF,
  42. 0xFF,
  43. 0xFF,
  44. 0xFF,
  45. 0xFF,
  46. 0x00,
  47. 0x00,
  48. 0x00,
  49. 0x00,
  50. 0x00,
  51. 0x00,
  52. 0x00,
  53. 0x00,
  54. 0x00,
  55. 0x00,
  56. 0x00,
  57. 0x00,
  58. 0x00,
  59. 0x00,
  60. };
  61. u2Byte
  62. EFUSE_GetArrayLen_MP_8821C_MSDIO(VOID)
  63. {
  64. return sizeof(Array_MP_8821C_MSDIO) / sizeof(u1Byte);
  65. }
  66. VOID
  67. EFUSE_GetMaskArray_MP_8821C_MSDIO(
  68. IN OUT pu1Byte Array
  69. )
  70. {
  71. u2Byte len = EFUSE_GetArrayLen_MP_8821C_MSDIO(), i = 0;
  72. for (i = 0; i < len; ++i)
  73. Array[i] = Array_MP_8821C_MSDIO[i];
  74. }
  75. BOOLEAN
  76. EFUSE_IsAddressMasked_MP_8821C_MSDIO(
  77. IN u2Byte Offset
  78. )
  79. {
  80. int r = Offset / 16;
  81. int c = (Offset % 16) / 2;
  82. int result = 0;
  83. if (c < 4) /* Upper double word */
  84. result = (Array_MP_8821C_MSDIO[r] & (0x10 << c));
  85. else
  86. result = (Array_MP_8821C_MSDIO[r] & (0x01 << (c - 4)));
  87. return (result > 0) ? 0 : 1;
  88. }