initial commit

This commit is contained in:
morrownr
2022-11-17 08:26:57 -06:00
commit 1d6ef930b9
724 changed files with 771892 additions and 0 deletions

188
hal/efuse/efuse_mask.h Normal file
View File

@@ -0,0 +1,188 @@
/******************************************************************************
*
* Copyright(c) 2016 - 2017 Realtek Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
*****************************************************************************/
#ifdef CONFIG_USB_HCI
#if defined(CONFIG_RTL8188E)
#include "rtl8188e/HalEfuseMask8188E_USB.h"
#endif
#if defined(CONFIG_RTL8812A)
#include "rtl8812a/HalEfuseMask8812A_USB.h"
#endif
#if defined(CONFIG_RTL8821A)
#include "rtl8812a/HalEfuseMask8821A_USB.h"
#endif
#if defined(CONFIG_RTL8192E)
#include "rtl8192e/HalEfuseMask8192E_USB.h"
#endif
#if defined(CONFIG_RTL8723B)
#include "rtl8723b/HalEfuseMask8723B_USB.h"
#endif
#if defined(CONFIG_RTL8814A)
#include "rtl8814a/HalEfuseMask8814A_USB.h"
#endif
#if defined(CONFIG_RTL8703B)
#include "rtl8703b/HalEfuseMask8703B_USB.h"
#endif
#if defined(CONFIG_RTL8723D)
#include "rtl8723d/HalEfuseMask8723D_USB.h"
#endif
#if defined(CONFIG_RTL8188F)
#include "rtl8188f/HalEfuseMask8188F_USB.h"
#endif
#if defined(CONFIG_RTL8188GTV)
#include "rtl8188gtv/HalEfuseMask8188GTV_USB.h"
#endif
#if defined(CONFIG_RTL8822B)
#include "rtl8822b/HalEfuseMask8822B_USB.h"
#endif
#if defined(CONFIG_RTL8821C)
#include "rtl8821c/HalEfuseMask8821C_USB.h"
#endif
#if defined(CONFIG_RTL8710B)
#include "rtl8710b/HalEfuseMask8710B_USB.h"
#endif
#if defined(CONFIG_RTL8192F)
#include "rtl8192f/HalEfuseMask8192F_USB.h"
#endif
#if defined(CONFIG_RTL8822C)
#include "rtl8822c/HalEfuseMask8822C_USB.h"
#endif
#if defined(CONFIG_RTL8814B)
#include "rtl8814b/HalEfuseMask8814B_USB.h"
#endif
#if defined(CONFIG_RTL8723F)
#include "rtl8723f/HalEfuseMask8723F_USB.h"
#endif
#endif /*CONFIG_USB_HCI*/
#ifdef CONFIG_PCI_HCI
#if defined(CONFIG_RTL8188E)
#include "rtl8188e/HalEfuseMask8188E_PCIE.h"
#endif
#if defined(CONFIG_RTL8812A)
#include "rtl8812a/HalEfuseMask8812A_PCIE.h"
#endif
#if defined(CONFIG_RTL8821A)
#include "rtl8812a/HalEfuseMask8821A_PCIE.h"
#endif
#if defined(CONFIG_RTL8192E)
#include "rtl8192e/HalEfuseMask8192E_PCIE.h"
#endif
#if defined(CONFIG_RTL8723B)
#include "rtl8723b/HalEfuseMask8723B_PCIE.h"
#endif
#if defined(CONFIG_RTL8814A)
#include "rtl8814a/HalEfuseMask8814A_PCIE.h"
#endif
#if defined(CONFIG_RTL8703B)
#include "rtl8703b/HalEfuseMask8703B_PCIE.h"
#endif
#if defined(CONFIG_RTL8822B)
#include "rtl8822b/HalEfuseMask8822B_PCIE.h"
#endif
#if defined(CONFIG_RTL8723D)
#include "rtl8723d/HalEfuseMask8723D_PCIE.h"
#endif
#if defined(CONFIG_RTL8821C)
#include "rtl8821c/HalEfuseMask8821C_PCIE.h"
#endif
#if defined(CONFIG_RTL8192F)
#include "rtl8192f/HalEfuseMask8192F_PCIE.h"
#endif
#if defined(CONFIG_RTL8822C)
#include "rtl8822c/HalEfuseMask8822C_PCIE.h"
#endif
#if defined(CONFIG_RTL8814B)
#include "rtl8814b/HalEfuseMask8814B_PCIE.h"
#endif
#endif /*CONFIG_PCI_HCI*/
#ifdef CONFIG_SDIO_HCI
#if defined(CONFIG_RTL8723B)
#include "rtl8723b/HalEfuseMask8723B_SDIO.h"
#endif
#if defined(CONFIG_RTL8188E)
#include "rtl8188e/HalEfuseMask8188E_SDIO.h"
#endif
#if defined(CONFIG_RTL8703B)
#include "rtl8703b/HalEfuseMask8703B_SDIO.h"
#endif
#if defined(CONFIG_RTL8188F)
#include "rtl8188f/HalEfuseMask8188F_SDIO.h"
#endif
#if defined(CONFIG_RTL8188GTV)
#include "rtl8188gtv/HalEfuseMask8188GTV_SDIO.h"
#endif
#if defined(CONFIG_RTL8723D)
#include "rtl8723d/HalEfuseMask8723D_SDIO.h"
#endif
#if defined(CONFIG_RTL8192E)
#include "rtl8192e/HalEfuseMask8192E_SDIO.h"
#endif
#if defined(CONFIG_RTL8821A)
#include "rtl8812a/HalEfuseMask8821A_SDIO.h"
#endif
#if defined(CONFIG_RTL8821C)
#include "rtl8821c/HalEfuseMask8821C_SDIO.h"
#endif
#if defined(CONFIG_RTL8822B)
#include "rtl8822b/HalEfuseMask8822B_SDIO.h"
#endif
#if defined(CONFIG_RTL8192F)
#include "rtl8192f/HalEfuseMask8192F_SDIO.h"
#endif
#if defined(CONFIG_RTL8822C)
#include "rtl8822c/HalEfuseMask8822C_SDIO.h"
#endif
#if defined(CONFIG_RTL8723F)
#include "rtl8723f/HalEfuseMask8723F_SDIO.h"
#endif
#endif /*CONFIG_SDIO_HCI*/

