Lines Matching refs:ocp_data
1607 u32 ocp_data; in vendor_mac_passthru_addr_read() local
1619 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_MISC_0); in vendor_mac_passthru_addr_read()
1620 if ((ocp_data & AD_MASK) == 0x1000) { in vendor_mac_passthru_addr_read()
1622 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, EFUSE); in vendor_mac_passthru_addr_read()
1623 if ((ocp_data & PASS_THRU_MASK) != 1) { in vendor_mac_passthru_addr_read()
1630 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_1); in vendor_mac_passthru_addr_read()
1631 if ((ocp_data & BND_MASK) == 0 && (ocp_data & BD_MASK) == 0) { in vendor_mac_passthru_addr_read()
2720 u32 ocp_data; in _rtl8152_set_rx_mode() local
2723 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in _rtl8152_set_rx_mode()
2724 ocp_data &= ~RCR_ACPT_ALL; in _rtl8152_set_rx_mode()
2725 ocp_data |= RCR_AB | RCR_APM; in _rtl8152_set_rx_mode()
2730 ocp_data |= RCR_AM | RCR_AAP; in _rtl8152_set_rx_mode()
2737 ocp_data |= RCR_AM; in _rtl8152_set_rx_mode()
2751 ocp_data |= RCR_AM; in _rtl8152_set_rx_mode()
2760 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in _rtl8152_set_rx_mode()
2806 u32 ocp_data; in r8152b_reset_packet_filter() local
2808 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_FMC); in r8152b_reset_packet_filter()
2809 ocp_data &= ~FMC_FCR_MCU_EN; in r8152b_reset_packet_filter()
2810 ocp_write_word(tp, MCU_TYPE_PLA, PLA_FMC, ocp_data); in r8152b_reset_packet_filter()
2811 ocp_data |= FMC_FCR_MCU_EN; in r8152b_reset_packet_filter()
2812 ocp_write_word(tp, MCU_TYPE_PLA, PLA_FMC, ocp_data); in r8152b_reset_packet_filter()
2817 u32 ocp_data; in rtl8152_nic_reset() local
2824 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_CR); in rtl8152_nic_reset()
2825 ocp_data &= ~CR_TE; in rtl8152_nic_reset()
2826 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CR, ocp_data); in rtl8152_nic_reset()
2828 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_BMU_RESET); in rtl8152_nic_reset()
2829 ocp_data &= ~BMU_RESET_EP_IN; in rtl8152_nic_reset()
2830 ocp_write_word(tp, MCU_TYPE_USB, USB_BMU_RESET, ocp_data); in rtl8152_nic_reset()
2832 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); in rtl8152_nic_reset()
2833 ocp_data |= CDC_ECM_EN; in rtl8152_nic_reset()
2834 ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); in rtl8152_nic_reset()
2836 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_CR); in rtl8152_nic_reset()
2837 ocp_data &= ~CR_RE; in rtl8152_nic_reset()
2838 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CR, ocp_data); in rtl8152_nic_reset()
2840 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_BMU_RESET); in rtl8152_nic_reset()
2841 ocp_data |= BMU_RESET_EP_IN; in rtl8152_nic_reset()
2842 ocp_write_word(tp, MCU_TYPE_USB, USB_BMU_RESET, ocp_data); in rtl8152_nic_reset()
2844 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); in rtl8152_nic_reset()
2845 ocp_data &= ~CDC_ECM_EN; in rtl8152_nic_reset()
2846 ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); in rtl8152_nic_reset()
2873 u32 ocp_data; in rtl_eee_plus_en() local
2875 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EEEP_CR); in rtl_eee_plus_en()
2877 ocp_data |= EEEP_CR_EEEP_TX; in rtl_eee_plus_en()
2879 ocp_data &= ~EEEP_CR_EEEP_TX; in rtl_eee_plus_en()
2880 ocp_write_word(tp, MCU_TYPE_PLA, PLA_EEEP_CR, ocp_data); in rtl_eee_plus_en()
2893 u32 ocp_data; in rxdy_gated_en() local
2895 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MISC_1); in rxdy_gated_en()
2897 ocp_data |= RXDY_GATED_EN; in rxdy_gated_en()
2899 ocp_data &= ~RXDY_GATED_EN; in rxdy_gated_en()
2900 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MISC_1, ocp_data); in rxdy_gated_en()
2988 u32 ocp_data; in rtl_set_ifg() local
2990 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_TCR1); in rtl_set_ifg()
2991 ocp_data &= ~IFG_MASK; in rtl_set_ifg()
2993 ocp_data |= IFG_144NS; in rtl_set_ifg()
2994 ocp_write_word(tp, MCU_TYPE_PLA, PLA_TCR1, ocp_data); in rtl_set_ifg()
2996 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4); in rtl_set_ifg()
2997 ocp_data &= ~TX10MIDLE_EN; in rtl_set_ifg()
2998 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4, ocp_data); in rtl_set_ifg()
3000 ocp_data |= IFG_96NS; in rtl_set_ifg()
3001 ocp_write_word(tp, MCU_TYPE_PLA, PLA_TCR1, ocp_data); in rtl_set_ifg()
3003 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4); in rtl_set_ifg()
3004 ocp_data |= TX10MIDLE_EN; in rtl_set_ifg()
3005 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4, ocp_data); in rtl_set_ifg()
3017 u32 ocp_data; in rtl_enable() local
3021 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_CR); in rtl_enable()
3022 ocp_data |= CR_RE | CR_TE; in rtl_enable()
3023 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CR, ocp_data); in rtl_enable()
3053 u32 ocp_data = tp->coalesce / 8; in r8153_set_rx_early_timeout() local
3061 ocp_data); in r8153_set_rx_early_timeout()
3073 ocp_data); in r8153_set_rx_early_timeout()
3084 ocp_data); in r8153_set_rx_early_timeout()
3095 u32 ocp_data = tp->rx_buf_sz - rx_reserved_size(tp->netdev->mtu); in r8153_set_rx_early_size() local
3103 ocp_data / 4); in r8153_set_rx_early_size()
3109 ocp_data / 8); in r8153_set_rx_early_size()
3118 ocp_data / 8); in r8153_set_rx_early_size()
3129 u32 ocp_data; in rtl8153_enable() local
3144 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_FW_TASK); in rtl8153_enable()
3145 ocp_data &= ~FC_PATCH_TASK; in rtl8153_enable()
3146 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_TASK, ocp_data); in rtl8153_enable()
3148 ocp_data |= FC_PATCH_TASK; in rtl8153_enable()
3149 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_TASK, ocp_data); in rtl8153_enable()
3160 u32 ocp_data; in rtl_disable() local
3168 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in rtl_disable()
3169 ocp_data &= ~RCR_ACPT_ALL; in rtl_disable()
3170 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in rtl_disable()
3180 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in rtl_disable()
3181 if ((ocp_data & FIFO_EMPTY) == FIFO_EMPTY) in rtl_disable()
3199 u32 ocp_data; in r8152_power_cut_en() local
3201 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_UPS_CTRL); in r8152_power_cut_en()
3203 ocp_data |= POWER_CUT; in r8152_power_cut_en()
3205 ocp_data &= ~POWER_CUT; in r8152_power_cut_en()
3206 ocp_write_word(tp, MCU_TYPE_USB, USB_UPS_CTRL, ocp_data); in r8152_power_cut_en()
3208 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_PM_CTRL_STATUS); in r8152_power_cut_en()
3209 ocp_data &= ~RESUME_INDICATE; in r8152_power_cut_en()
3210 ocp_write_word(tp, MCU_TYPE_USB, USB_PM_CTRL_STATUS, ocp_data); in r8152_power_cut_en()
3215 u32 ocp_data; in rtl_rx_vlan_en() local
3228 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CPCR); in rtl_rx_vlan_en()
3230 ocp_data |= CPCR_RX_VLAN; in rtl_rx_vlan_en()
3232 ocp_data &= ~CPCR_RX_VLAN; in rtl_rx_vlan_en()
3233 ocp_write_word(tp, MCU_TYPE_PLA, PLA_CPCR, ocp_data); in rtl_rx_vlan_en()
3243 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_RCR1); in rtl_rx_vlan_en()
3245 ocp_data |= OUTER_VLAN | INNER_VLAN; in rtl_rx_vlan_en()
3247 ocp_data &= ~(OUTER_VLAN | INNER_VLAN); in rtl_rx_vlan_en()
3248 ocp_write_word(tp, MCU_TYPE_PLA, PLA_RCR1, ocp_data); in rtl_rx_vlan_en()
3285 u32 ocp_data; in __rtl_get_wol() local
3288 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG34); in __rtl_get_wol()
3289 if (ocp_data & LINK_ON_WAKE_EN) in __rtl_get_wol()
3292 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG5); in __rtl_get_wol()
3293 if (ocp_data & UWF_EN) in __rtl_get_wol()
3295 if (ocp_data & BWF_EN) in __rtl_get_wol()
3297 if (ocp_data & MWF_EN) in __rtl_get_wol()
3300 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CFG_WOL); in __rtl_get_wol()
3301 if (ocp_data & MAGIC_EN) in __rtl_get_wol()
3309 u32 ocp_data; in __rtl_set_wol() local
3313 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG34); in __rtl_set_wol()
3314 ocp_data &= ~LINK_ON_WAKE_EN; in __rtl_set_wol()
3316 ocp_data |= LINK_ON_WAKE_EN; in __rtl_set_wol()
3317 ocp_write_word(tp, MCU_TYPE_PLA, PLA_CONFIG34, ocp_data); in __rtl_set_wol()
3319 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG5); in __rtl_set_wol()
3320 ocp_data &= ~(UWF_EN | BWF_EN | MWF_EN); in __rtl_set_wol()
3322 ocp_data |= UWF_EN; in __rtl_set_wol()
3324 ocp_data |= BWF_EN; in __rtl_set_wol()
3326 ocp_data |= MWF_EN; in __rtl_set_wol()
3327 ocp_write_word(tp, MCU_TYPE_PLA, PLA_CONFIG5, ocp_data); in __rtl_set_wol()
3331 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CFG_WOL); in __rtl_set_wol()
3332 ocp_data &= ~MAGIC_EN; in __rtl_set_wol()
3334 ocp_data |= MAGIC_EN; in __rtl_set_wol()
3335 ocp_write_word(tp, MCU_TYPE_PLA, PLA_CFG_WOL, ocp_data); in __rtl_set_wol()
3345 u32 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL2); in r8153_mac_clk_speed_down() local
3349 ocp_data |= MAC_CLK_SPDWN_EN; in r8153_mac_clk_speed_down()
3351 ocp_data &= ~MAC_CLK_SPDWN_EN; in r8153_mac_clk_speed_down()
3353 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL2, ocp_data); in r8153_mac_clk_speed_down()
3358 u32 ocp_data; in r8156_mac_clk_spd() local
3366 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL2); in r8156_mac_clk_spd()
3367 ocp_data &= ~EEE_SPDWN_RATIO_MASK; in r8156_mac_clk_spd()
3368 ocp_data |= MAC_CLK_SPDWN_EN | 0x03; /* eee_spdwn_ratio */ in r8156_mac_clk_spd()
3369 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL2, ocp_data); in r8156_mac_clk_spd()
3371 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL2); in r8156_mac_clk_spd()
3372 ocp_data &= ~MAC_CLK_SPDWN_EN; in r8156_mac_clk_spd()
3373 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL2, ocp_data); in r8156_mac_clk_spd()
3391 u32 ocp_data; in r8153b_u1u2en() local
3393 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_LPM_CONFIG); in r8153b_u1u2en()
3395 ocp_data |= LPM_U1U2_EN; in r8153b_u1u2en()
3397 ocp_data &= ~LPM_U1U2_EN; in r8153b_u1u2en()
3399 ocp_write_word(tp, MCU_TYPE_USB, USB_LPM_CONFIG, ocp_data); in r8153b_u1u2en()
3404 u32 ocp_data; in r8153_u2p3en() local
3406 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_U2P3_CTRL); in r8153_u2p3en()
3408 ocp_data |= U2P3_ENABLE; in r8153_u2p3en()
3410 ocp_data &= ~U2P3_ENABLE; in r8153_u2p3en()
3411 ocp_write_word(tp, MCU_TYPE_USB, USB_U2P3_CTRL, ocp_data); in r8153_u2p3en()
3626 u32 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_POWER_CUT); in r8153b_ups_en() local
3631 ocp_data |= UPS_EN | USP_PREWAKE | PHASE2_EN; in r8153b_ups_en()
3632 ocp_write_byte(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data); in r8153b_ups_en()
3634 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_2); in r8153b_ups_en()
3635 ocp_data |= UPS_FORCE_PWR_DOWN; in r8153b_ups_en()
3636 ocp_write_byte(tp, MCU_TYPE_USB, USB_MISC_2, ocp_data); in r8153b_ups_en()
3638 ocp_data &= ~(UPS_EN | USP_PREWAKE); in r8153b_ups_en()
3639 ocp_write_byte(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data); in r8153b_ups_en()
3641 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_2); in r8153b_ups_en()
3642 ocp_data &= ~UPS_FORCE_PWR_DOWN; in r8153b_ups_en()
3643 ocp_write_byte(tp, MCU_TYPE_USB, USB_MISC_2, ocp_data); in r8153b_ups_en()
3665 u32 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_POWER_CUT); in r8153c_ups_en() local
3670 ocp_data |= UPS_EN | USP_PREWAKE | PHASE2_EN; in r8153c_ups_en()
3671 ocp_write_byte(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data); in r8153c_ups_en()
3673 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_2); in r8153c_ups_en()
3674 ocp_data |= UPS_FORCE_PWR_DOWN; in r8153c_ups_en()
3675 ocp_data &= ~BIT(7); in r8153c_ups_en()
3676 ocp_write_byte(tp, MCU_TYPE_USB, USB_MISC_2, ocp_data); in r8153c_ups_en()
3678 ocp_data &= ~(UPS_EN | USP_PREWAKE); in r8153c_ups_en()
3679 ocp_write_byte(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data); in r8153c_ups_en()
3681 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_2); in r8153c_ups_en()
3682 ocp_data &= ~UPS_FORCE_PWR_DOWN; in r8153c_ups_en()
3683 ocp_write_byte(tp, MCU_TYPE_USB, USB_MISC_2, ocp_data); in r8153c_ups_en()
3703 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG34); in r8153c_ups_en()
3704 ocp_data |= BIT(8); in r8153c_ups_en()
3705 ocp_write_word(tp, MCU_TYPE_PLA, PLA_CONFIG34, ocp_data); in r8153c_ups_en()
3713 u32 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_POWER_CUT); in r8156_ups_en() local
3718 ocp_data |= UPS_EN | USP_PREWAKE | PHASE2_EN; in r8156_ups_en()
3719 ocp_write_byte(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data); in r8156_ups_en()
3721 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_2); in r8156_ups_en()
3722 ocp_data |= UPS_FORCE_PWR_DOWN; in r8156_ups_en()
3723 ocp_write_byte(tp, MCU_TYPE_USB, USB_MISC_2, ocp_data); in r8156_ups_en()
3728 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_UPHY_XTAL); in r8156_ups_en()
3729 ocp_data &= ~OOBS_POLLING; in r8156_ups_en()
3730 ocp_write_byte(tp, MCU_TYPE_USB, USB_UPHY_XTAL, ocp_data); in r8156_ups_en()
3736 ocp_data &= ~(UPS_EN | USP_PREWAKE); in r8156_ups_en()
3737 ocp_write_byte(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data); in r8156_ups_en()
3739 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_2); in r8156_ups_en()
3740 ocp_data &= ~UPS_FORCE_PWR_DOWN; in r8156_ups_en()
3741 ocp_write_byte(tp, MCU_TYPE_USB, USB_MISC_2, ocp_data); in r8156_ups_en()
3754 u32 ocp_data; in r8153_power_cut_en() local
3756 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_POWER_CUT); in r8153_power_cut_en()
3758 ocp_data |= PWR_EN | PHASE2_EN; in r8153_power_cut_en()
3760 ocp_data &= ~(PWR_EN | PHASE2_EN); in r8153_power_cut_en()
3761 ocp_write_word(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data); in r8153_power_cut_en()
3763 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_MISC_0); in r8153_power_cut_en()
3764 ocp_data &= ~PCUT_STATUS; in r8153_power_cut_en()
3765 ocp_write_word(tp, MCU_TYPE_USB, USB_MISC_0, ocp_data); in r8153_power_cut_en()
3770 u32 ocp_data; in r8153b_power_cut_en() local
3772 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_POWER_CUT); in r8153b_power_cut_en()
3774 ocp_data |= PWR_EN | PHASE2_EN; in r8153b_power_cut_en()
3776 ocp_data &= ~PWR_EN; in r8153b_power_cut_en()
3777 ocp_write_word(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data); in r8153b_power_cut_en()
3779 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_MISC_0); in r8153b_power_cut_en()
3780 ocp_data &= ~PCUT_STATUS; in r8153b_power_cut_en()
3781 ocp_write_word(tp, MCU_TYPE_USB, USB_MISC_0, ocp_data); in r8153b_power_cut_en()
3786 u32 ocp_data; in r8153_queue_wake() local
3788 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_INDICATE_FALG); in r8153_queue_wake()
3790 ocp_data |= UPCOMING_RUNTIME_D3; in r8153_queue_wake()
3792 ocp_data &= ~UPCOMING_RUNTIME_D3; in r8153_queue_wake()
3793 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_INDICATE_FALG, ocp_data); in r8153_queue_wake()
3795 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_SUSPEND_FLAG); in r8153_queue_wake()
3796 ocp_data &= ~LINK_CHG_EVENT; in r8153_queue_wake()
3797 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_SUSPEND_FLAG, ocp_data); in r8153_queue_wake()
3799 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS); in r8153_queue_wake()
3800 ocp_data &= ~LINK_CHANGE_FLAG; in r8153_queue_wake()
3801 ocp_write_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS, ocp_data); in r8153_queue_wake()
3814 u32 ocp_data; in rtl_runtime_suspend_enable() local
3820 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG34); in rtl_runtime_suspend_enable()
3821 ocp_data |= LINK_OFF_WAKE_EN; in rtl_runtime_suspend_enable()
3822 ocp_write_word(tp, MCU_TYPE_PLA, PLA_CONFIG34, ocp_data); in rtl_runtime_suspend_enable()
3826 u32 ocp_data; in rtl_runtime_suspend_enable() local
3832 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG34); in rtl_runtime_suspend_enable()
3833 ocp_data &= ~LINK_OFF_WAKE_EN; in rtl_runtime_suspend_enable()
3834 ocp_write_word(tp, MCU_TYPE_PLA, PLA_CONFIG34, ocp_data); in rtl_runtime_suspend_enable()
3915 u32 ocp_data; in r8153_teredo_off() local
3925 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_TEREDO_CFG); in r8153_teredo_off()
3926 ocp_data &= ~(TEREDO_SEL | TEREDO_RS_EVENT_MASK | in r8153_teredo_off()
3928 ocp_write_word(tp, MCU_TYPE_PLA, PLA_TEREDO_CFG, ocp_data); in r8153_teredo_off()
3955 u32 ocp_data; in rtl_reset_bmu() local
3957 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_BMU_RESET); in rtl_reset_bmu()
3958 ocp_data &= ~(BMU_RESET_EP_IN | BMU_RESET_EP_OUT); in rtl_reset_bmu()
3959 ocp_write_byte(tp, MCU_TYPE_USB, USB_BMU_RESET, ocp_data); in rtl_reset_bmu()
3960 ocp_data |= BMU_RESET_EP_IN | BMU_RESET_EP_OUT; in rtl_reset_bmu()
3961 ocp_write_byte(tp, MCU_TYPE_USB, USB_BMU_RESET, ocp_data); in rtl_reset_bmu()
4050 u32 ocp_data; in rtl_phy_patch_request() local
4053 ocp_data = ocp_reg_read(tp, OCP_PHY_PATCH_STAT); in rtl_phy_patch_request()
4054 if ((ocp_data & PATCH_READY) ^ check) in rtl_phy_patch_request()
4831 u32 ocp_data, size; in rtl_ram_code_speed_up() local
4839 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_GPHY_CTRL); in rtl_ram_code_speed_up()
4840 ocp_data |= GPHY_PATCH_DONE | BACKUP_RESTRORE; in rtl_ram_code_speed_up()
4841 ocp_write_word(tp, MCU_TYPE_USB, USB_GPHY_CTRL, ocp_data); in rtl_ram_code_speed_up()
4848 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_POL_GPIO_CTRL); in rtl_ram_code_speed_up()
4849 ocp_data |= POL_GPHY_PATCH; in rtl_ram_code_speed_up()
4850 ocp_write_word(tp, MCU_TYPE_PLA, PLA_POL_GPIO_CTRL, ocp_data); in rtl_ram_code_speed_up()
5220 u32 ocp_data; in r8152_eee_en() local
5222 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EEE_CR); in r8152_eee_en()
5228 ocp_data |= EEE_RX_EN | EEE_TX_EN; in r8152_eee_en()
5234 ocp_data &= ~(EEE_RX_EN | EEE_TX_EN); in r8152_eee_en()
5242 ocp_write_word(tp, MCU_TYPE_PLA, PLA_EEE_CR, ocp_data); in r8152_eee_en()
5250 u32 ocp_data; in r8153_eee_en() local
5253 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EEE_CR); in r8153_eee_en()
5257 ocp_data |= EEE_RX_EN | EEE_TX_EN; in r8153_eee_en()
5260 ocp_data &= ~(EEE_RX_EN | EEE_TX_EN); in r8153_eee_en()
5264 ocp_write_word(tp, MCU_TYPE_PLA, PLA_EEE_CR, ocp_data); in r8153_eee_en()
5364 u32 ocp_data; in wait_oob_link_list_ready() local
5368 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in wait_oob_link_list_ready()
5369 if (ocp_data & LINK_LIST_READY) in wait_oob_link_list_ready()
5391 u32 ocp_data; in r8152b_exit_oob() local
5393 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in r8152b_exit_oob()
5394 ocp_data &= ~RCR_ACPT_ALL; in r8152b_exit_oob()
5395 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in r8152b_exit_oob()
5402 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in r8152b_exit_oob()
5403 ocp_data &= ~NOW_IS_OOB; in r8152b_exit_oob()
5404 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in r8152b_exit_oob()
5406 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); in r8152b_exit_oob()
5407 ocp_data &= ~MCU_BORW_EN; in r8152b_exit_oob()
5408 ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); in r8152b_exit_oob()
5412 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); in r8152b_exit_oob()
5413 ocp_data |= RE_INIT_LL; in r8152b_exit_oob()
5414 ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); in r8152b_exit_oob()
5450 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_TCR0); in r8152b_exit_oob()
5451 ocp_data |= TCR0_AUTO_FIFO; in r8152b_exit_oob()
5452 ocp_write_word(tp, MCU_TYPE_PLA, PLA_TCR0, ocp_data); in r8152b_exit_oob()
5457 u32 ocp_data; in r8152b_enter_oob() local
5459 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in r8152b_enter_oob()
5460 ocp_data &= ~NOW_IS_OOB; in r8152b_enter_oob()
5461 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in r8152b_enter_oob()
5471 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); in r8152b_enter_oob()
5472 ocp_data |= RE_INIT_LL; in r8152b_enter_oob()
5473 ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); in r8152b_enter_oob()
5481 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_BDC_CR); in r8152b_enter_oob()
5482 ocp_data |= ALDPS_PROXY_MODE; in r8152b_enter_oob()
5483 ocp_write_word(tp, MCU_TYPE_PLA, PLA_BDC_CR, ocp_data); in r8152b_enter_oob()
5485 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in r8152b_enter_oob()
5486 ocp_data |= NOW_IS_OOB | DIS_MCU_CLROOB; in r8152b_enter_oob()
5487 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in r8152b_enter_oob()
5491 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in r8152b_enter_oob()
5492 ocp_data |= RCR_APM | RCR_AM | RCR_AB; in r8152b_enter_oob()
5493 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in r8152b_enter_oob()
5502 u32 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_WDT1_CTRL); in r8153_pre_firmware_1() local
5504 if (!(ocp_data & WTD1_EN)) in r8153_pre_firmware_1()
5526 u32 ocp_data; in r8153_pre_firmware_2() local
5530 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_FW_FIX_EN0); in r8153_pre_firmware_2()
5531 ocp_data &= ~FW_FIX_SUSPEND; in r8153_pre_firmware_2()
5532 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_FIX_EN0, ocp_data); in r8153_pre_firmware_2()
5539 u32 ocp_data; in r8153_post_firmware_2() local
5543 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_BP_EN); in r8153_post_firmware_2()
5544 ocp_data |= BIT(0); in r8153_post_firmware_2()
5545 ocp_write_word(tp, MCU_TYPE_PLA, PLA_BP_EN, ocp_data); in r8153_post_firmware_2()
5554 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_FW_FIX_EN0); in r8153_post_firmware_2()
5555 ocp_data |= FW_FIX_SUSPEND; in r8153_post_firmware_2()
5556 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_FIX_EN0, ocp_data); in r8153_post_firmware_2()
5558 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_USB2PHY); in r8153_post_firmware_2()
5559 ocp_data |= USB2PHY_L1 | USB2PHY_SUSPEND; in r8153_post_firmware_2()
5560 ocp_write_byte(tp, MCU_TYPE_USB, USB_USB2PHY, ocp_data); in r8153_post_firmware_2()
5567 u32 ocp_data; in r8153_post_firmware_3() local
5569 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_USB2PHY); in r8153_post_firmware_3()
5570 ocp_data |= USB2PHY_L1 | USB2PHY_SUSPEND; in r8153_post_firmware_3()
5571 ocp_write_byte(tp, MCU_TYPE_USB, USB_USB2PHY, ocp_data); in r8153_post_firmware_3()
5573 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_FW_FIX_EN1); in r8153_post_firmware_3()
5574 ocp_data |= FW_IP_RESET_EN; in r8153_post_firmware_3()
5575 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_FIX_EN1, ocp_data); in r8153_post_firmware_3()
5591 u32 ocp_data; in r8153b_post_firmware_1() local
5594 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_1); in r8153b_post_firmware_1()
5595 if (ocp_data & BND_MASK) { in r8153b_post_firmware_1()
5596 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_BP_EN); in r8153b_post_firmware_1()
5597 ocp_data |= BIT(0); in r8153b_post_firmware_1()
5598 ocp_write_word(tp, MCU_TYPE_PLA, PLA_BP_EN, ocp_data); in r8153b_post_firmware_1()
5601 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_FW_CTRL); in r8153b_post_firmware_1()
5602 ocp_data |= FLOW_CTRL_PATCH_OPT; in r8153b_post_firmware_1()
5603 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_CTRL, ocp_data); in r8153b_post_firmware_1()
5605 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_FW_TASK); in r8153b_post_firmware_1()
5606 ocp_data |= FC_PATCH_TASK; in r8153b_post_firmware_1()
5607 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_TASK, ocp_data); in r8153b_post_firmware_1()
5609 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_FW_FIX_EN1); in r8153b_post_firmware_1()
5610 ocp_data |= FW_IP_RESET_EN; in r8153b_post_firmware_1()
5611 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_FIX_EN1, ocp_data); in r8153b_post_firmware_1()
5618 u32 ocp_data; in r8153c_post_firmware_1() local
5620 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_FW_CTRL); in r8153c_post_firmware_1()
5621 ocp_data |= FLOW_CTRL_PATCH_2; in r8153c_post_firmware_1()
5622 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_CTRL, ocp_data); in r8153c_post_firmware_1()
5624 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_FW_TASK); in r8153c_post_firmware_1()
5625 ocp_data |= FC_PATCH_TASK; in r8153c_post_firmware_1()
5626 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_TASK, ocp_data); in r8153c_post_firmware_1()
5633 u32 ocp_data; in r8156a_post_firmware_1() local
5635 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_FW_FIX_EN1); in r8156a_post_firmware_1()
5636 ocp_data |= FW_IP_RESET_EN; in r8156a_post_firmware_1()
5637 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_FIX_EN1, ocp_data); in r8156a_post_firmware_1()
5671 u32 ocp_data; in r8153_hw_phy_cfg() local
5700 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR); in r8153_hw_phy_cfg()
5701 ocp_data |= PFM_PWM_SWITCH; in r8153_hw_phy_cfg()
5702 ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data); in r8153_hw_phy_cfg()
5733 u32 ocp_data; in r8152_efuse_read() local
5736 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EFUSE_CMD); in r8152_efuse_read()
5737 ocp_data = (ocp_data & EFUSE_DATA_BIT16) << 9; /* data of bit16 */ in r8152_efuse_read()
5738 ocp_data |= ocp_read_word(tp, MCU_TYPE_PLA, PLA_EFUSE_DATA); in r8152_efuse_read()
5740 return ocp_data; in r8152_efuse_read()
5745 u32 ocp_data; in r8153b_hw_phy_cfg() local
5748 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_MISC_0); in r8153b_hw_phy_cfg()
5749 if (ocp_data & PCUT_STATUS) { in r8153b_hw_phy_cfg()
5750 ocp_data &= ~PCUT_STATUS; in r8153b_hw_phy_cfg()
5751 ocp_write_word(tp, MCU_TYPE_USB, USB_MISC_0, ocp_data); in r8153b_hw_phy_cfg()
5794 ocp_data = r8152_efuse_read(tp, 0x7d); in r8153b_hw_phy_cfg()
5795 data = (u16)(((ocp_data & 0x1fff0) >> 1) | (ocp_data & 0x7)); in r8153b_hw_phy_cfg()
5803 ocp_data = ocp_reg_read(tp, 0xc426); in r8153b_hw_phy_cfg()
5804 ocp_data &= 0x3fff; in r8153b_hw_phy_cfg()
5805 if (ocp_data) { in r8153b_hw_phy_cfg()
5808 swr_cnt_1ms_ini = (16000000 / ocp_data) & SAW_CNT_1MS_MASK; in r8153b_hw_phy_cfg()
5809 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_UPS_CFG); in r8153b_hw_phy_cfg()
5810 ocp_data = (ocp_data & ~SAW_CNT_1MS_MASK) | swr_cnt_1ms_ini; in r8153b_hw_phy_cfg()
5811 ocp_write_word(tp, MCU_TYPE_USB, USB_UPS_CFG, ocp_data); in r8153b_hw_phy_cfg()
5814 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR); in r8153b_hw_phy_cfg()
5815 ocp_data |= PFM_PWM_SWITCH; in r8153b_hw_phy_cfg()
5816 ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data); in r8153b_hw_phy_cfg()
5863 u32 ocp_data; in r8153_first_init() local
5868 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in r8153_first_init()
5869 ocp_data &= ~RCR_ACPT_ALL; in r8153_first_init()
5870 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in r8153_first_init()
5875 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in r8153_first_init()
5876 ocp_data &= ~NOW_IS_OOB; in r8153_first_init()
5877 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in r8153_first_init()
5879 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); in r8153_first_init()
5880 ocp_data &= ~MCU_BORW_EN; in r8153_first_init()
5881 ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); in r8153_first_init()
5885 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); in r8153_first_init()
5886 ocp_data |= RE_INIT_LL; in r8153_first_init()
5887 ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); in r8153_first_init()
5895 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_TCR0); in r8153_first_init()
5896 ocp_data |= TCR0_AUTO_FIFO; in r8153_first_init()
5897 ocp_write_word(tp, MCU_TYPE_PLA, PLA_TCR0, ocp_data); in r8153_first_init()
5911 u32 ocp_data; in r8153_enter_oob() local
5913 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in r8153_enter_oob()
5914 ocp_data &= ~NOW_IS_OOB; in r8153_enter_oob()
5915 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in r8153_enter_oob()
5927 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); in r8153_enter_oob()
5928 ocp_data |= RE_INIT_LL; in r8153_enter_oob()
5929 ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); in r8153_enter_oob()
5941 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_TEREDO_CFG); in r8153_enter_oob()
5942 ocp_data &= ~TEREDO_WAKE_MASK; in r8153_enter_oob()
5943 ocp_write_word(tp, MCU_TYPE_PLA, PLA_TEREDO_CFG, ocp_data); in r8153_enter_oob()
5962 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_BDC_CR); in r8153_enter_oob()
5963 ocp_data |= ALDPS_PROXY_MODE; in r8153_enter_oob()
5964 ocp_write_word(tp, MCU_TYPE_PLA, PLA_BDC_CR, ocp_data); in r8153_enter_oob()
5966 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in r8153_enter_oob()
5967 ocp_data |= NOW_IS_OOB | DIS_MCU_CLROOB; in r8153_enter_oob()
5968 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in r8153_enter_oob()
5970 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); in r8153_enter_oob()
5971 ocp_data |= MCU_BORW_EN; in r8153_enter_oob()
5972 ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); in r8153_enter_oob()
5976 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in r8153_enter_oob()
5977 ocp_data |= RCR_APM | RCR_AM | RCR_AB; in r8153_enter_oob()
5978 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in r8153_enter_oob()
5991 u32 ocp_data; in rtl8156_enable() local
6005 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4); in rtl8156_enable()
6007 ocp_data &= ~IDLE_SPDWN_EN; in rtl8156_enable()
6009 ocp_data |= IDLE_SPDWN_EN; in rtl8156_enable()
6010 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4, ocp_data); in rtl8156_enable()
6019 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_L1_CTRL); in rtl8156_enable()
6020 ocp_data &= ~0xf; in rtl8156_enable()
6022 ocp_data |= 0xf; in rtl8156_enable()
6024 ocp_data |= 0x1; in rtl8156_enable()
6025 ocp_write_word(tp, MCU_TYPE_USB, USB_L1_CTRL, ocp_data); in rtl8156_enable()
6033 u32 ocp_data; in rtl8156b_enable() local
6042 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_RX_AGGR_NUM); in rtl8156b_enable()
6043 ocp_data &= ~RX_AGGR_NUM_MASK; in rtl8156b_enable()
6044 ocp_write_word(tp, MCU_TYPE_USB, USB_RX_AGGR_NUM, ocp_data); in rtl8156b_enable()
6052 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4); in rtl8156b_enable()
6054 ocp_data &= ~IDLE_SPDWN_EN; in rtl8156b_enable()
6056 ocp_data |= IDLE_SPDWN_EN; in rtl8156b_enable()
6057 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4, ocp_data); in rtl8156b_enable()
6060 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_L1_CTRL); in rtl8156b_enable()
6061 ocp_data &= ~0xf; in rtl8156b_enable()
6063 ocp_data |= 0xf; in rtl8156b_enable()
6065 ocp_data |= 0x1; in rtl8156b_enable()
6066 ocp_write_word(tp, MCU_TYPE_USB, USB_L1_CTRL, ocp_data); in rtl8156b_enable()
6069 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_FW_TASK); in rtl8156b_enable()
6070 ocp_data &= ~FC_PATCH_TASK; in rtl8156b_enable()
6071 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_TASK, ocp_data); in rtl8156b_enable()
6073 ocp_data |= FC_PATCH_TASK; in rtl8156b_enable()
6074 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_TASK, ocp_data); in rtl8156b_enable()
6245 u32 ocp_data; in rtl8153_up() local
6255 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_CONFIG6); in rtl8153_up()
6256 ocp_data |= LANWAKE_CLR_EN; in rtl8153_up()
6257 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CONFIG6, ocp_data); in rtl8153_up()
6259 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_LWAKE_CTRL_REG); in rtl8153_up()
6260 ocp_data &= ~LANWAKE_PIN; in rtl8153_up()
6261 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_LWAKE_CTRL_REG, ocp_data); in rtl8153_up()
6263 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_SSPHYLINK1); in rtl8153_up()
6264 ocp_data &= ~DELAY_PHY_PWR_CHG; in rtl8153_up()
6265 ocp_write_word(tp, MCU_TYPE_USB, USB_SSPHYLINK1, ocp_data); in rtl8153_up()
6285 u32 ocp_data; in rtl8153_down() local
6292 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_CONFIG6); in rtl8153_down()
6293 ocp_data &= ~LANWAKE_CLR_EN; in rtl8153_down()
6294 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CONFIG6, ocp_data); in rtl8153_down()
6306 u32 ocp_data; in rtl8153b_up() local
6318 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3); in rtl8153b_up()
6319 ocp_data &= ~PLA_MCU_SPDWN_EN; in rtl8153b_up()
6320 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, ocp_data); in rtl8153b_up()
6330 u32 ocp_data; in rtl8153b_down() local
6337 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3); in rtl8153b_down()
6338 ocp_data |= PLA_MCU_SPDWN_EN; in rtl8153b_down()
6339 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, ocp_data); in rtl8153b_down()
6367 u32 ocp_data; in rtl8153c_up() local
6379 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in rtl8153c_up()
6380 ocp_data &= ~RCR_ACPT_ALL; in rtl8153c_up()
6381 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in rtl8153c_up()
6386 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in rtl8153c_up()
6387 ocp_data &= ~NOW_IS_OOB; in rtl8153c_up()
6388 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in rtl8153c_up()
6390 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); in rtl8153c_up()
6391 ocp_data &= ~MCU_BORW_EN; in rtl8153c_up()
6392 ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); in rtl8153c_up()
6396 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); in rtl8153c_up()
6397 ocp_data |= RE_INIT_LL; in rtl8153c_up()
6398 ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); in rtl8153c_up()
6418 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG34); in rtl8153c_up()
6419 ocp_data |= BIT(8); in rtl8153c_up()
6420 ocp_write_word(tp, MCU_TYPE_PLA, PLA_CONFIG34, ocp_data); in rtl8153c_up()
6424 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3); in rtl8153c_up()
6425 ocp_data &= ~PLA_MCU_SPDWN_EN; in rtl8153c_up()
6426 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, ocp_data); in rtl8153c_up()
6467 u32 ocp_data; in rtl8156_up() local
6479 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in rtl8156_up()
6480 ocp_data &= ~RCR_ACPT_ALL; in rtl8156_up()
6481 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in rtl8156_up()
6486 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in rtl8156_up()
6487 ocp_data &= ~NOW_IS_OOB; in rtl8156_up()
6488 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in rtl8156_up()
6490 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); in rtl8156_up()
6491 ocp_data &= ~MCU_BORW_EN; in rtl8156_up()
6492 ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); in rtl8156_up()
6502 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_BMU_CONFIG); in rtl8156_up()
6503 ocp_data |= ACT_ODMA; in rtl8156_up()
6504 ocp_write_word(tp, MCU_TYPE_USB, USB_BMU_CONFIG, ocp_data); in rtl8156_up()
6511 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_RXFIFO_FULL); in rtl8156_up()
6512 ocp_data &= ~RXFIFO_FULL_MASK; in rtl8156_up()
6513 ocp_data |= 0x08; in rtl8156_up()
6514 ocp_write_word(tp, MCU_TYPE_PLA, PLA_RXFIFO_FULL, ocp_data); in rtl8156_up()
6516 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3); in rtl8156_up()
6517 ocp_data &= ~PLA_MCU_SPDWN_EN; in rtl8156_up()
6518 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, ocp_data); in rtl8156_up()
6520 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_SPEED_OPTION); in rtl8156_up()
6521 ocp_data &= ~(RG_PWRDN_EN | ALL_SPEED_OFF); in rtl8156_up()
6522 ocp_write_word(tp, MCU_TYPE_USB, USB_SPEED_OPTION, ocp_data); in rtl8156_up()
6540 u32 ocp_data; in rtl8156_down() local
6547 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3); in rtl8156_down()
6548 ocp_data |= PLA_MCU_SPDWN_EN; in rtl8156_down()
6549 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, ocp_data); in rtl8156_down()
6556 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in rtl8156_down()
6557 ocp_data &= ~NOW_IS_OOB; in rtl8156_down()
6558 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in rtl8156_down()
6577 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in rtl8156_down()
6578 ocp_data |= NOW_IS_OOB; in rtl8156_down()
6579 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in rtl8156_down()
6581 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); in rtl8156_down()
6582 ocp_data |= MCU_BORW_EN; in rtl8156_down()
6583 ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); in rtl8156_down()
6588 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in rtl8156_down()
6589 ocp_data |= RCR_APM | RCR_AM | RCR_AB; in rtl8156_down()
6590 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in rtl8156_down()
6867 u32 ocp_data; in rtl_tally_reset() local
6869 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY); in rtl_tally_reset()
6870 ocp_data |= TALLY_RESET; in rtl_tally_reset()
6871 ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data); in rtl_tally_reset()
6876 u32 ocp_data; in r8152b_init() local
6891 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_LED_FEATURE); in r8152b_init()
6892 ocp_data &= ~LED_MODE_MASK; in r8152b_init()
6893 ocp_write_word(tp, MCU_TYPE_PLA, PLA_LED_FEATURE, ocp_data); in r8152b_init()
6898 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR); in r8152b_init()
6899 ocp_data |= TX_10M_IDLE_EN | PFM_PWM_SWITCH; in r8152b_init()
6900 ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data); in r8152b_init()
6901 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL); in r8152b_init()
6902 ocp_data &= ~MCU_CLK_RATIO_MASK; in r8152b_init()
6903 ocp_data |= MCU_CLK_RATIO | D3_CLK_GATED_EN; in r8152b_init()
6904 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL, ocp_data); in r8152b_init()
6905 ocp_data = GPHY_STS_MSK | SPEED_DOWN_MSK | in r8152b_init()
6907 ocp_write_word(tp, MCU_TYPE_PLA, PLA_GPHY_INTR_IMR, ocp_data); in r8152b_init()
6912 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); in r8152b_init()
6913 ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); in r8152b_init()
6914 ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); in r8152b_init()
6919 u32 ocp_data; in r8153_init() local
6955 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_SSPHYLINK2); in r8153_init()
6956 ocp_data &= ~pwd_dn_scale_mask; in r8153_init()
6957 ocp_data |= pwd_dn_scale(96); in r8153_init()
6958 ocp_write_word(tp, MCU_TYPE_USB, USB_SSPHYLINK2, ocp_data); in r8153_init()
6960 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_USB2PHY); in r8153_init()
6961 ocp_data |= USB2PHY_L1 | USB2PHY_SUSPEND; in r8153_init()
6962 ocp_write_byte(tp, MCU_TYPE_USB, USB_USB2PHY, ocp_data); in r8153_init()
6964 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_DMY_REG0); in r8153_init()
6965 ocp_data &= ~ECM_ALDPS; in r8153_init()
6966 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_DMY_REG0, ocp_data); in r8153_init()
6968 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY1); in r8153_init()
6970 ocp_data &= ~DYNAMIC_BURST; in r8153_init()
6972 ocp_data |= DYNAMIC_BURST; in r8153_init()
6973 ocp_write_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY1, ocp_data); in r8153_init()
6975 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY1); in r8153_init()
6977 ocp_data &= ~DYNAMIC_BURST; in r8153_init()
6979 ocp_data |= DYNAMIC_BURST; in r8153_init()
6980 ocp_write_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY1, ocp_data); in r8153_init()
6984 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS); in r8153_init()
6986 ocp_data |= CUR_LINK_OK; in r8153_init()
6988 ocp_data &= ~CUR_LINK_OK; in r8153_init()
6989 ocp_data |= POLL_LINK_CHG; in r8153_init()
6990 ocp_write_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS, ocp_data); in r8153_init()
6993 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY2); in r8153_init()
6994 ocp_data |= EP4_FULL_FC; in r8153_init()
6995 ocp_write_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY2, ocp_data); in r8153_init()
6997 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_WDT11_CTRL); in r8153_init()
6998 ocp_data &= ~TIMER11_EN; in r8153_init()
6999 ocp_write_word(tp, MCU_TYPE_USB, USB_WDT11_CTRL, ocp_data); in r8153_init()
7001 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_LED_FEATURE); in r8153_init()
7002 ocp_data &= ~LED_MODE_MASK; in r8153_init()
7003 ocp_write_word(tp, MCU_TYPE_PLA, PLA_LED_FEATURE, ocp_data); in r8153_init()
7005 ocp_data = FIFO_EMPTY_1FB | ROK_EXIT_LPM; in r8153_init()
7007 ocp_data |= LPM_TIMER_500MS; in r8153_init()
7009 ocp_data |= LPM_TIMER_500US; in r8153_init()
7010 ocp_write_byte(tp, MCU_TYPE_USB, USB_LPM_CTRL, ocp_data); in r8153_init()
7012 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_AFE_CTRL2); in r8153_init()
7013 ocp_data &= ~SEN_VAL_MASK; in r8153_init()
7014 ocp_data |= SEN_VAL_NORMAL | SEL_RXIDLE; in r8153_init()
7015 ocp_write_word(tp, MCU_TYPE_USB, USB_AFE_CTRL2, ocp_data); in r8153_init()
7025 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_CONFIG6); in r8153_init()
7026 ocp_data |= LANWAKE_CLR_EN; in r8153_init()
7027 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CONFIG6, ocp_data); in r8153_init()
7029 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_LWAKE_CTRL_REG); in r8153_init()
7030 ocp_data &= ~LANWAKE_PIN; in r8153_init()
7031 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_LWAKE_CTRL_REG, ocp_data); in r8153_init()
7034 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); in r8153_init()
7035 ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); in r8153_init()
7037 ocp_data |= RX_AGG_DISABLE; in r8153_init()
7039 ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); in r8153_init()
7059 u32 ocp_data; in r8153b_init() local
7098 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS); in r8153b_init()
7100 ocp_data |= CUR_LINK_OK; in r8153b_init()
7102 ocp_data &= ~CUR_LINK_OK; in r8153b_init()
7103 ocp_data |= POLL_LINK_CHG; in r8153b_init()
7104 ocp_write_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS, ocp_data); in r8153b_init()
7114 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3); in r8153b_init()
7115 ocp_data &= ~PLA_MCU_SPDWN_EN; in r8153b_init()
7116 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, ocp_data); in r8153b_init()
7121 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR); in r8153b_init()
7122 ocp_data |= TEST_IO_OFF; in r8153b_init()
7123 ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data); in r8153b_init()
7130 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); in r8153b_init()
7131 ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); in r8153b_init()
7132 ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); in r8153b_init()
7141 u32 ocp_data; in r8153c_init() local
7152 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG5); in r8153c_init()
7153 ocp_data &= ~BIT(3); in r8153c_init()
7154 ocp_write_word(tp, MCU_TYPE_PLA, PLA_CONFIG5, ocp_data); in r8153c_init()
7155 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, 0xcbf0); in r8153c_init()
7156 ocp_data |= BIT(1); in r8153c_init()
7157 ocp_write_word(tp, MCU_TYPE_USB, 0xcbf0, ocp_data); in r8153c_init()
7189 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS); in r8153c_init()
7191 ocp_data |= CUR_LINK_OK; in r8153c_init()
7193 ocp_data &= ~CUR_LINK_OK; in r8153c_init()
7195 ocp_data |= POLL_LINK_CHG; in r8153c_init()
7196 ocp_write_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS, ocp_data); in r8153c_init()
7205 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_2); in r8153c_init()
7206 ocp_data &= ~BIT(7); in r8153c_init()
7207 ocp_write_byte(tp, MCU_TYPE_USB, USB_MISC_2, ocp_data); in r8153c_init()
7212 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); in r8153c_init()
7213 ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); in r8153c_init()
7214 ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); in r8153c_init()
7223 u32 ocp_data; in r8156_hw_phy_cfg() local
7226 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_MISC_0); in r8156_hw_phy_cfg()
7227 if (ocp_data & PCUT_STATUS) { in r8156_hw_phy_cfg()
7228 ocp_data &= ~PCUT_STATUS; in r8156_hw_phy_cfg()
7229 ocp_write_word(tp, MCU_TYPE_USB, USB_MISC_0, ocp_data); in r8156_hw_phy_cfg()
7257 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR); in r8156_hw_phy_cfg()
7258 ocp_data |= PFM_PWM_SWITCH; in r8156_hw_phy_cfg()
7259 ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data); in r8156_hw_phy_cfg()
7420 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_USB_CFG); in r8156_hw_phy_cfg()
7421 ocp_data |= EN_XG_LIP | EN_G_LIP; in r8156_hw_phy_cfg()
7422 ocp_write_word(tp, MCU_TYPE_PLA, PLA_USB_CFG, ocp_data); in r8156_hw_phy_cfg()
7431 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4); in r8156_hw_phy_cfg()
7432 ocp_data |= EEE_SPDWN_EN; in r8156_hw_phy_cfg()
7433 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4, ocp_data); in r8156_hw_phy_cfg()
7568 u32 ocp_data; in r8156b_hw_phy_cfg() local
7598 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_MISC_0); in r8156b_hw_phy_cfg()
7599 if (ocp_data & PCUT_STATUS) { in r8156b_hw_phy_cfg()
7600 ocp_data &= ~PCUT_STATUS; in r8156b_hw_phy_cfg()
7601 ocp_write_word(tp, MCU_TYPE_USB, USB_MISC_0, ocp_data); in r8156b_hw_phy_cfg()
7639 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR); in r8156b_hw_phy_cfg()
7640 ocp_data |= PFM_PWM_SWITCH; in r8156b_hw_phy_cfg()
7641 ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data); in r8156b_hw_phy_cfg()
7728 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_USB_CFG); in r8156b_hw_phy_cfg()
7729 ocp_data |= EN_XG_LIP | EN_G_LIP; in r8156b_hw_phy_cfg()
7730 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_USB_CFG, ocp_data); in r8156b_hw_phy_cfg()
7939 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4); in r8156b_hw_phy_cfg()
7940 ocp_data |= EEE_SPDWN_EN; in r8156b_hw_phy_cfg()
7941 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4, ocp_data); in r8156b_hw_phy_cfg()
7980 u32 ocp_data; in r8156_init() local
7987 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_ECM_OP); in r8156_init()
7988 ocp_data &= ~EN_ALL_SPEED; in r8156_init()
7989 ocp_write_byte(tp, MCU_TYPE_USB, USB_ECM_OP, ocp_data); in r8156_init()
7993 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_ECM_OPTION); in r8156_init()
7994 ocp_data |= BYPASS_MAC_RESET; in r8156_init()
7995 ocp_write_word(tp, MCU_TYPE_USB, USB_ECM_OPTION, ocp_data); in r8156_init()
8045 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3); in r8156_init()
8046 ocp_data &= ~PLA_MCU_SPDWN_EN; in r8156_init()
8047 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, ocp_data); in r8156_init()
8049 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS); in r8156_init()
8051 ocp_data |= CUR_LINK_OK; in r8156_init()
8053 ocp_data &= ~CUR_LINK_OK; in r8156_init()
8054 ocp_data |= POLL_LINK_CHG; in r8156_init()
8055 ocp_write_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS, ocp_data); in r8156_init()
8060 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); in r8156_init()
8061 ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); in r8156_init()
8062 ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); in r8156_init()
8064 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_BMU_CONFIG); in r8156_init()
8065 ocp_data |= ACT_ODMA; in r8156_init()
8066 ocp_write_byte(tp, MCU_TYPE_USB, USB_BMU_CONFIG, ocp_data); in r8156_init()
8076 u32 ocp_data; in r8156b_init() local
8083 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_ECM_OP); in r8156b_init()
8084 ocp_data &= ~EN_ALL_SPEED; in r8156b_init()
8085 ocp_write_byte(tp, MCU_TYPE_USB, USB_ECM_OP, ocp_data); in r8156b_init()
8089 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_ECM_OPTION); in r8156b_init()
8090 ocp_data |= BYPASS_MAC_RESET; in r8156b_init()
8091 ocp_write_word(tp, MCU_TYPE_USB, USB_ECM_OPTION, ocp_data); in r8156b_init()
8093 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_U2P3_CTRL); in r8156b_init()
8094 ocp_data |= RX_DETECT8; in r8156b_init()
8095 ocp_write_word(tp, MCU_TYPE_USB, USB_U2P3_CTRL, ocp_data); in r8156b_init()
8155 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_RCR); in r8156b_init()
8156 ocp_data &= ~SLOT_EN; in r8156b_init()
8157 ocp_write_word(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in r8156b_init()
8159 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CPCR); in r8156b_init()
8160 ocp_data |= FLOW_CTRL_EN; in r8156b_init()
8161 ocp_write_word(tp, MCU_TYPE_PLA, PLA_CPCR, ocp_data); in r8156b_init()
8167 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_FW_CTRL); in r8156b_init()
8169 ocp_data |= FLOW_CTRL_PATCH_2; in r8156b_init()
8170 ocp_data &= ~AUTO_SPEEDUP; in r8156b_init()
8171 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_CTRL, ocp_data); in r8156b_init()
8173 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_FW_TASK); in r8156b_init()
8174 ocp_data |= FC_PATCH_TASK; in r8156b_init()
8175 ocp_write_word(tp, MCU_TYPE_USB, USB_FW_TASK, ocp_data); in r8156b_init()
8179 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3); in r8156b_init()
8180 ocp_data &= ~PLA_MCU_SPDWN_EN; in r8156b_init()
8181 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, ocp_data); in r8156b_init()
8183 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS); in r8156b_init()
8185 ocp_data |= CUR_LINK_OK; in r8156b_init()
8187 ocp_data &= ~CUR_LINK_OK; in r8156b_init()
8188 ocp_data |= POLL_LINK_CHG; in r8156b_init()
8189 ocp_write_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS, ocp_data); in r8156b_init()
8194 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); in r8156b_init()
8195 ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); in r8156b_init()
8196 ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); in r8156b_init()
8432 u32 ocp_data; in rtl8152_runtime_suspend() local
8435 ocp_data = rcr & ~RCR_ACPT_ALL; in rtl8152_runtime_suspend()
8436 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in rtl8152_runtime_suspend()
8438 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, in rtl8152_runtime_suspend()
8440 if (!(ocp_data & RXFIFO_EMPTY)) { in rtl8152_runtime_suspend()
9506 u32 ocp_data = 0; in rtl8152_get_version() local
9519 ocp_data = (__le32_to_cpu(*tmp) >> 16) & VERSION_MASK; in rtl8152_get_version()
9523 switch (ocp_data) { in rtl8152_get_version()
9574 dev_info(&intf->dev, "Unknown version 0x%04x\n", ocp_data); in rtl8152_get_version()