Lines Matching refs:rtwdev
12 static void switch_efuse_bank(struct rtw_dev *rtwdev) in switch_efuse_bank() argument
14 rtw_write32_mask(rtwdev, REG_LDO_EFUSE_CTRL, BIT_MASK_EFUSE_BANK_SEL, in switch_efuse_bank()
38 static int rtw_dump_logical_efuse_map(struct rtw_dev *rtwdev, u8 *phy_map, in rtw_dump_logical_efuse_map() argument
41 u32 physical_size = rtwdev->efuse.physical_size; in rtw_dump_logical_efuse_map()
42 u32 protect_size = rtwdev->efuse.protect_size; in rtw_dump_logical_efuse_map()
43 u32 logical_size = rtwdev->efuse.logical_size; in rtw_dump_logical_efuse_map()
85 static int rtw_dump_physical_efuse_map(struct rtw_dev *rtwdev, u8 *map) in rtw_dump_physical_efuse_map() argument
87 struct rtw_chip_info *chip = rtwdev->chip; in rtw_dump_physical_efuse_map()
88 u32 size = rtwdev->efuse.physical_size; in rtw_dump_physical_efuse_map()
93 switch_efuse_bank(rtwdev); in rtw_dump_physical_efuse_map()
96 chip->ops->cfg_ldo25(rtwdev, false); in rtw_dump_physical_efuse_map()
98 efuse_ctl = rtw_read32(rtwdev, REG_EFUSE_CTRL); in rtw_dump_physical_efuse_map()
103 rtw_write32(rtwdev, REG_EFUSE_CTRL, efuse_ctl & (~BIT_EF_FLAG)); in rtw_dump_physical_efuse_map()
108 efuse_ctl = rtw_read32(rtwdev, REG_EFUSE_CTRL); in rtw_dump_physical_efuse_map()
119 int rtw_parse_efuse_map(struct rtw_dev *rtwdev) in rtw_parse_efuse_map() argument
121 struct rtw_chip_info *chip = rtwdev->chip; in rtw_parse_efuse_map()
122 struct rtw_efuse *efuse = &rtwdev->efuse; in rtw_parse_efuse_map()
136 ret = rtw_dump_physical_efuse_map(rtwdev, phy_map); in rtw_parse_efuse_map()
138 rtw_err(rtwdev, "failed to dump efuse physical map\n"); in rtw_parse_efuse_map()
143 ret = rtw_dump_logical_efuse_map(rtwdev, phy_map, log_map); in rtw_parse_efuse_map()
145 rtw_err(rtwdev, "failed to dump efuse logical map\n"); in rtw_parse_efuse_map()
149 ret = chip->ops->read_efuse(rtwdev, log_map); in rtw_parse_efuse_map()
151 rtw_err(rtwdev, "failed to read efuse map\n"); in rtw_parse_efuse_map()