View File

@@ -0,0 +1,95 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2017 Realtek Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
*****************************************************************************/
/* #include "Mp_Precomp.h" */
/* #include "../odm_precomp.h" */
#include <drv_types.h>
#include "HalEfuseMask8821C_PCIE.h"
/******************************************************************************
* MPCIE.TXT
******************************************************************************/
u8 Array_MP_8821C_MPCIE[] = {
0xFF,
0xF3,
0xEF,
0x9E,
0x70,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x03,
0xF7,
0xFF,
0xFF,
0xFF,
0xFF,
0xFF,
0xF1,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
};
u16
EFUSE_GetArrayLen_MP_8821C_MPCIE(void)
{
return sizeof(Array_MP_8821C_MPCIE) / sizeof(u8);
}
void
EFUSE_GetMaskArray_MP_8821C_MPCIE(
u8 *Array
)
{
u16 len = EFUSE_GetArrayLen_MP_8821C_MPCIE(), i = 0;
for (i = 0; i < len; ++i)
Array[i] = Array_MP_8821C_MPCIE[i];
}
BOOLEAN
EFUSE_IsAddressMasked_MP_8821C_MPCIE(
u16 Offset
)
{
int r = Offset / 16;
int c = (Offset % 16) / 2;
int result = 0;
if (c < 4) /* Upper double word */
result = (Array_MP_8821C_MPCIE[r] & (0x10 << c));
else
result = (Array_MP_8821C_MPCIE[r] & (0x01 << (c - 4)));
return (result > 0) ? 0 : 1;
}

View File

@@ -0,0 +1,34 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2017 Realtek Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
*****************************************************************************/
/******************************************************************************
* MPCIE.TXT
******************************************************************************/
u16
EFUSE_GetArrayLen_MP_8821C_MPCIE(void);
void
EFUSE_GetMaskArray_MP_8821C_MPCIE(
u8 *Array
);
BOOLEAN
EFUSE_IsAddressMasked_MP_8821C_MPCIE(/* TC: Test Chip, MP: MP Chip */
u16 Offset
);

