Lines Matching refs:info
122 struct fec_info_s *info = dev->priv; in fec_send() local
123 volatile fec_t *fecp = (fec_t *) (info->iobase); in fec_send()
127 miiphy_read(dev->name, info->phy_addr, MII_BMSR, &phyStatus); in fec_send()
133 while ((info->txbd[info->txIdx].cbd_sc & BD_ENET_TX_READY) && in fec_send()
142 info->txbd[info->txIdx].cbd_bufaddr = (uint) packet; in fec_send()
143 info->txbd[info->txIdx].cbd_datlen = length; in fec_send()
144 info->txbd[info->txIdx].cbd_sc |= BD_ENET_TX_RDY_LST; in fec_send()
166 while ((info->txbd[info->txIdx].cbd_sc & BD_ENET_TX_READY) && in fec_send()
178 info->txbd[info->txIdx].cbd_sc, in fec_send()
179 (info->txbd[info->txIdx].cbd_sc & 0x003C) >> 2); in fec_send()
183 rc = (info->txbd[info->txIdx].cbd_sc & BD_ENET_TX_STATS); in fec_send()
184 info->txIdx = (info->txIdx + 1) % TX_BUF_CNT; in fec_send()
191 struct fec_info_s *info = dev->priv; in fec_recv() local
192 volatile fec_t *fecp = (fec_t *) (info->iobase); in fec_recv()
202 if (info->rxbd[info->rxIdx].cbd_sc & BD_ENET_RX_EMPTY) { in fec_recv()
207 length = info->rxbd[info->rxIdx].cbd_datlen; in fec_recv()
209 if (info->rxbd[info->rxIdx].cbd_sc & 0x003f) { in fec_recv()
212 info->rxbd[info->rxIdx].cbd_sc); in fec_recv()
216 info->rxbd[info->rxIdx].cbd_sc); in fec_recv()
222 net_process_received_packet(net_rx_packets[info->rxIdx], in fec_recv()
229 info->rxbd[info->rxIdx].cbd_datlen = 0; in fec_recv()
232 if (info->rxIdx == LAST_PKTBUFSRX) { in fec_recv()
233 info->rxbd[PKTBUFSRX - 1].cbd_sc = BD_ENET_RX_W_E; in fec_recv()
234 info->rxIdx = 0; in fec_recv()
236 info->rxbd[info->rxIdx].cbd_sc = BD_ENET_RX_EMPTY; in fec_recv()
237 info->rxIdx++; in fec_recv()
250 struct fec_info_s *info = dev->priv; in dbgFecRegs() local
251 volatile fec_t *fecp = (fec_t *) (info->iobase); in dbgFecRegs()
400 struct fec_info_s *info = dev->priv; in fec_init() local
401 volatile fec_t *fecp = (fec_t *) (info->iobase); in fec_init()
414 setFecDuplexSpeed(fecp, bd, info->dup_spd); in fec_init()
470 info->rxIdx = 0; in fec_init()
471 info->txIdx = 0; in fec_init()
479 info->rxbd[i].cbd_sc = BD_ENET_RX_EMPTY; in fec_init()
480 info->rxbd[i].cbd_datlen = 0; /* Reset */ in fec_init()
481 info->rxbd[i].cbd_bufaddr = (uint) net_rx_packets[i]; in fec_init()
483 info->rxbd[PKTBUFSRX - 1].cbd_sc |= BD_ENET_RX_WRAP; in fec_init()
491 info->txbd[i].cbd_sc = BD_ENET_TX_LAST | BD_ENET_TX_TC; in fec_init()
492 info->txbd[i].cbd_datlen = 0; /* Reset */ in fec_init()
493 info->txbd[i].cbd_bufaddr = (uint) (&info->txbuf[0]); in fec_init()
495 info->txbd[TX_BUF_CNT - 1].cbd_sc |= BD_ENET_TX_WRAP; in fec_init()
498 fecp->erdsr = (unsigned int)(&info->rxbd[0]); in fec_init()
499 fecp->etdsr = (unsigned int)(&info->txbd[0]); in fec_init()
512 struct fec_info_s *info = dev->priv; in fec_reset() local
513 volatile fec_t *fecp = (fec_t *) (info->iobase); in fec_reset()
527 struct fec_info_s *info = dev->priv; in fec_halt() local
533 info->rxIdx = info->txIdx = 0; in fec_halt()
534 memset(info->rxbd, 0, PKTBUFSRX * sizeof(cbd_t)); in fec_halt()
535 memset(info->txbd, 0, TX_BUF_CNT * sizeof(cbd_t)); in fec_halt()
536 memset(info->txbuf, 0, DBUF_LENGTH); in fec_halt()