• Home
  • Raw
  • Download

Lines Matching refs:dmvgbe

44 static int smi_wait_ready(struct mvgbe_device *dmvgbe)  in smi_wait_ready()  argument
68 struct mvgbe_device *dmvgbe = to_mvgbe(dev); in smi_reg_read() local
69 struct mvgbe_registers *regs = dmvgbe->regs; in smi_reg_read()
93 if (smi_wait_ready(dmvgbe) < 0) in smi_reg_read()
138 struct mvgbe_device *dmvgbe = to_mvgbe(dev); in smi_reg_write() local
139 struct mvgbe_registers *regs = dmvgbe->regs; in smi_reg_write()
160 if (smi_wait_ready(dmvgbe) < 0) in smi_reg_write()
379 static void mvgbe_init_rx_desc_ring(struct mvgbe_device *dmvgbe) in mvgbe_init_rx_desc_ring() argument
385 p_rx_desc = dmvgbe->p_rxdesc; in mvgbe_init_rx_desc_ring()
391 p_rx_desc->buf_ptr = dmvgbe->p_rxbuf + i * PKTSIZE_ALIGN; in mvgbe_init_rx_desc_ring()
393 p_rx_desc->nxtdesc_p = dmvgbe->p_rxdesc; in mvgbe_init_rx_desc_ring()
400 dmvgbe->p_rxdesc_curr = dmvgbe->p_rxdesc; in mvgbe_init_rx_desc_ring()
405 struct mvgbe_device *dmvgbe = to_mvgbe(dev); in mvgbe_init() local
406 struct mvgbe_registers *regs = dmvgbe->regs; in mvgbe_init()
413 mvgbe_init_rx_desc_ring(dmvgbe); in mvgbe_init()
425 port_uc_addr_set(regs, dmvgbe->dev.enetaddr); in mvgbe_init()
454 MVGBE_REG_WR(regs->rxcdp[RXUQ], (u32) dmvgbe->p_rxdesc_curr); in mvgbe_init()
483 struct mvgbe_device *dmvgbe = to_mvgbe(dev); in mvgbe_halt() local
484 struct mvgbe_registers *regs = dmvgbe->regs; in mvgbe_halt()
511 struct mvgbe_device *dmvgbe = to_mvgbe(dev); in mvgbe_write_hwaddr() local
512 struct mvgbe_registers *regs = dmvgbe->regs; in mvgbe_write_hwaddr()
515 port_uc_addr_set(regs, dmvgbe->dev.enetaddr); in mvgbe_write_hwaddr()
521 struct mvgbe_device *dmvgbe = to_mvgbe(dev); in mvgbe_send() local
522 struct mvgbe_registers *regs = dmvgbe->regs; in mvgbe_send()
523 struct mvgbe_txdesc *p_txdesc = dmvgbe->p_txdesc; in mvgbe_send()
536 memcpy(dmvgbe->p_aligned_txbuf, p, datasize); in mvgbe_send()
537 p = dmvgbe->p_aligned_txbuf; in mvgbe_send()
576 struct mvgbe_device *dmvgbe = to_mvgbe(dev); in mvgbe_recv() local
577 struct mvgbe_rxdesc *p_rxdesc_curr = dmvgbe->p_rxdesc_curr; in mvgbe_recv()
638 rxdesc_curr_addr = (u32)&dmvgbe->p_rxdesc_curr; in mvgbe_recv()
685 struct mvgbe_device *dmvgbe; in mvgbe_initialize() local
695 dmvgbe = malloc(sizeof(struct mvgbe_device)); in mvgbe_initialize()
697 if (!dmvgbe) in mvgbe_initialize()
700 memset(dmvgbe, 0, sizeof(struct mvgbe_device)); in mvgbe_initialize()
702 dmvgbe->p_rxdesc = in mvgbe_initialize()
706 if (!dmvgbe->p_rxdesc) in mvgbe_initialize()
709 dmvgbe->p_rxbuf = (u8 *) memalign(PKTALIGN, in mvgbe_initialize()
712 if (!dmvgbe->p_rxbuf) in mvgbe_initialize()
715 dmvgbe->p_aligned_txbuf = memalign(8, PKTSIZE_ALIGN); in mvgbe_initialize()
717 if (!dmvgbe->p_aligned_txbuf) in mvgbe_initialize()
720 dmvgbe->p_txdesc = (struct mvgbe_txdesc *) memalign( in mvgbe_initialize()
723 if (!dmvgbe->p_txdesc) { in mvgbe_initialize()
724 free(dmvgbe->p_aligned_txbuf); in mvgbe_initialize()
726 free(dmvgbe->p_rxbuf); in mvgbe_initialize()
728 free(dmvgbe->p_rxdesc); in mvgbe_initialize()
730 free(dmvgbe); in mvgbe_initialize()
737 dev = &dmvgbe->dev; in mvgbe_initialize()
744 dmvgbe->regs = (void *)MVGBE0_BASE; in mvgbe_initialize()
748 dmvgbe->regs = (void *)MVGBE1_BASE; in mvgbe_initialize()