Lines Matching refs:regs
297 struct dtsec_regs __iomem *regs; member
343 static void set_mac_address(struct dtsec_regs __iomem *regs, const u8 *adr) in set_mac_address() argument
349 iowrite32be(tmp, ®s->macstnaddr1); in set_mac_address()
352 iowrite32be(tmp, ®s->macstnaddr2); in set_mac_address()
355 static int init(struct dtsec_regs __iomem *regs, struct dtsec_cfg *cfg, in init() argument
364 iowrite32be(MACCFG1_SOFT_RESET, ®s->maccfg1); in init()
365 iowrite32be(0, ®s->maccfg1); in init()
371 iowrite32be(tmp, ®s->ptv); in init()
378 iowrite32be(tmp, ®s->rctrl); in init()
384 iowrite32be(tbi_addr, ®s->tbipa); in init()
386 iowrite32be(0, ®s->tmr_ctrl); in init()
391 iowrite32be(tmp, ®s->tmr_pevent); in init()
396 iowrite32be(tmp, ®s->tmr_pemask); in init()
403 iowrite32be(tmp, ®s->maccfg1); in init()
411 iowrite32be(tmp, ®s->maccfg2); in init()
422 iowrite32be(tmp, ®s->ipgifg); in init()
430 iowrite32be(tmp, ®s->hafdup); in init()
433 iowrite32be(cfg->maximum_frame, ®s->maxfrm); in init()
435 iowrite32be(0xffffffff, ®s->cam1); in init()
436 iowrite32be(0xffffffff, ®s->cam2); in init()
438 iowrite32be(exception_mask, ®s->imask); in init()
440 iowrite32be(0xffffffff, ®s->ievent); in init()
444 set_mac_address(regs, (const u8 *)eth_addr); in init()
450 iowrite32be(0, ®s->igaddr[i]); in init()
452 iowrite32be(0, ®s->gaddr[i]); in init()
458 static void set_bucket(struct dtsec_regs __iomem *regs, int bucket, in set_bucket() argument
467 reg = ®s->gaddr[reg_idx - 8]; in set_bucket()
469 reg = ®s->igaddr[reg_idx]; in set_bucket()
582 struct dtsec_regs __iomem *regs = dtsec->regs; in dtsec_get_max_frame_length() local
584 return (u16)ioread32be(®s->maxfrm); in dtsec_get_max_frame_length()
590 struct dtsec_regs __iomem *regs = dtsec->regs; in dtsec_isr() local
594 event = ioread32be(®s->ievent) & in dtsec_isr()
597 event &= ioread32be(®s->imask); in dtsec_isr()
599 iowrite32be(event, ®s->ievent); in dtsec_isr()
627 tpkt1 = ioread32be(®s->tpkt); in dtsec_isr()
630 tmp_reg1 = ioread32be(®s->reserved02c0[27]); in dtsec_isr()
651 tpkt2 = ioread32be(®s->tpkt); in dtsec_isr()
652 tmp_reg2 = ioread32be(®s->reserved02c0[27]); in dtsec_isr()
668 iowrite32be(ioread32be(®s->rctrl) | in dtsec_isr()
669 RCTRL_GRS, ®s->rctrl); in dtsec_isr()
675 if (ioread32be(®s->ievent) & in dtsec_isr()
680 if (ioread32be(®s->ievent) & in dtsec_isr()
683 ®s->ievent); in dtsec_isr()
721 struct dtsec_regs __iomem *regs = dtsec->regs; in dtsec_1588_isr() local
725 event = ioread32be(®s->tmr_pevent); in dtsec_1588_isr()
726 event &= ioread32be(®s->tmr_pemask); in dtsec_1588_isr()
729 iowrite32be(event, ®s->tmr_pevent); in dtsec_1588_isr()
792 struct dtsec_regs __iomem *regs = dtsec->regs; in graceful_start() local
794 iowrite32be(ioread32be(®s->tctrl) & ~TCTRL_GTS, ®s->tctrl); in graceful_start()
795 iowrite32be(ioread32be(®s->rctrl) & ~RCTRL_GRS, ®s->rctrl); in graceful_start()
800 struct dtsec_regs __iomem *regs = dtsec->regs; in graceful_stop() local
804 tmp = ioread32be(®s->rctrl) | RCTRL_GRS; in graceful_stop()
805 iowrite32be(tmp, ®s->rctrl); in graceful_stop()
820 tmp = ioread32be(®s->tctrl) | TCTRL_GTS; in graceful_stop()
821 iowrite32be(tmp, ®s->tctrl); in graceful_stop()
842 struct dtsec_regs __iomem *regs = dtsec->regs; in dtsec_set_tx_pause_frames() local
853 ptv = ioread32be(®s->ptv); in dtsec_set_tx_pause_frames()
856 iowrite32be(ptv, ®s->ptv); in dtsec_set_tx_pause_frames()
859 iowrite32be(ioread32be(®s->maccfg1) | MACCFG1_TX_FLOW, in dtsec_set_tx_pause_frames()
860 ®s->maccfg1); in dtsec_set_tx_pause_frames()
862 iowrite32be(ioread32be(®s->maccfg1) & ~MACCFG1_TX_FLOW, in dtsec_set_tx_pause_frames()
863 ®s->maccfg1); in dtsec_set_tx_pause_frames()
870 struct dtsec_regs __iomem *regs = dtsec->regs; in dtsec_accept_rx_pause_frames() local
873 tmp = ioread32be(®s->maccfg1); in dtsec_accept_rx_pause_frames()
878 iowrite32be(tmp, ®s->maccfg1); in dtsec_accept_rx_pause_frames()
902 struct dtsec_regs __iomem *regs = mac_dev->fman_mac->regs; in dtsec_mac_config() local
926 iowrite32be(tmp, ®s->ecntrl); in dtsec_mac_config()
935 struct dtsec_regs __iomem *regs = dtsec->regs; in dtsec_link_up() local
943 tmp = ioread32be(®s->ecntrl); in dtsec_link_up()
948 iowrite32be(tmp, ®s->ecntrl); in dtsec_link_up()
950 tmp = ioread32be(®s->maccfg2); in dtsec_link_up()
960 iowrite32be(tmp, ®s->maccfg2); in dtsec_link_up()
965 tmp = ioread32be(®s->maccfg1); in dtsec_link_up()
967 iowrite32be(tmp, ®s->maccfg1); in dtsec_link_up()
977 struct dtsec_regs __iomem *regs = dtsec->regs; in dtsec_link_down() local
983 tmp = ioread32be(®s->maccfg1); in dtsec_link_down()
985 iowrite32be(tmp, ®s->maccfg1); in dtsec_link_down()
1004 set_mac_address(dtsec->regs, (const u8 *)(*enet_addr)); in dtsec_modify_mac_address()
1014 struct dtsec_regs __iomem *regs = dtsec->regs; in dtsec_add_hash_mac_address() local
1023 ghtx = (bool)((ioread32be(®s->rctrl) & RCTRL_GHTX) ? true : false); in dtsec_add_hash_mac_address()
1055 set_bucket(dtsec->regs, bucket, true); in dtsec_add_hash_mac_address()
1078 struct dtsec_regs __iomem *regs = dtsec->regs; in dtsec_set_allmulti() local
1080 tmp = ioread32be(®s->rctrl); in dtsec_set_allmulti()
1086 iowrite32be(tmp, ®s->rctrl); in dtsec_set_allmulti()
1093 struct dtsec_regs __iomem *regs = dtsec->regs; in dtsec_set_tstamp() local
1096 rctrl = ioread32be(®s->rctrl); in dtsec_set_tstamp()
1097 tctrl = ioread32be(®s->tctrl); in dtsec_set_tstamp()
1107 iowrite32be(rctrl, ®s->rctrl); in dtsec_set_tstamp()
1108 iowrite32be(tctrl, ®s->tctrl); in dtsec_set_tstamp()
1116 struct dtsec_regs __iomem *regs = dtsec->regs; in dtsec_del_hash_mac_address() local
1126 ghtx = (bool)((ioread32be(®s->rctrl) & RCTRL_GHTX) ? true : false); in dtsec_del_hash_mac_address()
1160 set_bucket(dtsec->regs, bucket, false); in dtsec_del_hash_mac_address()
1173 set_bucket(dtsec->regs, bucket, false); in dtsec_del_hash_mac_address()
1184 struct dtsec_regs __iomem *regs = dtsec->regs; in dtsec_set_promiscuous() local
1188 tmp = ioread32be(®s->rctrl); in dtsec_set_promiscuous()
1194 iowrite32be(tmp, ®s->rctrl); in dtsec_set_promiscuous()
1197 tmp = ioread32be(®s->rctrl); in dtsec_set_promiscuous()
1203 iowrite32be(tmp, ®s->rctrl); in dtsec_set_promiscuous()
1211 struct dtsec_regs __iomem *regs = dtsec->regs; in dtsec_set_exception() local
1226 iowrite32be(ioread32be(®s->imask) | bit_mask, in dtsec_set_exception()
1227 ®s->imask); in dtsec_set_exception()
1229 iowrite32be(ioread32be(®s->imask) & ~bit_mask, in dtsec_set_exception()
1230 ®s->imask); in dtsec_set_exception()
1240 iowrite32be(ioread32be(®s->tmr_pemask) | in dtsec_set_exception()
1242 ®s->tmr_pemask); in dtsec_set_exception()
1245 iowrite32be(ioread32be(®s->tmr_pemask) & in dtsec_set_exception()
1247 ®s->tmr_pemask); in dtsec_set_exception()
1261 struct dtsec_regs __iomem *regs = dtsec->regs; in dtsec_init() local
1278 err = init(dtsec->regs, dtsec_drv_param, dtsec->phy_if, in dtsec_init()
1295 max_frm_ln = (u16)ioread32be(®s->maxfrm); in dtsec_init()
1365 dtsec->regs = mac_dev->vaddr; in dtsec_config()
1467 if (!(ioread32be(&dtsec->regs->tsec_id2) & DTSEC_ID2_INT_REDUCED_OFF)) { in dtsec_initialization()
1495 ioread32be(&dtsec->regs->tsec_id)); in dtsec_initialization()