Lines Matching refs:ocp_data
360 u32 ocp_data; in r8152b_reset_packet_filter() local
362 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_FMC); in r8152b_reset_packet_filter()
363 ocp_data &= ~FMC_FCR_MCU_EN; in r8152b_reset_packet_filter()
364 ocp_write_word(tp, MCU_TYPE_PLA, PLA_FMC, ocp_data); in r8152b_reset_packet_filter()
365 ocp_data |= FMC_FCR_MCU_EN; in r8152b_reset_packet_filter()
366 ocp_write_word(tp, MCU_TYPE_PLA, PLA_FMC, ocp_data); in r8152b_reset_packet_filter()
387 u32 ocp_data; in rtl8152_nic_reset() local
389 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, BIST_CTRL); in rtl8152_nic_reset()
390 ocp_data |= BIST_CTRL_SW_RESET; in rtl8152_nic_reset()
391 ocp_write_dword(tp, MCU_TYPE_PLA, BIST_CTRL, ocp_data); in rtl8152_nic_reset()
406 u32 ocp_data; in rtl_set_eee_plus() local
408 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EEEP_CR); in rtl_set_eee_plus()
409 ocp_data &= ~EEEP_CR_EEEP_TX; in rtl_set_eee_plus()
410 ocp_write_word(tp, MCU_TYPE_PLA, PLA_EEEP_CR, ocp_data); in rtl_set_eee_plus()
415 u32 ocp_data; in rxdy_gated_en() local
417 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MISC_1); in rxdy_gated_en()
419 ocp_data |= RXDY_GATED_EN; in rxdy_gated_en()
421 ocp_data &= ~RXDY_GATED_EN; in rxdy_gated_en()
422 ocp_write_word(tp, MCU_TYPE_PLA, PLA_MISC_1, ocp_data); in rxdy_gated_en()
427 u32 ocp_data; in rtl8152_set_rx_mode() local
435 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in rtl8152_set_rx_mode()
436 ocp_data |= RCR_APM | RCR_AM | RCR_AB; in rtl8152_set_rx_mode()
437 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in rtl8152_set_rx_mode()
442 u32 ocp_data; in rtl_enable() local
446 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_CR); in rtl_enable()
447 ocp_data |= PLA_CR_RE | PLA_CR_TE; in rtl_enable()
448 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CR, ocp_data); in rtl_enable()
466 u32 ocp_data = tp->coalesce / 8; in r8153_set_rx_early_timeout() local
468 ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_TIMEOUT, ocp_data); in r8153_set_rx_early_timeout()
473 u32 ocp_data = (RTL8152_AGG_BUF_SZ - RTL8153_RMS) / 4; in r8153_set_rx_early_size() local
475 ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_SIZE, ocp_data); in r8153_set_rx_early_size()
489 u32 ocp_data; in rtl_disable() local
491 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in rtl_disable()
492 ocp_data &= ~RCR_ACPT_ALL; in rtl_disable()
493 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in rtl_disable()
503 u32 ocp_data; in r8152_power_cut_en() local
505 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_UPS_CTRL); in r8152_power_cut_en()
507 ocp_data |= POWER_CUT; in r8152_power_cut_en()
509 ocp_data &= ~POWER_CUT; in r8152_power_cut_en()
510 ocp_write_word(tp, MCU_TYPE_USB, USB_UPS_CTRL, ocp_data); in r8152_power_cut_en()
512 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_PM_CTRL_STATUS); in r8152_power_cut_en()
513 ocp_data &= ~RESUME_INDICATE; in r8152_power_cut_en()
514 ocp_write_word(tp, MCU_TYPE_USB, USB_PM_CTRL_STATUS, ocp_data); in r8152_power_cut_en()
519 u32 ocp_data; in rtl_rx_vlan_en() local
521 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CPCR); in rtl_rx_vlan_en()
523 ocp_data |= CPCR_RX_VLAN; in rtl_rx_vlan_en()
525 ocp_data &= ~CPCR_RX_VLAN; in rtl_rx_vlan_en()
526 ocp_write_word(tp, MCU_TYPE_PLA, PLA_CPCR, ocp_data); in rtl_rx_vlan_en()
543 u32 ocp_data; in r8153_u2p3en() local
545 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_U2P3_CTRL); in r8153_u2p3en()
547 ocp_data |= U2P3_ENABLE; in r8153_u2p3en()
549 ocp_data &= ~U2P3_ENABLE; in r8153_u2p3en()
550 ocp_write_word(tp, MCU_TYPE_USB, USB_U2P3_CTRL, ocp_data); in r8153_u2p3en()
555 u32 ocp_data; in r8153_power_cut_en() local
557 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_POWER_CUT); in r8153_power_cut_en()
559 ocp_data |= PWR_EN | PHASE2_EN; in r8153_power_cut_en()
561 ocp_data &= ~(PWR_EN | PHASE2_EN); in r8153_power_cut_en()
562 ocp_write_word(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data); in r8153_power_cut_en()
564 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_MISC_0); in r8153_power_cut_en()
565 ocp_data &= ~PCUT_STATUS; in r8153_power_cut_en()
566 ocp_write_word(tp, MCU_TYPE_USB, USB_MISC_0, ocp_data); in r8153_power_cut_en()
616 u32 ocp_data; in rtl8152_reinit_ll() local
624 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); in rtl8152_reinit_ll()
625 ocp_data |= RE_INIT_LL; in rtl8152_reinit_ll()
626 ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); in rtl8152_reinit_ll()
636 u32 ocp_data; in r8152b_exit_oob() local
638 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in r8152b_exit_oob()
639 ocp_data &= ~RCR_ACPT_ALL; in r8152b_exit_oob()
640 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in r8152b_exit_oob()
648 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in r8152b_exit_oob()
649 ocp_data &= ~NOW_IS_OOB; in r8152b_exit_oob()
650 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in r8152b_exit_oob()
652 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); in r8152b_exit_oob()
653 ocp_data &= ~MCU_BORW_EN; in r8152b_exit_oob()
654 ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); in r8152b_exit_oob()
687 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_TCR0); in r8152b_exit_oob()
688 ocp_data |= TCR0_AUTO_FIFO; in r8152b_exit_oob()
689 ocp_write_word(tp, MCU_TYPE_PLA, PLA_TCR0, ocp_data); in r8152b_exit_oob()
694 u32 ocp_data; in r8152b_enter_oob() local
696 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in r8152b_enter_oob()
697 ocp_data &= ~NOW_IS_OOB; in r8152b_enter_oob()
698 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in r8152b_enter_oob()
712 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PAL_BDC_CR); in r8152b_enter_oob()
713 ocp_data |= ALDPS_PROXY_MODE; in r8152b_enter_oob()
714 ocp_write_word(tp, MCU_TYPE_PLA, PAL_BDC_CR, ocp_data); in r8152b_enter_oob()
716 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in r8152b_enter_oob()
717 ocp_data |= NOW_IS_OOB | DIS_MCU_CLROOB; in r8152b_enter_oob()
718 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in r8152b_enter_oob()
722 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in r8152b_enter_oob()
723 ocp_data |= RCR_APM | RCR_AM | RCR_AB; in r8152b_enter_oob()
724 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in r8152b_enter_oob()
729 u32 ocp_data; in r8153_hw_phy_cfg() local
762 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR); in r8153_hw_phy_cfg()
763 ocp_data |= PFM_PWM_SWITCH; in r8153_hw_phy_cfg()
764 ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data); in r8153_hw_phy_cfg()
776 u32 ocp_data; in r8153_first_init() local
780 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in r8153_first_init()
781 ocp_data &= ~RCR_ACPT_ALL; in r8153_first_init()
782 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in r8153_first_init()
788 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in r8153_first_init()
789 ocp_data &= ~NOW_IS_OOB; in r8153_first_init()
790 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in r8153_first_init()
792 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); in r8153_first_init()
793 ocp_data &= ~MCU_BORW_EN; in r8153_first_init()
794 ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); in r8153_first_init()
800 ocp_data = RTL8153_RMS; in r8153_first_init()
801 ocp_write_word(tp, MCU_TYPE_PLA, PLA_RMS, ocp_data); in r8153_first_init()
804 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_TCR0); in r8153_first_init()
805 ocp_data |= TCR0_AUTO_FIFO; in r8153_first_init()
806 ocp_write_word(tp, MCU_TYPE_PLA, PLA_TCR0, ocp_data); in r8153_first_init()
818 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); in r8153_first_init()
820 ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); in r8153_first_init()
821 ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); in r8153_first_init()
826 u32 ocp_data; in r8153_enter_oob() local
828 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in r8153_enter_oob()
829 ocp_data &= ~NOW_IS_OOB; in r8153_enter_oob()
830 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in r8153_enter_oob()
836 ocp_data = RTL8153_RMS; in r8153_enter_oob()
837 ocp_write_word(tp, MCU_TYPE_PLA, PLA_RMS, ocp_data); in r8153_enter_oob()
839 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_TEREDO_CFG); in r8153_enter_oob()
840 ocp_data &= ~TEREDO_WAKE_MASK; in r8153_enter_oob()
841 ocp_write_word(tp, MCU_TYPE_PLA, PLA_TEREDO_CFG, ocp_data); in r8153_enter_oob()
845 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PAL_BDC_CR); in r8153_enter_oob()
846 ocp_data |= ALDPS_PROXY_MODE; in r8153_enter_oob()
847 ocp_write_word(tp, MCU_TYPE_PLA, PAL_BDC_CR, ocp_data); in r8153_enter_oob()
849 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); in r8153_enter_oob()
850 ocp_data |= NOW_IS_OOB | DIS_MCU_CLROOB; in r8153_enter_oob()
851 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); in r8153_enter_oob()
855 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); in r8153_enter_oob()
856 ocp_data |= RCR_APM | RCR_AM | RCR_AB; in r8153_enter_oob()
857 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); in r8153_enter_oob()
980 u32 ocp_data; in r8152b_get_version() local
984 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_TCR1); in r8152b_get_version()
985 tcr = (u16)(ocp_data & VERSION_MASK); in r8152b_get_version()
1010 u32 ocp_data; in rtl_tally_reset() local
1012 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY); in rtl_tally_reset()
1013 ocp_data |= TALLY_RESET; in rtl_tally_reset()
1014 ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data); in rtl_tally_reset()
1019 u32 ocp_data; in r8152b_init() local
1024 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_LED_FEATURE); in r8152b_init()
1025 ocp_data &= ~LED_MODE_MASK; in r8152b_init()
1026 ocp_write_word(tp, MCU_TYPE_PLA, PLA_LED_FEATURE, ocp_data); in r8152b_init()
1031 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR); in r8152b_init()
1032 ocp_data |= TX_10M_IDLE_EN | PFM_PWM_SWITCH; in r8152b_init()
1033 ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data); in r8152b_init()
1034 ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL); in r8152b_init()
1035 ocp_data &= ~MCU_CLK_RATIO_MASK; in r8152b_init()
1036 ocp_data |= MCU_CLK_RATIO | D3_CLK_GATED_EN; in r8152b_init()
1037 ocp_write_dword(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL, ocp_data); in r8152b_init()
1038 ocp_data = GPHY_STS_MSK | SPEED_DOWN_MSK | in r8152b_init()
1040 ocp_write_word(tp, MCU_TYPE_PLA, PLA_GPHY_INTR_IMR, ocp_data); in r8152b_init()
1042 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_TIMER); in r8152b_init()
1043 ocp_data |= BIT(15); in r8152b_init()
1044 ocp_write_word(tp, MCU_TYPE_USB, USB_USB_TIMER, ocp_data); in r8152b_init()
1046 ocp_data &= ~BIT(15); in r8152b_init()
1047 ocp_write_word(tp, MCU_TYPE_USB, USB_USB_TIMER, ocp_data); in r8152b_init()
1053 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); in r8152b_init()
1055 ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); in r8152b_init()
1056 ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); in r8152b_init()
1062 u32 ocp_data; in r8153_init() local
1071 ocp_data = ocp_reg_read(tp, OCP_PHY_STATUS) & PHY_STAT_MASK; in r8153_init()
1072 if (ocp_data == PHY_STAT_LAN_ON || ocp_data == PHY_STAT_PWRDN) in r8153_init()
1081 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_SSPHYLINK2); in r8153_init()
1082 ocp_data &= ~pwd_dn_scale_mask; in r8153_init()
1083 ocp_data |= pwd_dn_scale(96); in r8153_init()
1084 ocp_write_word(tp, MCU_TYPE_USB, USB_SSPHYLINK2, ocp_data); in r8153_init()
1086 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_USB2PHY); in r8153_init()
1087 ocp_data |= USB2PHY_L1 | USB2PHY_SUSPEND; in r8153_init()
1088 ocp_write_byte(tp, MCU_TYPE_USB, USB_USB2PHY, ocp_data); in r8153_init()
1090 ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_DMY_REG0); in r8153_init()
1091 ocp_data &= ~ECM_ALDPS; in r8153_init()
1092 ocp_write_byte(tp, MCU_TYPE_PLA, PLA_DMY_REG0, ocp_data); in r8153_init()
1094 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY1); in r8153_init()
1096 ocp_data &= ~DYNAMIC_BURST; in r8153_init()
1098 ocp_data |= DYNAMIC_BURST; in r8153_init()
1099 ocp_write_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY1, ocp_data); in r8153_init()
1101 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY1); in r8153_init()
1103 ocp_data &= ~DYNAMIC_BURST; in r8153_init()
1105 ocp_data |= DYNAMIC_BURST; in r8153_init()
1106 ocp_write_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY1, ocp_data); in r8153_init()
1109 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY2); in r8153_init()
1110 ocp_data |= EP4_FULL_FC; in r8153_init()
1111 ocp_write_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY2, ocp_data); in r8153_init()
1113 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_WDT11_CTRL); in r8153_init()
1114 ocp_data &= ~TIMER11_EN; in r8153_init()
1115 ocp_write_word(tp, MCU_TYPE_USB, USB_WDT11_CTRL, ocp_data); in r8153_init()
1117 ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_LED_FEATURE); in r8153_init()
1118 ocp_data &= ~LED_MODE_MASK; in r8153_init()
1119 ocp_write_word(tp, MCU_TYPE_PLA, PLA_LED_FEATURE, ocp_data); in r8153_init()
1121 ocp_data = FIFO_EMPTY_1FB | ROK_EXIT_LPM; in r8153_init()
1123 ocp_data |= LPM_TIMER_500MS; in r8153_init()
1125 ocp_data |= LPM_TIMER_500US; in r8153_init()
1126 ocp_write_byte(tp, MCU_TYPE_USB, USB_LPM_CTRL, ocp_data); in r8153_init()
1128 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_AFE_CTRL2); in r8153_init()
1129 ocp_data &= ~SEN_VAL_MASK; in r8153_init()
1130 ocp_data |= SEN_VAL_NORMAL | SEL_RXIDLE; in r8153_init()
1131 ocp_write_word(tp, MCU_TYPE_USB, USB_AFE_CTRL2, ocp_data); in r8153_init()