Lines Matching defs:fecp
83 static int whack_reset(struct fec __iomem *fecp)
87 FW(fecp, ecntrl, FEC_ECNTRL_PINMUX | FEC_ECNTRL_RESET);
89 if ((FR(fecp, ecntrl) & FEC_ECNTRL_RESET) == 0)
105 fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0);
171 struct fec __iomem *fecp = fep->fec.fecp;
173 FS(fecp, r_cntrl, FEC_RCNTRL_PROM);
219 struct fec __iomem *fecp = fep->fec.fecp;
228 FC(fecp, r_cntrl, FEC_RCNTRL_PROM);
229 FW(fecp, hash_table_high, fep->fec.hthi);
230 FW(fecp, hash_table_low, fep->fec.htlo);
249 struct fec __iomem *fecp = fep->fec.fecp;
258 r = whack_reset(fep->fec.fecp);
270 FW(fecp, addr_low, addrhi);
271 FW(fecp, addr_high, addrlo);
276 FW(fecp, hash_table_high, fep->fec.hthi);
277 FW(fecp, hash_table_low, fep->fec.htlo);
282 FW(fecp, r_buff_size, PKT_MAXBLR_SIZE);
284 FW(fecp, r_cntrl, PKT_MAXBUF_SIZE << 16);
286 FW(fecp, r_hash, PKT_MAXBUF_SIZE);
296 FW(fecp, r_des_start, rx_bd_base_phys);
297 FW(fecp, x_des_start, tx_bd_base_phys);
305 FS(fecp, dma_control, 0xC0000000);
307 FW(fecp, fun_code, 0x78000000);
313 FW(fecp, mii_speed, fec_inf->mii_speed);
318 FW(fecp, ievent, 0xffc0);
320 FW(fecp, ivec, (virq_to_hw(fep->interrupt) / 2) << 29);
322 FW(fecp, r_cntrl, FEC_RCNTRL_MII_MODE); /* MII enable */
328 FS(fecp, r_cntrl, FEC_RCNTRL_MII_MODE);
334 FC(fecp, r_cntrl, FEC_RCNTRL_DRT);
335 FS(fecp, x_cntrl, FEC_TCNTRL_FDEN); /* FD enable */
337 FS(fecp, r_cntrl, FEC_RCNTRL_DRT);
338 FC(fecp, x_cntrl, FEC_TCNTRL_FDEN); /* FD disable */
344 FW(fecp, imask, FEC_ENET_TXF | FEC_ENET_TXB |
350 FW(fecp, ecntrl, FEC_ECNTRL_PINMUX | FEC_ECNTRL_ETHER_EN);
351 FW(fecp, r_des_active, 0x01000000);
358 struct fec __iomem *fecp = fep->fec.fecp;
364 if ((FR(fecp, ecntrl) & FEC_ECNTRL_ETHER_EN) == 0)
367 FW(fecp, x_cntrl, 0x01); /* Graceful transmit stop */
368 for (i = 0; ((FR(fecp, ievent) & 0x10000000) == 0) &&
377 FW(fecp, imask, 0);
378 FC(fecp, ecntrl, FEC_ECNTRL_ETHER_EN);
384 FS(fecp, r_cntrl, FEC_RCNTRL_MII_MODE); /* MII enable */
385 FS(fecp, ecntrl, FEC_ECNTRL_PINMUX | FEC_ECNTRL_ETHER_EN);
386 FW(fecp, ievent, FEC_ENET_MII);
387 FW(fecp, mii_speed, feci->mii_speed);
394 struct fec __iomem *fecp = fep->fec.fecp;
396 FW(fecp, ievent, FEC_NAPI_RX_EVENT_MSK);
402 struct fec __iomem *fecp = fep->fec.fecp;
404 FS(fecp, imask, FEC_NAPI_RX_EVENT_MSK);
410 struct fec __iomem *fecp = fep->fec.fecp;
412 FC(fecp, imask, FEC_NAPI_RX_EVENT_MSK);
418 struct fec __iomem *fecp = fep->fec.fecp;
420 FW(fecp, r_des_active, 0x01000000);
426 struct fec __iomem *fecp = fep->fec.fecp;
428 FW(fecp, x_des_active, 0x01000000);
434 struct fec __iomem *fecp = fep->fec.fecp;
436 return FR(fecp, ievent) & FR(fecp, imask);
442 struct fec __iomem *fecp = fep->fec.fecp;
444 FW(fecp, ievent, int_events);
461 memcpy_fromio(p, fep->fec.fecp, sizeof(struct fec));