File: efuse.h

package info (click to toggle)
linux 6.16.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,724,628 kB
  • sloc: ansic: 26,562,645; asm: 271,329; sh: 144,039; python: 72,469; makefile: 57,135; perl: 36,821; xml: 19,553; cpp: 5,820; yacc: 4,915; lex: 2,955; awk: 1,667; sed: 28; ruby: 25
file content (29 lines) | stat: -rw-r--r-- 1,014 bytes parent folder | download | duplicates (32)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
/* Copyright(c) 2018-2019  Realtek Corporation
 */

#ifndef __RTW_EFUSE_H__
#define __RTW_EFUSE_H__

#define EFUSE_HW_CAP_IGNORE		0
#define EFUSE_HW_CAP_PTCL_VHT		3
#define EFUSE_HW_CAP_SUPP_BW80		7
#define EFUSE_HW_CAP_SUPP_BW40		6

#define EFUSE_READ_FAIL			0xff

#define GET_EFUSE_HW_CAP_HCI(hw_cap)					       \
	le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(3, 0))
#define GET_EFUSE_HW_CAP_BW(hw_cap)					       \
	le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(18, 16))
#define GET_EFUSE_HW_CAP_NSS(hw_cap)					       \
	le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(20, 19))
#define GET_EFUSE_HW_CAP_ANT_NUM(hw_cap)				       \
	le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(23, 21))
#define GET_EFUSE_HW_CAP_PTCL(hw_cap)					       \
	le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(27, 26))

int rtw_parse_efuse_map(struct rtw_dev *rtwdev);
int rtw_read8_physical_efuse(struct rtw_dev *rtwdev, u16 addr, u8 *data);

#endif