• Home
  • Raw
  • Download

Lines Matching refs:fec

57 	struct mpc52xx_fec __iomem *fec;  member
107 struct mpc52xx_fec __iomem *fec = priv->fec; in mpc52xx_fec_set_paddr() local
109 out_be32(&fec->paddr1, *(u32 *)(&mac[0])); in mpc52xx_fec_set_paddr()
110 out_be32(&fec->paddr2, (*(u16 *)(&mac[4]) << 16) | FEC_PADDR2_TYPE); in mpc52xx_fec_set_paddr()
116 struct mpc52xx_fec __iomem *fec = priv->fec; in mpc52xx_fec_get_paddr() local
118 *(u32 *)(&mac[0]) = in_be32(&fec->paddr1); in mpc52xx_fec_get_paddr()
119 *(u16 *)(&mac[4]) = in_be32(&fec->paddr2) >> 16; in mpc52xx_fec_get_paddr()
183 struct mpc52xx_fec __iomem *fec = priv->fec; in mpc52xx_fec_adjust_link() local
190 rcntrl = in_be32(&fec->r_cntrl); in mpc52xx_fec_adjust_link()
191 tcntrl = in_be32(&fec->x_cntrl); in mpc52xx_fec_adjust_link()
200 out_be32(&fec->r_cntrl, rcntrl); in mpc52xx_fec_adjust_link()
201 out_be32(&fec->x_cntrl, tcntrl); in mpc52xx_fec_adjust_link()
455 struct mpc52xx_fec __iomem *fec = priv->fec; in mpc52xx_fec_interrupt() local
458 ievent = in_be32(&fec->ievent); in mpc52xx_fec_interrupt()
464 out_be32(&fec->ievent, ievent); /* clear pending events */ in mpc52xx_fec_interrupt()
495 struct mpc52xx_fec __iomem *fec = priv->fec; in mpc52xx_fec_get_stats() local
497 stats->rx_bytes = in_be32(&fec->rmon_r_octets); in mpc52xx_fec_get_stats()
498 stats->rx_packets = in_be32(&fec->rmon_r_packets); in mpc52xx_fec_get_stats()
499 stats->rx_errors = in_be32(&fec->rmon_r_crc_align) + in mpc52xx_fec_get_stats()
500 in_be32(&fec->rmon_r_undersize) + in mpc52xx_fec_get_stats()
501 in_be32(&fec->rmon_r_oversize) + in mpc52xx_fec_get_stats()
502 in_be32(&fec->rmon_r_frag) + in mpc52xx_fec_get_stats()
503 in_be32(&fec->rmon_r_jab); in mpc52xx_fec_get_stats()
505 stats->tx_bytes = in_be32(&fec->rmon_t_octets); in mpc52xx_fec_get_stats()
506 stats->tx_packets = in_be32(&fec->rmon_t_packets); in mpc52xx_fec_get_stats()
507 stats->tx_errors = in_be32(&fec->rmon_t_crc_align) + in mpc52xx_fec_get_stats()
508 in_be32(&fec->rmon_t_undersize) + in mpc52xx_fec_get_stats()
509 in_be32(&fec->rmon_t_oversize) + in mpc52xx_fec_get_stats()
510 in_be32(&fec->rmon_t_frag) + in mpc52xx_fec_get_stats()
511 in_be32(&fec->rmon_t_jab); in mpc52xx_fec_get_stats()
513 stats->multicast = in_be32(&fec->rmon_r_mc_pkt); in mpc52xx_fec_get_stats()
514 stats->collisions = in_be32(&fec->rmon_t_col); in mpc52xx_fec_get_stats()
517 stats->rx_length_errors = in_be32(&fec->rmon_r_undersize) in mpc52xx_fec_get_stats()
518 + in_be32(&fec->rmon_r_oversize) in mpc52xx_fec_get_stats()
519 + in_be32(&fec->rmon_r_frag) in mpc52xx_fec_get_stats()
520 + in_be32(&fec->rmon_r_jab); in mpc52xx_fec_get_stats()
521 stats->rx_over_errors = in_be32(&fec->r_macerr); in mpc52xx_fec_get_stats()
522 stats->rx_crc_errors = in_be32(&fec->ieee_r_crc); in mpc52xx_fec_get_stats()
523 stats->rx_frame_errors = in_be32(&fec->ieee_r_align); in mpc52xx_fec_get_stats()
524 stats->rx_fifo_errors = in_be32(&fec->rmon_r_drop); in mpc52xx_fec_get_stats()
525 stats->rx_missed_errors = in_be32(&fec->rmon_r_drop); in mpc52xx_fec_get_stats()
529 stats->tx_carrier_errors = in_be32(&fec->ieee_t_cserr); in mpc52xx_fec_get_stats()
530 stats->tx_fifo_errors = in_be32(&fec->rmon_t_drop); in mpc52xx_fec_get_stats()
531 stats->tx_heartbeat_errors = in_be32(&fec->ieee_t_sqe); in mpc52xx_fec_get_stats()
532 stats->tx_window_errors = in_be32(&fec->ieee_t_lcol); in mpc52xx_fec_get_stats()
544 struct mpc52xx_fec __iomem *fec = priv->fec; in mpc52xx_fec_reset_stats() local
546 out_be32(&fec->mib_control, FEC_MIB_DISABLE); in mpc52xx_fec_reset_stats()
547 memset_io(&fec->rmon_t_drop, 0, in mpc52xx_fec_reset_stats()
550 out_be32(&fec->mib_control, 0); in mpc52xx_fec_reset_stats()
561 struct mpc52xx_fec __iomem *fec = priv->fec; in mpc52xx_fec_set_multicast_list() local
564 rx_control = in_be32(&fec->r_cntrl); in mpc52xx_fec_set_multicast_list()
568 out_be32(&fec->r_cntrl, rx_control); in mpc52xx_fec_set_multicast_list()
571 out_be32(&fec->r_cntrl, rx_control); in mpc52xx_fec_set_multicast_list()
574 out_be32(&fec->gaddr1, 0xffffffff); in mpc52xx_fec_set_multicast_list()
575 out_be32(&fec->gaddr2, 0xffffffff); in mpc52xx_fec_set_multicast_list()
589 out_be32(&fec->gaddr1, gaddr1); in mpc52xx_fec_set_multicast_list()
590 out_be32(&fec->gaddr2, gaddr2); in mpc52xx_fec_set_multicast_list()
604 struct mpc52xx_fec __iomem *fec = priv->fec; in mpc52xx_fec_hw_init() local
608 out_be32(&fec->ecntrl, FEC_ECNTRL_RESET); in mpc52xx_fec_hw_init()
610 if ((in_be32(&fec->ecntrl) & FEC_ECNTRL_RESET) == 0) in mpc52xx_fec_hw_init()
618 out_be32(&fec->op_pause, FEC_OP_PAUSE_OPCODE | 0x20); in mpc52xx_fec_hw_init()
623 out_be32(&fec->rfifo_cntrl, FEC_FIFO_CNTRL_FRAME | FEC_FIFO_CNTRL_LTG_7); in mpc52xx_fec_hw_init()
624 out_be32(&fec->tfifo_cntrl, FEC_FIFO_CNTRL_FRAME | FEC_FIFO_CNTRL_LTG_7); in mpc52xx_fec_hw_init()
627 out_be32(&fec->rfifo_alarm, 0x0000030c); in mpc52xx_fec_hw_init()
628 out_be32(&fec->tfifo_alarm, 0x00000100); in mpc52xx_fec_hw_init()
631 out_be32(&fec->x_wmrk, FEC_FIFO_WMRK_256B); in mpc52xx_fec_hw_init()
634 out_be32(&fec->xmit_fsm, FEC_XMIT_FSM_APPEND_CRC | FEC_XMIT_FSM_ENABLE_CRC); in mpc52xx_fec_hw_init()
635 out_be32(&fec->iaddr1, 0x00000000); /* No individual filter */ in mpc52xx_fec_hw_init()
636 out_be32(&fec->iaddr2, 0x00000000); /* No individual filter */ in mpc52xx_fec_hw_init()
641 out_be32(&fec->mii_speed, priv->mdio_speed); in mpc52xx_fec_hw_init()
655 struct mpc52xx_fec __iomem *fec = priv->fec; in mpc52xx_fec_start() local
662 out_be32(&fec->rfifo_status, in_be32(&fec->rfifo_status) & tmp); in mpc52xx_fec_start()
663 out_be32(&fec->tfifo_status, in_be32(&fec->tfifo_status) & tmp); in mpc52xx_fec_start()
666 out_be32(&fec->reset_cntrl, FEC_RESET_CNTRL_ENABLE_IS_RESET); in mpc52xx_fec_start()
686 out_be32(&fec->r_cntrl, rcntrl); in mpc52xx_fec_start()
687 out_be32(&fec->x_cntrl, tcntrl); in mpc52xx_fec_start()
690 out_be32(&fec->ievent, 0xffffffff); in mpc52xx_fec_start()
693 out_be32(&fec->imask, FEC_IMASK_ENABLE); in mpc52xx_fec_start()
696 out_be32(&fec->ecntrl, FEC_ECNTRL_ETHER_EN); in mpc52xx_fec_start()
697 out_be32(&fec->r_des_active, 0x01000000); in mpc52xx_fec_start()
709 struct mpc52xx_fec __iomem *fec = priv->fec; in mpc52xx_fec_stop() local
713 out_be32(&fec->imask, 0); in mpc52xx_fec_stop()
742 out_be32(&fec->ecntrl, in_be32(&fec->ecntrl) & ~FEC_ECNTRL_ETHER_EN); in mpc52xx_fec_stop()
749 struct mpc52xx_fec __iomem *fec = priv->fec; in mpc52xx_fec_reset() local
753 out_be32(&fec->rfifo_status, in_be32(&fec->rfifo_status)); in mpc52xx_fec_reset()
754 out_be32(&fec->reset_cntrl, FEC_RESET_CNTRL_RESET_FIFO); in mpc52xx_fec_reset()
899 priv->fec = ioremap(mem.start, sizeof(struct mpc52xx_fec)); in mpc52xx_fec_probe()
901 if (!priv->fec) { in mpc52xx_fec_probe()
983 iounmap(priv->fec); in mpc52xx_fec_probe()
1012 iounmap(priv->fec); in mpc52xx_fec_remove()