H A D | hw.c | 562 u8 tmpu1b; _rtl92se_macconfig_before_fwdownload() local 568 tmpu1b = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1); _rtl92se_macconfig_before_fwdownload() 569 tmpu1b &= 0xFE; _rtl92se_macconfig_before_fwdownload() 570 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, tmpu1b); _rtl92se_macconfig_before_fwdownload() 572 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, tmpu1b | BIT(0)); _rtl92se_macconfig_before_fwdownload() 576 tmpu1b = rtl_read_byte(rtlpriv, (SYS_CLKR + 1)); _rtl92se_macconfig_before_fwdownload() 577 if (tmpu1b & BIT(7)) { _rtl92se_macconfig_before_fwdownload() 578 tmpu1b &= ~(BIT(6) | BIT(7)); _rtl92se_macconfig_before_fwdownload() 581 if (!_rtl92se_halset_sysclk(hw, tmpu1b)) _rtl92se_macconfig_before_fwdownload() 594 tmpu1b = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1); _rtl92se_macconfig_before_fwdownload() 595 tmpu1b &= 0x73; _rtl92se_macconfig_before_fwdownload() 596 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, tmpu1b); _rtl92se_macconfig_before_fwdownload() 604 tmpu1b = rtl_read_byte(rtlpriv, 0x562); _rtl92se_macconfig_before_fwdownload() 605 tmpu1b |= 0x08; _rtl92se_macconfig_before_fwdownload() 606 rtl_write_byte(rtlpriv, 0x562, tmpu1b); _rtl92se_macconfig_before_fwdownload() 607 tmpu1b &= ~(BIT(3)); _rtl92se_macconfig_before_fwdownload() 608 rtl_write_byte(rtlpriv, 0x562, tmpu1b); _rtl92se_macconfig_before_fwdownload() 611 tmpu1b = rtl_read_byte(rtlpriv, AFE_XTAL_CTRL); _rtl92se_macconfig_before_fwdownload() 612 rtl_write_byte(rtlpriv, AFE_XTAL_CTRL, (tmpu1b | 0x01)); _rtl92se_macconfig_before_fwdownload() 615 tmpu1b = rtl_read_byte(rtlpriv, AFE_XTAL_CTRL + 1); _rtl92se_macconfig_before_fwdownload() 616 rtl_write_byte(rtlpriv, AFE_XTAL_CTRL + 1, (tmpu1b & 0xfb)); _rtl92se_macconfig_before_fwdownload() 619 tmpu1b = rtl_read_byte(rtlpriv, AFE_MISC); _rtl92se_macconfig_before_fwdownload() 620 rtl_write_byte(rtlpriv, AFE_MISC, (tmpu1b | BIT(0))); _rtl92se_macconfig_before_fwdownload() 624 tmpu1b = rtl_read_byte(rtlpriv, AFE_MISC); _rtl92se_macconfig_before_fwdownload() 625 rtl_write_byte(rtlpriv, AFE_MISC, (tmpu1b | 0x02)); _rtl92se_macconfig_before_fwdownload() 629 tmpu1b = rtl_read_byte(rtlpriv, LDOA15_CTRL); _rtl92se_macconfig_before_fwdownload() 630 rtl_write_byte(rtlpriv, LDOA15_CTRL, (tmpu1b | BIT(0))); _rtl92se_macconfig_before_fwdownload() 645 tmpu1b = rtl_read_byte(rtlpriv, AFE_PLL_CTRL); _rtl92se_macconfig_before_fwdownload() 646 rtl_write_byte(rtlpriv, AFE_PLL_CTRL, (tmpu1b | BIT(0) | BIT(4))); _rtl92se_macconfig_before_fwdownload() 650 rtl_write_byte(rtlpriv, AFE_PLL_CTRL, (tmpu1b | BIT(0) | _rtl92se_macconfig_before_fwdownload() 653 rtl_write_byte(rtlpriv, AFE_PLL_CTRL, (tmpu1b | BIT(0) | BIT(4))); _rtl92se_macconfig_before_fwdownload() 657 tmpu1b = rtl_read_byte(rtlpriv, AFE_PLL_CTRL + 1); _rtl92se_macconfig_before_fwdownload() 658 rtl_write_byte(rtlpriv, AFE_PLL_CTRL + 1, (tmpu1b | BIT(0))); _rtl92se_macconfig_before_fwdownload() 672 tmpu1b = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1); _rtl92se_macconfig_before_fwdownload() 673 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, tmpu1b & ~(BIT(7))); _rtl92se_macconfig_before_fwdownload() 682 tmpu1b = rtl_read_byte(rtlpriv, (SYS_CLKR + 1)); _rtl92se_macconfig_before_fwdownload() 683 tmpu1b = ((tmpu1b | BIT(7)) & (~BIT(6))); _rtl92se_macconfig_before_fwdownload() 684 if (!_rtl92se_halset_sysclk(hw, tmpu1b)) _rtl92se_macconfig_before_fwdownload() 741 tmpu1b = rtl_read_byte(rtlpriv, TCR); _rtl92se_macconfig_before_fwdownload() 742 if ((tmpu1b & TXDMA_INIT_VALUE) == TXDMA_INIT_VALUE) _rtl92se_macconfig_before_fwdownload() 751 tmpu1b); _rtl92se_macconfig_before_fwdownload() 752 tmpu1b = rtl_read_byte(rtlpriv, CMDR); _rtl92se_macconfig_before_fwdownload() 753 rtl_write_byte(rtlpriv, CMDR, tmpu1b & (~TXDMA_EN)); _rtl92se_macconfig_before_fwdownload() 756 rtl_write_byte(rtlpriv, CMDR, tmpu1b | TXDMA_EN); _rtl92se_macconfig_before_fwdownload() 1422 u8 tmpu1b; _rtl92se_power_domain_init() local 1426 tmpu1b = rtl_read_byte(rtlpriv, (SYS_CLKR + 1)); _rtl92se_power_domain_init() 1427 if (tmpu1b & BIT(7)) { _rtl92se_power_domain_init() 1428 tmpu1b &= ~(BIT(6) | BIT(7)); _rtl92se_power_domain_init() 1429 if (!_rtl92s_set_sysclk(hw, tmpu1b)) { _rtl92se_power_domain_init() 1439 tmpu1b = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1); _rtl92se_power_domain_init() 1444 tmpu1b &= 0xFB; _rtl92se_power_domain_init() 1446 tmpu1b &= 0x73; _rtl92se_power_domain_init() 1448 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, tmpu1b); _rtl92se_power_domain_init() 1456 tmpu1b = rtl_read_byte(rtlpriv, 0x562); _rtl92se_power_domain_init() 1457 tmpu1b |= 0x08; _rtl92se_power_domain_init() 1458 rtl_write_byte(rtlpriv, 0x562, tmpu1b); _rtl92se_power_domain_init() 1459 tmpu1b &= ~(BIT(3)); _rtl92se_power_domain_init() 1460 rtl_write_byte(rtlpriv, 0x562, tmpu1b); _rtl92se_power_domain_init() 1463 tmpu1b = rtl_read_byte(rtlpriv, AFE_XTAL_CTRL); _rtl92se_power_domain_init() 1464 rtl_write_byte(rtlpriv, AFE_XTAL_CTRL, (tmpu1b | 0x01)); _rtl92se_power_domain_init() 1467 tmpu1b = rtl_read_byte(rtlpriv, AFE_XTAL_CTRL + 1); _rtl92se_power_domain_init() 1468 rtl_write_byte(rtlpriv, AFE_XTAL_CTRL + 1, (tmpu1b & 0xfb)); _rtl92se_power_domain_init() 1471 tmpu1b = rtl_read_byte(rtlpriv, AFE_MISC); _rtl92se_power_domain_init() 1472 rtl_write_byte(rtlpriv, AFE_MISC, (tmpu1b | BIT(0))); _rtl92se_power_domain_init() 1476 tmpu1b = rtl_read_byte(rtlpriv, AFE_MISC); _rtl92se_power_domain_init() 1477 rtl_write_byte(rtlpriv, AFE_MISC, (tmpu1b | 0x02)); _rtl92se_power_domain_init() 1481 tmpu1b = rtl_read_byte(rtlpriv, LDOA15_CTRL); _rtl92se_power_domain_init() 1482 rtl_write_byte(rtlpriv, LDOA15_CTRL, (tmpu1b | BIT(0))); _rtl92se_power_domain_init() 1496 tmpu1b = rtl_read_byte(rtlpriv, AFE_PLL_CTRL); _rtl92se_power_domain_init() 1497 rtl_write_byte(rtlpriv, AFE_PLL_CTRL, (tmpu1b | BIT(0) | BIT(4))); _rtl92se_power_domain_init() 1499 tmpu1b = rtl_read_byte(rtlpriv, AFE_PLL_CTRL + 1); _rtl92se_power_domain_init() 1500 rtl_write_byte(rtlpriv, AFE_PLL_CTRL + 1, (tmpu1b | BIT(0))); _rtl92se_power_domain_init() 1520 tmpu1b = rtl_read_byte(rtlpriv, (SYS_CLKR + 1)); _rtl92se_power_domain_init() 1521 tmpu1b = ((tmpu1b | BIT(7)) & (~BIT(6))); _rtl92se_power_domain_init() 1522 if (!_rtl92s_set_sysclk(hw, tmpu1b)) { _rtl92se_power_domain_init()
|