Lines Matching refs:cle
123 static int xgene_cle_dram_wr(struct xgene_enet_cle *cle, u32 *data, u8 nregs, in xgene_cle_dram_wr() argument
127 enum xgene_cle_parser parser = cle->active_parser; in xgene_cle_dram_wr()
128 void __iomem *base = cle->base; in xgene_cle_dram_wr()
134 nparsers = (type >= PTREE_RAM) ? 1 : cle->parsers; in xgene_cle_dram_wr()
156 struct xgene_enet_cle *cle) in xgene_cle_enable_ptree() argument
158 struct xgene_cle_ptree *ptree = &cle->ptree; in xgene_cle_enable_ptree()
159 void __iomem *addr, *base = cle->base; in xgene_cle_enable_ptree()
164 ptree->start_pkt += cle->jump_bytes; in xgene_cle_enable_ptree()
165 for (i = 0; i < cle->parsers; i++) { in xgene_cle_enable_ptree()
166 if (cle->active_parser != PARSER_ALL) in xgene_cle_enable_ptree()
167 addr = base + cle->active_parser * offset; in xgene_cle_enable_ptree()
177 struct xgene_enet_cle *cle) in xgene_cle_setup_dbptr() argument
179 struct xgene_cle_ptree *ptree = &cle->ptree; in xgene_cle_setup_dbptr()
187 ret = xgene_cle_dram_wr(cle, buf, 6, i + ptree->start_dbptr, in xgene_cle_setup_dbptr()
564 struct xgene_enet_cle *cle) in xgene_cle_setup_node() argument
566 struct xgene_cle_ptree *ptree = &cle->ptree; in xgene_cle_setup_node()
575 xgene_cle_dn_to_hw(&dn[i], buf, cle->jump_bytes); in xgene_cle_setup_node()
576 ret = xgene_cle_dram_wr(cle, buf, 17, i + ptree->start_node, in xgene_cle_setup_node()
586 ret = xgene_cle_dram_wr(cle, buf, 17, j + ptree->start_node, in xgene_cle_setup_node()
596 struct xgene_enet_cle *cle) in xgene_cle_setup_ptree() argument
600 ret = xgene_cle_setup_node(pdata, cle); in xgene_cle_setup_ptree()
604 ret = xgene_cle_setup_dbptr(pdata, cle); in xgene_cle_setup_ptree()
608 xgene_cle_enable_ptree(pdata, cle); in xgene_cle_setup_ptree()
644 static int xgene_cle_set_rss_sband(struct xgene_enet_cle *cle) in xgene_cle_set_rss_sband() argument
663 ret = xgene_cle_dram_wr(cle, &sband, 1, idx, PKT_RAM, CLE_CMD_WR); in xgene_cle_set_rss_sband()
679 ret = xgene_cle_dram_wr(cle, &sband, 1, idx + 1, PKT_RAM, CLE_CMD_WR); in xgene_cle_set_rss_sband()
686 static int xgene_cle_set_rss_skeys(struct xgene_enet_cle *cle) in xgene_cle_set_rss_skeys() argument
692 ret = xgene_cle_dram_wr(cle, secret_key_ipv4, 4, 0, in xgene_cle_set_rss_skeys()
716 ret = xgene_cle_dram_wr(&pdata->cle, &idt_reg, 1, i, in xgene_cle_set_rss_idt()
722 ret = xgene_cle_set_rss_skeys(&pdata->cle); in xgene_cle_set_rss_idt()
731 struct xgene_enet_cle *cle = &pdata->cle; in xgene_cle_setup_rss() local
732 void __iomem *base = cle->base; in xgene_cle_setup_rss()
737 for (i = 0; i < cle->parsers; i++) { in xgene_cle_setup_rss()
738 if (cle->active_parser != PARSER_ALL) in xgene_cle_setup_rss()
739 offset = cle->active_parser * CLE_PORT_OFFSET; in xgene_cle_setup_rss()
749 ret = xgene_cle_set_rss_sband(cle); in xgene_cle_setup_rss()
763 struct xgene_enet_cle *enet_cle = &pdata->cle; in xgene_enet_cle_init()