View File

@@ -0,0 +1,95 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2017 Realtek Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
*****************************************************************************/
/* #include "Mp_Precomp.h" */
/* #include "../odm_precomp.h" */
#include <drv_types.h>
#include "HalEfuseMask8821C_SDIO.h"
/******************************************************************************
* MSDIO.TXT
******************************************************************************/
u8 Array_MP_8821C_MSDIO[] = {
0xFF,
0xF3,
0xEF,
0x9E,
0x70,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x03,
0xF7,
0xFF,
0xFF,
0xFF,
0xFF,
0xFF,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
};
u16
EFUSE_GetArrayLen_MP_8821C_MSDIO(void)
{
return sizeof(Array_MP_8821C_MSDIO) / sizeof(u8);
}
void
EFUSE_GetMaskArray_MP_8821C_MSDIO(
u8 *Array
)
{
u16 len = EFUSE_GetArrayLen_MP_8821C_MSDIO(), i = 0;
for (i = 0; i < len; ++i)
Array[i] = Array_MP_8821C_MSDIO[i];
}
BOOLEAN
EFUSE_IsAddressMasked_MP_8821C_MSDIO(
u16 Offset
)
{
int r = Offset / 16;
int c = (Offset % 16) / 2;
int result = 0;
if (c < 4) /* Upper double word */
result = (Array_MP_8821C_MSDIO[r] & (0x10 << c));
else
result = (Array_MP_8821C_MSDIO[r] & (0x01 << (c - 4)));
return (result > 0) ? 0 : 1;
}

View File

@@ -0,0 +1,34 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2017 Realtek Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
*****************************************************************************/
/******************************************************************************
* MSDIO.TXT
******************************************************************************/
u16
EFUSE_GetArrayLen_MP_8821C_MSDIO(void);
void
EFUSE_GetMaskArray_MP_8821C_MSDIO(
u8 *Array
);
BOOLEAN
EFUSE_IsAddressMasked_MP_8821C_MSDIO(/* TC: Test Chip, MP: MP Chip */
u16 Offset
);

View File

@@ -0,0 +1,95 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2017 Realtek Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
*****************************************************************************/
/* #include "Mp_Precomp.h" */
/* #include "../odm_precomp.h" */
#include <drv_types.h>
#include "HalEfuseMask8821C_USB.h"
/******************************************************************************
* MUSB.TXT
******************************************************************************/
u8 Array_MP_8821C_MUSB[] = {
0xFF,
0xF3,
0xEF,
0x9E,
0x70,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x03,
0xF7,
0x00,
0x00,
0x00,
0xFF,
0xFF,
0xFF,
0xFF,
0xC0,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
};
u16
EFUSE_GetArrayLen_MP_8821C_MUSB(void)
{
return sizeof(Array_MP_8821C_MUSB) / sizeof(u8);
}
void
EFUSE_GetMaskArray_MP_8821C_MUSB(
u8 *Array
)
{
u16 len = EFUSE_GetArrayLen_MP_8821C_MUSB(), i = 0;
for (i = 0; i < len; ++i)
Array[i] = Array_MP_8821C_MUSB[i];
}
BOOLEAN
EFUSE_IsAddressMasked_MP_8821C_MUSB(
u16 Offset
)
{
int r = Offset / 16;
int c = (Offset % 16) / 2;
int result = 0;
if (c < 4) /* Upper double word */
result = (Array_MP_8821C_MUSB[r] & (0x10 << c));
else
result = (Array_MP_8821C_MUSB[r] & (0x01 << (c - 4)));
return (result > 0) ? 0 : 1;
}

View File

@@ -0,0 +1,34 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2017 Realtek Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
*****************************************************************************/
/******************************************************************************
* MUSB.TXT
******************************************************************************/
u16
EFUSE_GetArrayLen_MP_8821C_MUSB(void);
void
EFUSE_GetMaskArray_MP_8821C_MUSB(
u8 *Array
);
BOOLEAN
EFUSE_IsAddressMasked_MP_8821C_MUSB(/* TC: Test Chip, MP: MP Chip */
u16 Offset
);