Lines Matching refs:mac

149 	struct mac_regs *mac = GET_REGS(dev);  in ep93xx_mac_reset()  local
154 value = readl(&mac->selfctl); in ep93xx_mac_reset()
156 writel(value, &mac->selfctl); in ep93xx_mac_reset()
158 while (readl(&mac->selfctl) & SELFCTL_RESET) in ep93xx_mac_reset()
168 struct mac_regs *mac = GET_REGS(dev); in ep93xx_eth_open() local
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()
197 writel(sizeof(struct tx_descriptor) * NUMTXDESC, &mac->txdq.blen); 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()
201 writel(sizeof(struct tx_status) * NUMTXDESC, &mac->txstsq.blen); in ep93xx_eth_open()
203 writel(0x00040000, &mac->txdthrshld); in ep93xx_eth_open()
204 writel(0x00040000, &mac->txststhrshld); in ep93xx_eth_open()
206 writel((TXSTARTMAX << 0) | (PKTSIZE_ALIGN << 16), &mac->maxfrmlen); in ep93xx_eth_open()
207 writel(BMCTL_TXEN, &mac->bmctl); 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()
216 writel(sizeof(struct rx_descriptor) * NUMRXDESC, &mac->rxdq.blen); 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()
220 writel(sizeof(struct rx_status) * NUMRXDESC, &mac->rxstsq.blen); in ep93xx_eth_open()
222 writel(0x00040000, &mac->rxdthrshld); in ep93xx_eth_open()
224 writel(BMCTL_RXEN, &mac->bmctl); in ep93xx_eth_open()
226 writel(0x00040000, &mac->rxststhrshld); in ep93xx_eth_open()
229 while (!(readl(&mac->bmsts) & BMSTS_RXACT)) in ep93xx_eth_open()
252 writel(NUMRXDESC, &mac->rxdqenq); in ep93xx_eth_open()
253 writel(NUMRXDESC, &mac->rxstsqenq); in ep93xx_eth_open()
256 writel(AFP_IAPRIMARY, &mac->afp); in ep93xx_eth_open()
259 &mac->indad); in ep93xx_eth_open()
260 writel(mac_addr[4] | (mac_addr[5] << 8), &mac->indad_upper); in ep93xx_eth_open()
264 RXCTL_RCRCA | RXCTL_MA, &mac->rxctl); in ep93xx_eth_open()
265 writel(TXCTL_STXON, &mac->txctl); in ep93xx_eth_open()
285 struct mac_regs *mac = GET_REGS(dev); in ep93xx_eth_close() local
289 writel(0x00000000, &mac->rxctl); in ep93xx_eth_close()
290 writel(0x00000000, &mac->txctl); in ep93xx_eth_close()
301 struct mac_regs *mac = GET_REGS(dev); in ep93xx_eth_rcv_packet() local
355 writel(1, &mac->rxdqenq); in ep93xx_eth_rcv_packet()
356 writel(1, &mac->rxstsqenq); in ep93xx_eth_rcv_packet()
371 struct mac_regs *mac = GET_REGS(dev); in ep93xx_eth_send_packet() local
396 writel(1, &mac->txdqenq); in ep93xx_eth_send_packet()
558 struct mac_regs *mac = (struct mac_regs *)MAC_BASE; in ep93xx_miiphy_read() local
574 self_ctl = readl(&mac->selfctl); in ep93xx_miiphy_read()
576 writel(self_ctl & ~(1 << 8), &mac->selfctl); in ep93xx_miiphy_read()
579 while (readl(&mac->miists) & MIISTS_BUSY) in ep93xx_miiphy_read()
587 &mac->miicmd); in ep93xx_miiphy_read()
588 while (readl(&mac->miists) & MIISTS_BUSY) in ep93xx_miiphy_read()
591 value = (unsigned short)readl(&mac->miidata); in ep93xx_miiphy_read()
594 writel(self_ctl, &mac->selfctl); in ep93xx_miiphy_read()
611 struct mac_regs *mac = (struct mac_regs *)MAC_BASE; in ep93xx_miiphy_write() local
627 self_ctl = readl(&mac->selfctl); in ep93xx_miiphy_write()
629 writel(self_ctl & ~(1 << 8), &mac->selfctl); in ep93xx_miiphy_write()
632 while (readl(&mac->miists) & MIISTS_BUSY) in ep93xx_miiphy_write()
636 writel((uint32_t)value, &mac->miidata); in ep93xx_miiphy_write()
638 &mac->miicmd); in ep93xx_miiphy_write()
639 while (readl(&mac->miists) & MIISTS_BUSY) in ep93xx_miiphy_write()
643 writel(self_ctl, &mac->selfctl); in ep93xx_miiphy_write()