• Home
  • Raw
  • Download

Lines Matching refs:priv

28 #define GET_PRIV(eth_dev)	((struct ep93xx_priv *)(eth_dev)->priv)
43 struct ep93xx_priv *priv = GET_PRIV(dev); in dump_dev() local
47 printf(" rx_dq.base %p\n", priv->rx_dq.base); in dump_dev()
48 printf(" rx_dq.current %p\n", priv->rx_dq.current); in dump_dev()
49 printf(" rx_dq.end %p\n", priv->rx_dq.end); in dump_dev()
50 printf(" rx_sq.base %p\n", priv->rx_sq.base); in dump_dev()
51 printf(" rx_sq.current %p\n", priv->rx_sq.current); in dump_dev()
52 printf(" rx_sq.end %p\n", priv->rx_sq.end); in dump_dev()
57 printf(" tx_dq.base %p\n", priv->tx_dq.base); in dump_dev()
58 printf(" tx_dq.current %p\n", priv->tx_dq.current); in dump_dev()
59 printf(" tx_dq.end %p\n", priv->tx_dq.end); in dump_dev()
60 printf(" tx_sq.base %p\n", priv->tx_sq.base); in dump_dev()
61 printf(" tx_sq.current %p\n", priv->tx_sq.current); in dump_dev()
62 printf(" tx_sq.end %p\n", priv->tx_sq.end); in dump_dev()
70 struct ep93xx_priv *priv = GET_PRIV(dev); in dump_rx_status_queue() local
77 priv->rx_sq.base + i, in dump_rx_status_queue()
78 (priv->rx_sq.base + i)->word1, in dump_rx_status_queue()
79 (priv->rx_sq.base + i)->word2); in dump_rx_status_queue()
88 struct ep93xx_priv *priv = GET_PRIV(dev); in dump_rx_descriptor_queue() local
95 priv->rx_dq.base + i, in dump_rx_descriptor_queue()
96 (priv->rx_dq.base + i)->word1, in dump_rx_descriptor_queue()
97 (priv->rx_dq.base + i)->word2); in dump_rx_descriptor_queue()
106 struct ep93xx_priv *priv = GET_PRIV(dev); in dump_tx_descriptor_queue() local
113 priv->tx_dq.base + i, in dump_tx_descriptor_queue()
114 (priv->tx_dq.base + i)->word1, in dump_tx_descriptor_queue()
115 (priv->tx_dq.base + i)->word2); in dump_tx_descriptor_queue()
124 struct ep93xx_priv *priv = GET_PRIV(dev); in dump_tx_status_queue() local
131 priv->rx_sq.base + i, in dump_tx_status_queue()
132 (priv->rx_sq.base + i)->word1); in dump_tx_status_queue()
167 struct ep93xx_priv *priv = GET_PRIV(dev); in ep93xx_eth_open() local
178 priv->tx_dq.current = priv->tx_dq.base; in ep93xx_eth_open()
179 priv->tx_dq.end = (priv->tx_dq.base + NUMTXDESC); in ep93xx_eth_open()
181 priv->tx_sq.current = priv->tx_sq.base; in ep93xx_eth_open()
182 priv->tx_sq.end = (priv->tx_sq.base + NUMTXDESC); in ep93xx_eth_open()
184 priv->rx_dq.current = priv->rx_dq.base; in ep93xx_eth_open()
185 priv->rx_dq.end = (priv->rx_dq.base + NUMRXDESC); in ep93xx_eth_open()
187 priv->rx_sq.current = priv->rx_sq.base; in ep93xx_eth_open()
188 priv->rx_sq.end = (priv->rx_sq.base + NUMRXDESC); in ep93xx_eth_open()
195 writel((uint32_t)priv->tx_dq.base, &mac->txdq.badd); in ep93xx_eth_open()
196 writel((uint32_t)priv->tx_dq.base, &mac->txdq.curadd); in ep93xx_eth_open()
199 writel((uint32_t)priv->tx_sq.base, &mac->txstsq.badd); in ep93xx_eth_open()
200 writel((uint32_t)priv->tx_sq.base, &mac->txstsq.curadd); in ep93xx_eth_open()
214 writel((uint32_t)priv->rx_dq.base, &mac->rxdq.badd); in ep93xx_eth_open()
215 writel((uint32_t)priv->rx_dq.base, &mac->rxdq.curadd); in ep93xx_eth_open()
218 writel((uint32_t)priv->rx_sq.base, &mac->rxstsq.badd); in ep93xx_eth_open()
219 writel((uint32_t)priv->rx_sq.base, &mac->rxstsq.curadd); in ep93xx_eth_open()
239 (priv->rx_dq.base + i)->word1 = (uint32_t)net_rx_packets[i]; in ep93xx_eth_open()
242 (priv->rx_dq.base + i)->word2 = PKTSIZE_ALIGN; in ep93xx_eth_open()
245 memset(priv->tx_dq.base, 0, in ep93xx_eth_open()
247 memset(priv->rx_sq.base, 0, in ep93xx_eth_open()
249 memset(priv->tx_sq.base, 0, in ep93xx_eth_open()
302 struct ep93xx_priv *priv = GET_PRIV(dev); in ep93xx_eth_rcv_packet() local
307 if (RX_STATUS_RFP(priv->rx_sq.current)) { in ep93xx_eth_rcv_packet()
308 if (RX_STATUS_RWE(priv->rx_sq.current)) { in ep93xx_eth_rcv_packet()
318 len = RX_STATUS_FRAME_LEN(priv->rx_sq.current); in ep93xx_eth_rcv_packet()
321 (uchar *)priv->rx_dq.current->word1, len); in ep93xx_eth_rcv_packet()
327 priv->rx_sq.current->word1, in ep93xx_eth_rcv_packet()
328 priv->rx_sq.current->word2); in ep93xx_eth_rcv_packet()
339 memset((void *)priv->rx_sq.current, 0, in ep93xx_eth_rcv_packet()
342 priv->rx_sq.current++; in ep93xx_eth_rcv_packet()
343 if (priv->rx_sq.current >= priv->rx_sq.end) in ep93xx_eth_rcv_packet()
344 priv->rx_sq.current = priv->rx_sq.base; in ep93xx_eth_rcv_packet()
346 priv->rx_dq.current++; in ep93xx_eth_rcv_packet()
347 if (priv->rx_dq.current >= priv->rx_dq.end) in ep93xx_eth_rcv_packet()
348 priv->rx_dq.current = priv->rx_dq.base; in ep93xx_eth_rcv_packet()
372 struct ep93xx_priv *priv = GET_PRIV(dev); in ep93xx_eth_send_packet() local
387 priv->tx_dq.current->word1 = (uint32_t)packet; in ep93xx_eth_send_packet()
390 priv->tx_dq.current->word2 = length | TX_DESC_EOF; in ep93xx_eth_send_packet()
393 priv->tx_sq.current->word1 = 0; in ep93xx_eth_send_packet()
399 while (!TX_STATUS_TXFP(priv->tx_sq.current)) in ep93xx_eth_send_packet()
402 if (!TX_STATUS_TXWE(priv->tx_sq.current)) { in ep93xx_eth_send_packet()
404 priv->tx_sq.current->word1); in ep93xx_eth_send_packet()
448 struct ep93xx_priv *priv; in ep93xx_eth_initialize() local
452 priv = malloc(sizeof(*priv)); in ep93xx_eth_initialize()
453 if (!priv) { in ep93xx_eth_initialize()
457 memset(priv, 0, sizeof(*priv)); in ep93xx_eth_initialize()
459 priv->regs = (struct mac_regs *)base_addr; in ep93xx_eth_initialize()
461 priv->tx_dq.base = calloc(NUMTXDESC, in ep93xx_eth_initialize()
463 if (priv->tx_dq.base == NULL) { in ep93xx_eth_initialize()
468 priv->tx_sq.base = calloc(NUMTXDESC, in ep93xx_eth_initialize()
470 if (priv->tx_sq.base == NULL) { in ep93xx_eth_initialize()
475 priv->rx_dq.base = calloc(NUMRXDESC, in ep93xx_eth_initialize()
477 if (priv->rx_dq.base == NULL) { in ep93xx_eth_initialize()
482 priv->rx_sq.base = calloc(NUMRXDESC, in ep93xx_eth_initialize()
484 if (priv->rx_sq.base == NULL) { in ep93xx_eth_initialize()
497 dev->priv = priv; in ep93xx_eth_initialize()
512 free(priv->rx_sq.base); in ep93xx_eth_initialize()
516 free(priv->rx_dq.base); in ep93xx_eth_initialize()
520 free(priv->tx_sq.base); in ep93xx_eth_initialize()
524 free(priv->tx_dq.base); in ep93xx_eth_initialize()
528 free(priv); in ep93xx_eth_initialize()