2022-06-08 23:46:35 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
|
|
|
/* Copyright(c) 2007 - 2011 Realtek Corporation. */
|
2013-05-08 21:45:39 +00:00
|
|
|
#ifndef __HAL_VERSION_DEF_H__
|
|
|
|
#define __HAL_VERSION_DEF_H__
|
|
|
|
|
2013-07-22 22:43:38 +00:00
|
|
|
enum HAL_CHIP_TYPE {
|
2013-08-14 02:01:38 +00:00
|
|
|
TEST_CHIP = 0,
|
2013-05-19 04:28:07 +00:00
|
|
|
NORMAL_CHIP = 1,
|
2013-07-22 22:43:38 +00:00
|
|
|
};
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-07-22 22:43:38 +00:00
|
|
|
enum HAL_CUT_VERSION {
|
2013-08-14 02:01:38 +00:00
|
|
|
A_CUT_VERSION = 0,
|
|
|
|
B_CUT_VERSION = 1,
|
|
|
|
C_CUT_VERSION = 2,
|
|
|
|
D_CUT_VERSION = 3,
|
|
|
|
E_CUT_VERSION = 4,
|
2013-07-22 22:43:38 +00:00
|
|
|
};
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-07-22 22:43:38 +00:00
|
|
|
enum HAL_VENDOR {
|
2013-05-19 04:28:07 +00:00
|
|
|
CHIP_VENDOR_TSMC = 0,
|
|
|
|
CHIP_VENDOR_UMC = 1,
|
2013-07-22 22:43:38 +00:00
|
|
|
};
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-07-22 22:43:38 +00:00
|
|
|
struct HAL_VERSION {
|
|
|
|
enum HAL_CHIP_TYPE ChipType;
|
|
|
|
enum HAL_CUT_VERSION CUTVersion;
|
|
|
|
enum HAL_VENDOR VendorType;
|
|
|
|
u8 ROMVer;
|
|
|
|
};
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
/* Get element */
|
2013-08-14 02:01:38 +00:00
|
|
|
#define GET_CVID_CHIP_TYPE(version) (((version).ChipType))
|
|
|
|
#define GET_CVID_MANUFACTUER(version) (((version).VendorType))
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
/* HAL_CHIP_TYPE_E */
|
2013-08-14 02:01:38 +00:00
|
|
|
#define IS_NORMAL_CHIP(version) \
|
|
|
|
((GET_CVID_CHIP_TYPE(version) == NORMAL_CHIP) ? true : false)
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
/* HAL_VENDOR_E */
|
2013-08-14 02:01:38 +00:00
|
|
|
#define IS_CHIP_VENDOR_TSMC(version) \
|
|
|
|
((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_TSMC) ? true : false)
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
#endif
|