Lines Matching full:cfg
178 u64 cfg; in cgx_lmac_addr_set() local
181 /* memcpy(&cfg, mac_addr, 6); */ in cgx_lmac_addr_set()
183 cfg = mac2u64 (mac_addr); in cgx_lmac_addr_set()
186 cfg | CGX_DMAC_CAM_ADDR_ENABLE | ((u64)lmac_id << 49)); in cgx_lmac_addr_set()
188 cfg = cgx_read(cgx_dev, lmac_id, CGXX_CMRX_RX_DMAC_CTL0); in cgx_lmac_addr_set()
189 cfg |= CGX_DMAC_CTL0_CAM_ENABLE; in cgx_lmac_addr_set()
190 cgx_write(cgx_dev, lmac_id, CGXX_CMRX_RX_DMAC_CTL0, cfg); in cgx_lmac_addr_set()
198 u64 cfg; in cgx_lmac_addr_get() local
200 cfg = cgx_read(cgx_dev, 0, CGXX_CMRX_RX_DMAC_CAM0 + lmac_id * 0x8); in cgx_lmac_addr_get()
201 return cfg & CGX_RX_DMAC_ADR_MASK; in cgx_lmac_addr_get()
217 u64 cfg; in cgx_get_lmac_type() local
219 cfg = cgx_read(cgx, lmac_id, CGXX_CMRX_CFG); in cgx_get_lmac_type()
220 return (cfg >> CGX_LMAC_TYPE_SHIFT) & CGX_LMAC_TYPE_MASK; in cgx_get_lmac_type()
228 u64 cfg; in cgx_lmac_internal_loopback() local
235 cfg = cgx_read(cgx, lmac_id, CGXX_GMP_PCS_MRX_CTL); in cgx_lmac_internal_loopback()
237 cfg |= CGXX_GMP_PCS_MRX_CTL_LBK; in cgx_lmac_internal_loopback()
239 cfg &= ~CGXX_GMP_PCS_MRX_CTL_LBK; in cgx_lmac_internal_loopback()
240 cgx_write(cgx, lmac_id, CGXX_GMP_PCS_MRX_CTL, cfg); in cgx_lmac_internal_loopback()
242 cfg = cgx_read(cgx, lmac_id, CGXX_SPUX_CONTROL1); in cgx_lmac_internal_loopback()
244 cfg |= CGXX_SPUX_CONTROL1_LBK; in cgx_lmac_internal_loopback()
246 cfg &= ~CGXX_SPUX_CONTROL1_LBK; in cgx_lmac_internal_loopback()
247 cgx_write(cgx, lmac_id, CGXX_SPUX_CONTROL1, cfg); in cgx_lmac_internal_loopback()
255 u64 cfg = 0; in cgx_lmac_promisc_config() local
262 cfg = cgx_read(cgx, lmac_id, CGXX_CMRX_RX_DMAC_CTL0); in cgx_lmac_promisc_config()
263 cfg &= ~(CGX_DMAC_CAM_ACCEPT | CGX_DMAC_MCAST_MODE); in cgx_lmac_promisc_config()
264 cfg |= CGX_DMAC_BCAST_MODE; in cgx_lmac_promisc_config()
265 cgx_write(cgx, lmac_id, CGXX_CMRX_RX_DMAC_CTL0, cfg); in cgx_lmac_promisc_config()
267 cfg = cgx_read(cgx, 0, in cgx_lmac_promisc_config()
269 cfg &= ~CGX_DMAC_CAM_ADDR_ENABLE; in cgx_lmac_promisc_config()
271 (CGXX_CMRX_RX_DMAC_CAM0 + lmac_id * 0x8), cfg); in cgx_lmac_promisc_config()
274 cfg = cgx_read(cgx, lmac_id, CGXX_CMRX_RX_DMAC_CTL0); in cgx_lmac_promisc_config()
275 cfg |= CGX_DMAC_CAM_ACCEPT | CGX_DMAC_MCAST_MODE; in cgx_lmac_promisc_config()
276 cgx_write(cgx, lmac_id, CGXX_CMRX_RX_DMAC_CTL0, cfg); in cgx_lmac_promisc_config()
277 cfg = cgx_read(cgx, 0, in cgx_lmac_promisc_config()
279 cfg |= CGX_DMAC_CAM_ADDR_ENABLE; in cgx_lmac_promisc_config()
281 (CGXX_CMRX_RX_DMAC_CAM0 + lmac_id * 0x8), cfg); in cgx_lmac_promisc_config()
289 u64 cfg; in cgx_lmac_enadis_rx_pause_fwding() local
295 cfg = cgx_read(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL); in cgx_lmac_enadis_rx_pause_fwding()
296 cfg |= CGX_GMP_GMI_RXX_FRM_CTL_CTL_BCK; in cgx_lmac_enadis_rx_pause_fwding()
297 cgx_write(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL, cfg); in cgx_lmac_enadis_rx_pause_fwding()
299 cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL); in cgx_lmac_enadis_rx_pause_fwding()
300 cfg |= CGX_SMUX_RX_FRM_CTL_CTL_BCK; in cgx_lmac_enadis_rx_pause_fwding()
301 cgx_write(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL, cfg); in cgx_lmac_enadis_rx_pause_fwding()
303 cfg = cgx_read(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL); in cgx_lmac_enadis_rx_pause_fwding()
304 cfg &= ~CGX_GMP_GMI_RXX_FRM_CTL_CTL_BCK; in cgx_lmac_enadis_rx_pause_fwding()
305 cgx_write(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL, cfg); in cgx_lmac_enadis_rx_pause_fwding()
307 cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL); in cgx_lmac_enadis_rx_pause_fwding()
308 cfg &= ~CGX_SMUX_RX_FRM_CTL_CTL_BCK; in cgx_lmac_enadis_rx_pause_fwding()
309 cgx_write(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL, cfg); in cgx_lmac_enadis_rx_pause_fwding()
336 u64 cfg; in cgx_lmac_rx_tx_enable() local
341 cfg = cgx_read(cgx, lmac_id, CGXX_CMRX_CFG); in cgx_lmac_rx_tx_enable()
343 cfg |= CMR_EN | DATA_PKT_RX_EN | DATA_PKT_TX_EN; in cgx_lmac_rx_tx_enable()
345 cfg &= ~(CMR_EN | DATA_PKT_RX_EN | DATA_PKT_TX_EN); in cgx_lmac_rx_tx_enable()
346 cgx_write(cgx, lmac_id, CGXX_CMRX_CFG, cfg); in cgx_lmac_rx_tx_enable()
353 u64 cfg, last; in cgx_lmac_tx_enable() local
358 cfg = cgx_read(cgx, lmac_id, CGXX_CMRX_CFG); in cgx_lmac_tx_enable()
359 last = cfg; in cgx_lmac_tx_enable()
361 cfg |= DATA_PKT_TX_EN; in cgx_lmac_tx_enable()
363 cfg &= ~DATA_PKT_TX_EN; in cgx_lmac_tx_enable()
365 if (cfg != last) in cgx_lmac_tx_enable()
366 cgx_write(cgx, lmac_id, CGXX_CMRX_CFG, cfg); in cgx_lmac_tx_enable()
374 u64 cfg; in cgx_lmac_get_pause_frm() local
379 cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL); in cgx_lmac_get_pause_frm()
380 *rx_pause = !!(cfg & CGX_SMUX_RX_FRM_CTL_CTL_BCK); in cgx_lmac_get_pause_frm()
382 cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_TX_CTL); in cgx_lmac_get_pause_frm()
383 *tx_pause = !!(cfg & CGX_SMUX_TX_CTL_L2P_BP_CONV); in cgx_lmac_get_pause_frm()
391 u64 cfg; in cgx_lmac_set_pause_frm() local
396 cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL); in cgx_lmac_set_pause_frm()
397 cfg &= ~CGX_SMUX_RX_FRM_CTL_CTL_BCK; in cgx_lmac_set_pause_frm()
398 cfg |= rx_pause ? CGX_SMUX_RX_FRM_CTL_CTL_BCK : 0x0; in cgx_lmac_set_pause_frm()
399 cgx_write(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL, cfg); in cgx_lmac_set_pause_frm()
401 cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_TX_CTL); in cgx_lmac_set_pause_frm()
402 cfg &= ~CGX_SMUX_TX_CTL_L2P_BP_CONV; in cgx_lmac_set_pause_frm()
403 cfg |= tx_pause ? CGX_SMUX_TX_CTL_L2P_BP_CONV : 0x0; in cgx_lmac_set_pause_frm()
404 cgx_write(cgx, lmac_id, CGXX_SMUX_TX_CTL, cfg); in cgx_lmac_set_pause_frm()
406 cfg = cgx_read(cgx, 0, CGXX_CMR_RX_OVR_BP); in cgx_lmac_set_pause_frm()
408 cfg &= ~CGX_CMR_RX_OVR_BP_EN(lmac_id); in cgx_lmac_set_pause_frm()
410 cfg |= CGX_CMR_RX_OVR_BP_EN(lmac_id); in cgx_lmac_set_pause_frm()
411 cfg &= ~CGX_CMR_RX_OVR_BP_BP(lmac_id); in cgx_lmac_set_pause_frm()
413 cgx_write(cgx, 0, CGXX_CMR_RX_OVR_BP, cfg); in cgx_lmac_set_pause_frm()
419 u64 cfg; in cgx_lmac_pause_frm_config() local
425 cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL); in cgx_lmac_pause_frm_config()
426 cfg |= CGX_SMUX_RX_FRM_CTL_CTL_BCK; in cgx_lmac_pause_frm_config()
427 cgx_write(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL, cfg); in cgx_lmac_pause_frm_config()
429 cfg = cgx_read(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL); in cgx_lmac_pause_frm_config()
430 cfg |= CGX_GMP_GMI_RXX_FRM_CTL_CTL_BCK; in cgx_lmac_pause_frm_config()
431 cgx_write(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL, cfg); in cgx_lmac_pause_frm_config()
434 cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_TX_CTL); in cgx_lmac_pause_frm_config()
435 cfg |= CGX_SMUX_TX_CTL_L2P_BP_CONV; in cgx_lmac_pause_frm_config()
436 cgx_write(cgx, lmac_id, CGXX_SMUX_TX_CTL, cfg); in cgx_lmac_pause_frm_config()
441 cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_TX_PAUSE_PKT_INTERVAL); in cgx_lmac_pause_frm_config()
442 cfg &= ~0xFFFFULL; in cgx_lmac_pause_frm_config()
444 cfg | (DEFAULT_PAUSE_TIME / 2)); in cgx_lmac_pause_frm_config()
449 cfg = cgx_read(cgx, lmac_id, in cgx_lmac_pause_frm_config()
451 cfg &= ~0xFFFFULL; in cgx_lmac_pause_frm_config()
453 cfg | (DEFAULT_PAUSE_TIME / 2)); in cgx_lmac_pause_frm_config()
456 cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL); in cgx_lmac_pause_frm_config()
457 cfg &= ~CGX_SMUX_RX_FRM_CTL_CTL_BCK; in cgx_lmac_pause_frm_config()
458 cgx_write(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL, cfg); in cgx_lmac_pause_frm_config()
460 cfg = cgx_read(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL); in cgx_lmac_pause_frm_config()
461 cfg &= ~CGX_GMP_GMI_RXX_FRM_CTL_CTL_BCK; in cgx_lmac_pause_frm_config()
462 cgx_write(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL, cfg); in cgx_lmac_pause_frm_config()
465 cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_TX_CTL); in cgx_lmac_pause_frm_config()
466 cfg &= ~CGX_SMUX_TX_CTL_L2P_BP_CONV; in cgx_lmac_pause_frm_config()
467 cgx_write(cgx, lmac_id, CGXX_SMUX_TX_CTL, cfg); in cgx_lmac_pause_frm_config()
474 u64 cfg; in cgx_lmac_ptp_config() local
481 cfg = cgx_read(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL); in cgx_lmac_ptp_config()
482 cfg |= CGX_GMP_GMI_RXX_FRM_CTL_PTP_MODE; in cgx_lmac_ptp_config()
483 cgx_write(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL, cfg); in cgx_lmac_ptp_config()
485 cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL); in cgx_lmac_ptp_config()
486 cfg |= CGX_SMUX_RX_FRM_CTL_PTP_MODE; in cgx_lmac_ptp_config()
487 cgx_write(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL, cfg); in cgx_lmac_ptp_config()
490 cfg = cgx_read(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL); in cgx_lmac_ptp_config()
491 cfg &= ~CGX_GMP_GMI_RXX_FRM_CTL_PTP_MODE; in cgx_lmac_ptp_config()
492 cgx_write(cgx, lmac_id, CGXX_GMP_GMI_RXX_FRM_CTL, cfg); in cgx_lmac_ptp_config()
494 cfg = cgx_read(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL); in cgx_lmac_ptp_config()
495 cfg &= ~CGX_SMUX_RX_FRM_CTL_PTP_MODE; in cgx_lmac_ptp_config()
496 cgx_write(cgx, lmac_id, CGXX_SMUX_RX_FRM_CTL, cfg); in cgx_lmac_ptp_config()