Lines Matching refs:cle

135 static int xgene_cle_dram_wr(struct xgene_enet_cle *cle, u32 *data, u8 nregs,  in xgene_cle_dram_wr()  argument
139 enum xgene_cle_parser parser = cle->active_parser; in xgene_cle_dram_wr()
140 void __iomem *base = cle->base; in xgene_cle_dram_wr()
146 nparsers = (type >= PTREE_RAM) ? 1 : cle->parsers; in xgene_cle_dram_wr()
168 struct xgene_enet_cle *cle) in xgene_cle_enable_ptree() argument
170 struct xgene_cle_ptree *ptree = &cle->ptree; in xgene_cle_enable_ptree()
171 void __iomem *addr, *base = cle->base; in xgene_cle_enable_ptree()
176 ptree->start_pkt += cle->jump_bytes; in xgene_cle_enable_ptree()
177 for (i = 0; i < cle->parsers; i++) { in xgene_cle_enable_ptree()
178 if (cle->active_parser != PARSER_ALL) in xgene_cle_enable_ptree()
179 addr = base + cle->active_parser * offset; in xgene_cle_enable_ptree()
189 struct xgene_enet_cle *cle) in xgene_cle_setup_dbptr() argument
191 struct xgene_cle_ptree *ptree = &cle->ptree; in xgene_cle_setup_dbptr()
199 ret = xgene_cle_dram_wr(cle, buf, 6, i + ptree->start_dbptr, in xgene_cle_setup_dbptr()
576 struct xgene_enet_cle *cle) in xgene_cle_setup_node() argument
578 struct xgene_cle_ptree *ptree = &cle->ptree; in xgene_cle_setup_node()
587 xgene_cle_dn_to_hw(&dn[i], buf, cle->jump_bytes); in xgene_cle_setup_node()
588 ret = xgene_cle_dram_wr(cle, buf, 17, i + ptree->start_node, in xgene_cle_setup_node()
598 ret = xgene_cle_dram_wr(cle, buf, 17, j + ptree->start_node, in xgene_cle_setup_node()
608 struct xgene_enet_cle *cle) in xgene_cle_setup_ptree() argument
612 ret = xgene_cle_setup_node(pdata, cle); in xgene_cle_setup_ptree()
616 ret = xgene_cle_setup_dbptr(pdata, cle); in xgene_cle_setup_ptree()
620 xgene_cle_enable_ptree(pdata, cle); in xgene_cle_setup_ptree()
656 static int xgene_cle_set_rss_sband(struct xgene_enet_cle *cle) in xgene_cle_set_rss_sband() argument
675 ret = xgene_cle_dram_wr(cle, &sband, 1, idx, PKT_RAM, CLE_CMD_WR); in xgene_cle_set_rss_sband()
691 ret = xgene_cle_dram_wr(cle, &sband, 1, idx + 1, PKT_RAM, CLE_CMD_WR); in xgene_cle_set_rss_sband()
698 static int xgene_cle_set_rss_skeys(struct xgene_enet_cle *cle) in xgene_cle_set_rss_skeys() argument
704 ret = xgene_cle_dram_wr(cle, secret_key_ipv4, 4, 0, in xgene_cle_set_rss_skeys()
728 ret = xgene_cle_dram_wr(&pdata->cle, &idt_reg, 1, i, in xgene_cle_set_rss_idt()
734 ret = xgene_cle_set_rss_skeys(&pdata->cle); in xgene_cle_set_rss_idt()
743 struct xgene_enet_cle *cle = &pdata->cle; in xgene_cle_setup_rss() local
744 void __iomem *base = cle->base; in xgene_cle_setup_rss()
749 for (i = 0; i < cle->parsers; i++) { in xgene_cle_setup_rss()
750 if (cle->active_parser != PARSER_ALL) in xgene_cle_setup_rss()
751 offset = cle->active_parser * CLE_PORT_OFFSET; in xgene_cle_setup_rss()
761 ret = xgene_cle_set_rss_sband(cle); in xgene_cle_setup_rss()
775 struct xgene_enet_cle *enet_cle = &pdata->cle; in xgene_enet_cle_init()