HalVerDef.h (910B)
1/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2/* Copyright(c) 2007 - 2011 Realtek Corporation. */ 3#ifndef __HAL_VERSION_DEF_H__ 4#define __HAL_VERSION_DEF_H__ 5 6enum HAL_CHIP_TYPE { 7 TEST_CHIP = 0, 8 NORMAL_CHIP = 1, 9}; 10 11enum HAL_CUT_VERSION { 12 A_CUT_VERSION = 0, 13 B_CUT_VERSION = 1, 14 C_CUT_VERSION = 2, 15 D_CUT_VERSION = 3, 16 E_CUT_VERSION = 4, 17}; 18 19enum HAL_VENDOR { 20 CHIP_VENDOR_TSMC = 0, 21 CHIP_VENDOR_UMC = 1, 22}; 23 24struct HAL_VERSION { 25 enum HAL_CHIP_TYPE ChipType; 26 enum HAL_CUT_VERSION CUTVersion; 27 enum HAL_VENDOR VendorType; 28}; 29 30/* Get element */ 31#define GET_CVID_CHIP_TYPE(version) (((version).ChipType)) 32#define GET_CVID_MANUFACTUER(version) (((version).VendorType)) 33 34/* HAL_CHIP_TYPE_E */ 35#define IS_NORMAL_CHIP(version) \ 36 (GET_CVID_CHIP_TYPE(version) == NORMAL_CHIP) 37 38/* HAL_VENDOR_E */ 39#define IS_CHIP_VENDOR_TSMC(version) \ 40 (GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_TSMC) 41 42#endif