Lines Matching refs:fecp
83 static int whack_reset(struct fec __iomem *fecp) in whack_reset() argument
87 FW(fecp, ecntrl, FEC_ECNTRL_PINMUX | FEC_ECNTRL_RESET); in whack_reset()
89 if ((FR(fecp, ecntrl) & FEC_ECNTRL_RESET) == 0) in whack_reset()
105 fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0); in do_pd_setup()
171 struct fec __iomem *fecp = fep->fec.fecp; in set_promiscuous_mode() local
173 FS(fecp, r_cntrl, FEC_RCNTRL_PROM); in set_promiscuous_mode()
219 struct fec __iomem *fecp = fep->fec.fecp; in set_multicast_finish() local
228 FC(fecp, r_cntrl, FEC_RCNTRL_PROM); in set_multicast_finish()
229 FW(fecp, grp_hash_table_high, fep->fec.hthi); in set_multicast_finish()
230 FW(fecp, grp_hash_table_low, fep->fec.htlo); in set_multicast_finish()
249 struct fec __iomem *fecp = fep->fec.fecp; in restart() local
258 r = whack_reset(fep->fec.fecp); in restart()
270 FW(fecp, addr_low, addrhi); in restart()
271 FW(fecp, addr_high, addrlo); in restart()
276 FW(fecp, grp_hash_table_high, fep->fec.hthi); in restart()
277 FW(fecp, grp_hash_table_low, fep->fec.htlo); in restart()
282 FW(fecp, r_buff_size, PKT_MAXBLR_SIZE); in restart()
284 FW(fecp, r_cntrl, PKT_MAXBUF_SIZE << 16); in restart()
286 FW(fecp, r_hash, PKT_MAXBUF_SIZE); in restart()
296 FW(fecp, r_des_start, rx_bd_base_phys); in restart()
297 FW(fecp, x_des_start, tx_bd_base_phys); in restart()
305 FS(fecp, dma_control, 0xC0000000); in restart()
307 FW(fecp, fun_code, 0x78000000); in restart()
313 FW(fecp, mii_speed, fec_inf->mii_speed); in restart()
318 FW(fecp, ievent, 0xffc0); in restart()
320 FW(fecp, ivec, (virq_to_hw(fep->interrupt) / 2) << 29); in restart()
322 FW(fecp, r_cntrl, FEC_RCNTRL_MII_MODE); /* MII enable */ in restart()
328 FS(fecp, r_cntrl, fpi->use_rmii ? in restart()
335 FC(fecp, r_cntrl, FEC_RCNTRL_DRT); in restart()
336 FS(fecp, x_cntrl, FEC_TCNTRL_FDEN); /* FD enable */ in restart()
338 FS(fecp, r_cntrl, FEC_RCNTRL_DRT); in restart()
339 FC(fecp, x_cntrl, FEC_TCNTRL_FDEN); /* FD disable */ in restart()
345 FW(fecp, imask, FEC_ENET_TXF | FEC_ENET_TXB | in restart()
351 FW(fecp, ecntrl, FEC_ECNTRL_PINMUX | FEC_ECNTRL_ETHER_EN); in restart()
352 FW(fecp, r_des_active, 0x01000000); in restart()
359 struct fec __iomem *fecp = fep->fec.fecp; in stop() local
365 if ((FR(fecp, ecntrl) & FEC_ECNTRL_ETHER_EN) == 0) in stop()
368 FW(fecp, x_cntrl, 0x01); /* Graceful transmit stop */ in stop()
369 for (i = 0; ((FR(fecp, ievent) & 0x10000000) == 0) && in stop()
378 FW(fecp, imask, 0); in stop()
379 FC(fecp, ecntrl, FEC_ECNTRL_ETHER_EN); in stop()
385 FS(fecp, r_cntrl, fpi->use_rmii ? in stop()
388 FS(fecp, ecntrl, FEC_ECNTRL_PINMUX | FEC_ECNTRL_ETHER_EN); in stop()
389 FW(fecp, ievent, FEC_ENET_MII); in stop()
390 FW(fecp, mii_speed, feci->mii_speed); in stop()
397 struct fec __iomem *fecp = fep->fec.fecp; in napi_clear_rx_event() local
399 FW(fecp, ievent, FEC_NAPI_RX_EVENT_MSK); in napi_clear_rx_event()
405 struct fec __iomem *fecp = fep->fec.fecp; in napi_enable_rx() local
407 FS(fecp, imask, FEC_NAPI_RX_EVENT_MSK); in napi_enable_rx()
413 struct fec __iomem *fecp = fep->fec.fecp; in napi_disable_rx() local
415 FC(fecp, imask, FEC_NAPI_RX_EVENT_MSK); in napi_disable_rx()
421 struct fec __iomem *fecp = fep->fec.fecp; in rx_bd_done() local
423 FW(fecp, r_des_active, 0x01000000); in rx_bd_done()
429 struct fec __iomem *fecp = fep->fec.fecp; in tx_kickstart() local
431 FW(fecp, x_des_active, 0x01000000); in tx_kickstart()
437 struct fec __iomem *fecp = fep->fec.fecp; in get_int_events() local
439 return FR(fecp, ievent) & FR(fecp, imask); in get_int_events()
445 struct fec __iomem *fecp = fep->fec.fecp; in clear_int_events() local
447 FW(fecp, ievent, int_events); in clear_int_events()
464 memcpy_fromio(p, fep->fec.fecp, sizeof(struct fec)); in get_regs()