Path: blob/master/ALFA-W1F1/RTL8814AU/hal/efuse/rtl8814a/HalEfuseMask8814A_PCIE.c
1308 views
/******************************************************************************1*2* Copyright(c) 2007 - 2017 Realtek Corporation.3*4* This program is free software; you can redistribute it and/or modify it5* under the terms of version 2 of the GNU General Public License as6* published by the Free Software Foundation.7*8* This program is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for11* more details.12*13*****************************************************************************/14#include <drv_types.h>1516#include "HalEfuseMask8814A_PCIE.h"1718/******************************************************************************19* MPCIE.TXT20******************************************************************************/2122u8 Array_MP_8814A_MPCIE[] = {230xFF,240xFF,250xFF,260xFF,270xFF,280xFF,290xFF,300xFF,310xFF,320xFF,330xFF,340xFF,350xFF,360xFF,370x10,380x00,390x00,400x00,410xF0,420x00,430x00,440x00,450x00,460x00,470x00,480x00,490x00,500x00,510x00,520x00,530x00,540x00,5556};5758u1659EFUSE_GetArrayLen_MP_8814A_MPCIE(void)60{61return sizeof(Array_MP_8814A_MPCIE) / sizeof(u8);62}6364void65EFUSE_GetMaskArray_MP_8814A_MPCIE(u8 *Array)66{67u16 len = EFUSE_GetArrayLen_MP_8814A_MPCIE(), i = 0;6869for (i = 0; i < len; ++i)70Array[i] = Array_MP_8814A_MPCIE[i];71}7273BOOLEAN74EFUSE_IsAddressMasked_MP_8814A_MPCIE(u16 Offset)75{76int r = Offset / 16;77int c = (Offset % 16) / 2;78int result = 0;7980if (c < 4) /*Upper double word*/81result = (Array_MP_8814A_MPCIE[r] & (0x10 << c));82else83result = (Array_MP_8814A_MPCIE[r] & (0x01 << (c - 4)));8485return (result > 0) ? 0 : 1;86}878889