Lines Matching refs:cfg

205 	u64 cfg;  in bgx_lmac_rx_tx_enable()  local
210 cfg = bgx_reg_read(bgx, lmacid, BGX_CMRX_CFG); in bgx_lmac_rx_tx_enable()
212 cfg |= CMR_PKT_RX_EN | CMR_PKT_TX_EN; in bgx_lmac_rx_tx_enable()
214 cfg &= ~(CMR_PKT_RX_EN | CMR_PKT_TX_EN); in bgx_lmac_rx_tx_enable()
215 bgx_reg_write(bgx, lmacid, BGX_CMRX_CFG, cfg); in bgx_lmac_rx_tx_enable()
239 u64 cfg; in bgx_lmac_internal_loopback() local
247 cfg = bgx_reg_read(bgx, lmac_idx, BGX_GMP_PCS_MRX_CTL); in bgx_lmac_internal_loopback()
249 cfg |= PCS_MRX_CTL_LOOPBACK1; in bgx_lmac_internal_loopback()
251 cfg &= ~PCS_MRX_CTL_LOOPBACK1; in bgx_lmac_internal_loopback()
252 bgx_reg_write(bgx, lmac_idx, BGX_GMP_PCS_MRX_CTL, cfg); in bgx_lmac_internal_loopback()
254 cfg = bgx_reg_read(bgx, lmac_idx, BGX_SPUX_CONTROL1); in bgx_lmac_internal_loopback()
256 cfg |= SPU_CTL_LOOPBACK; in bgx_lmac_internal_loopback()
258 cfg &= ~SPU_CTL_LOOPBACK; in bgx_lmac_internal_loopback()
259 bgx_reg_write(bgx, lmac_idx, BGX_SPUX_CONTROL1, cfg); in bgx_lmac_internal_loopback()
267 u64 cfg; in get_qlm_for_bgx() local
292 cfg = readq(GSERX_CFG(qlm)) & GSERX_CFG_BGX; in get_qlm_for_bgx()
293 debug("%s:qlm%d: cfg = %lld\n", __func__, qlm, cfg); in get_qlm_for_bgx()
296 if (cfg) { in get_qlm_for_bgx()
306 u64 cfg; in bgx_lmac_sgmii_init() local
318 cfg = bgx_reg_read(bgx, lmacid, BGX_GMP_GMI_TXX_APPEND); in bgx_lmac_sgmii_init()
319 if (cfg & 1) in bgx_lmac_sgmii_init()
334 cfg = bgx_reg_read(bgx, lmacid, BGX_GMP_PCS_MRX_CTL); in bgx_lmac_sgmii_init()
335 cfg &= ~PCS_MRX_CTL_PWR_DN; in bgx_lmac_sgmii_init()
338 cfg |= (PCS_MRX_CTL_RST_AN); in bgx_lmac_sgmii_init()
340 cfg |= (PCS_MRX_CTL_RST_AN | PCS_MRX_CTL_AN_EN); in bgx_lmac_sgmii_init()
341 bgx_reg_write(bgx, lmacid, BGX_GMP_PCS_MRX_CTL, cfg); in bgx_lmac_sgmii_init()
348 cfg = bgx_reg_read(bgx, lmacid, BGX_GMP_PCS_MISCX_CTL); in bgx_lmac_sgmii_init()
349 cfg &= ~PCS_MISCX_CTL_DISP_EN; in bgx_lmac_sgmii_init()
350 bgx_reg_write(bgx, lmacid, BGX_GMP_PCS_MISCX_CTL, cfg); in bgx_lmac_sgmii_init()
355 cfg = bgx_reg_read(bgx, lmacid, BGX_GMP_PCS_MISCX_CTL); in bgx_lmac_sgmii_init()
356 cfg |= PCS_MISC_CTL_MODE; in bgx_lmac_sgmii_init()
357 bgx_reg_write(bgx, lmacid, BGX_GMP_PCS_MISCX_CTL, cfg); in bgx_lmac_sgmii_init()
375 u64 cfg; in bgx_lmac_sgmii_set_link_speed() local
382 cfg = bgx_reg_read(bgx, lmacid, BGX_CMRX_CFG); in bgx_lmac_sgmii_set_link_speed()
383 cfg &= ~CMR_EN; in bgx_lmac_sgmii_set_link_speed()
384 bgx_reg_write(bgx, lmacid, BGX_CMRX_CFG, cfg); in bgx_lmac_sgmii_set_link_speed()
444 cfg = bgx_reg_read(bgx, lmacid, BGX_CMRX_CFG); in bgx_lmac_sgmii_set_link_speed()
445 cfg |= CMR_EN; in bgx_lmac_sgmii_set_link_speed()
446 bgx_reg_write(bgx, lmacid, BGX_CMRX_CFG, cfg); in bgx_lmac_sgmii_set_link_speed()
453 u64 cfg; in bgx_lmac_xaui_init() local
466 cfg = bgx_reg_read(bgx, lmacid, BGX_CMRX_CFG); in bgx_lmac_xaui_init()
467 cfg &= ~CMR_EN; in bgx_lmac_xaui_init()
468 bgx_reg_write(bgx, lmacid, BGX_CMRX_CFG, cfg); in bgx_lmac_xaui_init()
480 cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_RX_INT); in bgx_lmac_xaui_init()
481 bgx_reg_write(bgx, lmacid, BGX_SMUX_RX_INT, cfg); in bgx_lmac_xaui_init()
482 cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_TX_INT); in bgx_lmac_xaui_init()
483 bgx_reg_write(bgx, lmacid, BGX_SMUX_TX_INT, cfg); in bgx_lmac_xaui_init()
484 cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_INT); in bgx_lmac_xaui_init()
485 bgx_reg_write(bgx, lmacid, BGX_SPUX_INT, cfg); in bgx_lmac_xaui_init()
500 cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_FEC_CONTROL); in bgx_lmac_xaui_init()
501 cfg &= ~SPU_FEC_CTL_FEC_EN; in bgx_lmac_xaui_init()
502 bgx_reg_write(bgx, lmacid, BGX_SPUX_FEC_CONTROL, cfg); in bgx_lmac_xaui_init()
505 cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_AN_CONTROL); in bgx_lmac_xaui_init()
506 cfg = cfg & ~(SPU_AN_CTL_XNP_EN); in bgx_lmac_xaui_init()
508 cfg = cfg | (SPU_AN_CTL_AN_EN); in bgx_lmac_xaui_init()
510 cfg = cfg & ~(SPU_AN_CTL_AN_EN); in bgx_lmac_xaui_init()
511 bgx_reg_write(bgx, lmacid, BGX_SPUX_AN_CONTROL, cfg); in bgx_lmac_xaui_init()
513 cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_AN_ADV); in bgx_lmac_xaui_init()
515 cfg &= ~((0xfULL << 22) | (1ULL << 12)); in bgx_lmac_xaui_init()
517 cfg |= (1 << 23); in bgx_lmac_xaui_init()
519 cfg |= (1 << 24); in bgx_lmac_xaui_init()
520 bgx_reg_write(bgx, lmacid, BGX_SPUX_AN_ADV, cfg); in bgx_lmac_xaui_init()
522 cfg = bgx_reg_read(bgx, 0, BGX_SPU_DBG_CONTROL); in bgx_lmac_xaui_init()
524 cfg |= SPU_DBG_CTL_AN_ARB_LINK_CHK_EN; in bgx_lmac_xaui_init()
526 cfg &= ~SPU_DBG_CTL_AN_ARB_LINK_CHK_EN; in bgx_lmac_xaui_init()
527 bgx_reg_write(bgx, 0, BGX_SPU_DBG_CONTROL, cfg); in bgx_lmac_xaui_init()
532 cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_CONTROL1); in bgx_lmac_xaui_init()
533 cfg &= ~SPU_CTL_LOW_POWER; in bgx_lmac_xaui_init()
534 bgx_reg_write(bgx, lmacid, BGX_SPUX_CONTROL1, cfg); in bgx_lmac_xaui_init()
536 cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_TX_CTL); in bgx_lmac_xaui_init()
537 cfg &= ~SMU_TX_CTL_UNI_EN; in bgx_lmac_xaui_init()
538 cfg |= SMU_TX_CTL_DIC_EN; in bgx_lmac_xaui_init()
539 bgx_reg_write(bgx, lmacid, BGX_SMUX_TX_CTL, cfg); in bgx_lmac_xaui_init()
653 u64 cfg; in bgx_xaui_check_link() local
658 cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_AN_CONTROL); in bgx_xaui_check_link()
659 if (cfg & SPU_AN_CTL_AN_EN) { in bgx_xaui_check_link()
660 cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_AN_STATUS); in bgx_xaui_check_link()
661 if (!(cfg & SPU_AN_STS_AN_COMPLETE)) { in bgx_xaui_check_link()
672 cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_INT); in bgx_xaui_check_link()
673 if (!(cfg & (1ull << 13))) { in bgx_xaui_check_link()
676 cfg = (1ull << 13) | (1ull << 14); in bgx_xaui_check_link()
677 bgx_reg_write(bgx, lmacid, BGX_SPUX_INT, cfg); in bgx_xaui_check_link()
681 cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_BR_PMD_CRTL); in bgx_xaui_check_link()
682 cfg |= (1ull << 0); in bgx_xaui_check_link()
683 bgx_reg_write(bgx, lmacid, BGX_SPUX_BR_PMD_CRTL, cfg); in bgx_xaui_check_link()
790 cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_INT); in bgx_xaui_check_link()
791 if (!(cfg & (1ull << 13))) { in bgx_xaui_check_link()
792 cfg = (1ull << 13) | (1ull << 14); in bgx_xaui_check_link()
793 bgx_reg_write(bgx, lmacid, BGX_SPUX_INT, cfg); in bgx_xaui_check_link()
794 cfg = bgx_reg_read(bgx, lmacid, in bgx_xaui_check_link()
796 cfg |= (1ull << 0); in bgx_xaui_check_link()
798 BGX_SPUX_BR_PMD_CRTL, cfg); in bgx_xaui_check_link()
840 cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_MISC_CONTROL); in bgx_xaui_check_link()
841 cfg &= ~SPU_MISC_CTL_RX_DIS; in bgx_xaui_check_link()
842 bgx_reg_write(bgx, lmacid, BGX_SPUX_MISC_CONTROL, cfg); in bgx_xaui_check_link()
849 u64 cfg; in bgx_lmac_enable() local
862 cfg = bgx_reg_read(bgx, lmacid, BGX_GMP_GMI_TXX_APPEND); in bgx_lmac_enable()
863 cfg |= ((1ull << 2) | (1ull << 1)); /* FCS and PAD */ in bgx_lmac_enable()
864 bgx_reg_modify(bgx, lmacid, BGX_GMP_GMI_TXX_APPEND, cfg); in bgx_lmac_enable()
869 cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_TX_APPEND); in bgx_lmac_enable()
870 cfg |= ((1ull << 2) | (1ull << 1)); /* FCS and PAD */ in bgx_lmac_enable()
871 bgx_reg_modify(bgx, lmacid, BGX_SMUX_TX_APPEND, cfg); in bgx_lmac_enable()
1429 u64 cfg; in octeontx_bgx_remove() local
1443 cfg = bgx_reg_read(bgx, lmacid, BGX_CMRX_CFG); in octeontx_bgx_remove()
1444 cfg &= ~(CMR_PKT_RX_EN | CMR_PKT_TX_EN); in octeontx_bgx_remove()
1445 bgx_reg_write(bgx, lmacid, BGX_CMRX_CFG, cfg); in octeontx_bgx_remove()
1450 cfg = bgx_reg_read(bgx, lmacid, BGX_GMP_PCS_MRX_CTL); in octeontx_bgx_remove()
1451 cfg |= PCS_MRX_CTL_PWR_DN; in octeontx_bgx_remove()
1452 bgx_reg_write(bgx, lmacid, BGX_GMP_PCS_MRX_CTL, cfg); in octeontx_bgx_remove()