Lines Matching refs:rtlefuse
197 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); in read_efuse() local
330 rtlefuse->efuse_usedbytes = efuse_utilized; in read_efuse()
332 rtlefuse->efuse_usedpercentage = efuse_usage; in read_efuse()
348 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); in efuse_shadow_update_chk() local
358 if (rtlefuse->efuse_map[EFUSE_INIT_MAP][base + i] != in efuse_shadow_update_chk()
359 rtlefuse->efuse_map[EFUSE_MODIFY_MAP][base + i] || in efuse_shadow_update_chk()
360 rtlefuse->efuse_map[EFUSE_INIT_MAP][base + i + 1] != in efuse_shadow_update_chk()
361 rtlefuse->efuse_map[EFUSE_MODIFY_MAP][base + i + in efuse_shadow_update_chk()
373 efuse_used = rtlefuse->efuse_usedbytes; in efuse_shadow_update_chk()
414 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); in efuse_shadow_update() local
422 efuse_read_all_map(hw, &rtlefuse->efuse_map[EFUSE_INIT_MAP][0]); in efuse_shadow_update()
423 memcpy(&rtlefuse->efuse_map[EFUSE_MODIFY_MAP][0], in efuse_shadow_update()
424 &rtlefuse->efuse_map[EFUSE_INIT_MAP][0], in efuse_shadow_update()
442 rtlefuse->efuse_map[EFUSE_INIT_MAP][base + i] = in efuse_shadow_update()
443 rtlefuse->efuse_map[EFUSE_MODIFY_MAP][base + i]; in efuse_shadow_update()
446 if (rtlefuse->efuse_map[EFUSE_INIT_MAP][base + i] != in efuse_shadow_update()
447 rtlefuse->efuse_map[EFUSE_MODIFY_MAP][base + i]) { in efuse_shadow_update()
450 rtlefuse->efuse_map[EFUSE_INIT_MAP][base + i] = in efuse_shadow_update()
451 rtlefuse->efuse_map[EFUSE_MODIFY_MAP][base + i]; in efuse_shadow_update()
460 &rtlefuse->efuse_map[EFUSE_MODIFY_MAP][base], in efuse_shadow_update()
475 efuse_read_all_map(hw, &rtlefuse->efuse_map[EFUSE_INIT_MAP][0]); in efuse_shadow_update()
477 memcpy(&rtlefuse->efuse_map[EFUSE_MODIFY_MAP][0], in efuse_shadow_update()
478 &rtlefuse->efuse_map[EFUSE_INIT_MAP][0], in efuse_shadow_update()
488 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); in rtl_efuse_shadow_map_update() local
490 if (rtlefuse->autoload_failflag) in rtl_efuse_shadow_map_update()
491 memset((&rtlefuse->efuse_map[EFUSE_INIT_MAP][0]), in rtl_efuse_shadow_map_update()
494 efuse_read_all_map(hw, &rtlefuse->efuse_map[EFUSE_INIT_MAP][0]); in rtl_efuse_shadow_map_update()
496 memcpy(&rtlefuse->efuse_map[EFUSE_MODIFY_MAP][0], in rtl_efuse_shadow_map_update()
497 &rtlefuse->efuse_map[EFUSE_INIT_MAP][0], in rtl_efuse_shadow_map_update()
522 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); in efuse_shadow_read_1byte() local
523 *value = rtlefuse->efuse_map[EFUSE_MODIFY_MAP][offset]; in efuse_shadow_read_1byte()
529 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); in efuse_shadow_read_2byte() local
531 *value = rtlefuse->efuse_map[EFUSE_MODIFY_MAP][offset]; in efuse_shadow_read_2byte()
532 *value |= rtlefuse->efuse_map[EFUSE_MODIFY_MAP][offset + 1] << 8; in efuse_shadow_read_2byte()
539 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); in efuse_shadow_read_4byte() local
541 *value = rtlefuse->efuse_map[EFUSE_MODIFY_MAP][offset]; in efuse_shadow_read_4byte()
542 *value |= rtlefuse->efuse_map[EFUSE_MODIFY_MAP][offset + 1] << 8; in efuse_shadow_read_4byte()
543 *value |= rtlefuse->efuse_map[EFUSE_MODIFY_MAP][offset + 2] << 16; in efuse_shadow_read_4byte()
544 *value |= rtlefuse->efuse_map[EFUSE_MODIFY_MAP][offset + 3] << 24; in efuse_shadow_read_4byte()
550 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); in efuse_shadow_write_1byte() local
552 rtlefuse->efuse_map[EFUSE_MODIFY_MAP][offset] = value; in efuse_shadow_write_1byte()
558 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); in efuse_shadow_write_2byte() local
560 rtlefuse->efuse_map[EFUSE_MODIFY_MAP][offset] = value & 0x00FF; in efuse_shadow_write_2byte()
561 rtlefuse->efuse_map[EFUSE_MODIFY_MAP][offset + 1] = value >> 8; in efuse_shadow_write_2byte()
568 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); in efuse_shadow_write_4byte() local
570 rtlefuse->efuse_map[EFUSE_MODIFY_MAP][offset] = in efuse_shadow_write_4byte()
572 rtlefuse->efuse_map[EFUSE_MODIFY_MAP][offset + 1] = in efuse_shadow_write_4byte()
574 rtlefuse->efuse_map[EFUSE_MODIFY_MAP][offset + 2] = in efuse_shadow_write_4byte()
576 rtlefuse->efuse_map[EFUSE_MODIFY_MAP][offset + 3] = in efuse_shadow_write_4byte()
1216 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); in rtl_get_hwinfo() local
1222 switch (rtlefuse->epromtype) { in rtl_get_hwinfo()
1236 memcpy(hwinfo, &rtlefuse->efuse_map[EFUSE_INIT_MAP][0], max_size); in rtl_get_hwinfo()
1245 rtlefuse->autoload_failflag = true; in rtl_get_hwinfo()
1248 rtlefuse->autoload_failflag = false; in rtl_get_hwinfo()
1251 if (rtlefuse->autoload_failflag) in rtl_get_hwinfo()
1254 rtlefuse->eeprom_vid = *(u16 *)&hwinfo[params[1]]; in rtl_get_hwinfo()
1255 rtlefuse->eeprom_did = *(u16 *)&hwinfo[params[2]]; in rtl_get_hwinfo()
1256 rtlefuse->eeprom_svid = *(u16 *)&hwinfo[params[3]]; in rtl_get_hwinfo()
1257 rtlefuse->eeprom_smid = *(u16 *)&hwinfo[params[4]]; in rtl_get_hwinfo()
1261 "EEPROM VID = 0x%4x\n", rtlefuse->eeprom_vid); in rtl_get_hwinfo()
1263 "EEPROM DID = 0x%4x\n", rtlefuse->eeprom_did); in rtl_get_hwinfo()
1265 "EEPROM SVID = 0x%4x\n", rtlefuse->eeprom_svid); in rtl_get_hwinfo()
1267 "EEPROM SMID = 0x%4x\n", rtlefuse->eeprom_smid); in rtl_get_hwinfo()
1271 *((u16 *)(&rtlefuse->dev_addr[i])) = usvalue; in rtl_get_hwinfo()
1273 rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, "%pM\n", rtlefuse->dev_addr); in rtl_get_hwinfo()
1275 rtlefuse->eeprom_channelplan = *&hwinfo[params[6]]; in rtl_get_hwinfo()
1276 rtlefuse->eeprom_version = *(u16 *)&hwinfo[params[7]]; in rtl_get_hwinfo()
1277 rtlefuse->txpwr_fromeprom = true; in rtl_get_hwinfo()
1278 rtlefuse->eeprom_oemid = *&hwinfo[params[8]]; in rtl_get_hwinfo()
1281 "EEPROM Customer ID: 0x%2x\n", rtlefuse->eeprom_oemid); in rtl_get_hwinfo()
1284 rtlefuse->channel_plan = params[9]; in rtl_get_hwinfo()