aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
diff options
context:
space:
mode:
authorSunil Goutham <sgoutham@marvell.com>2018-10-22 23:25:52 +0530
committerDavid S. Miller <davem@davemloft.net>2018-10-22 20:15:37 -0700
commit23923ea4b144ed43ad8f6e5110b06221d0ff1656 (patch)
tree14afca2f0e15c67f5f7c0ef69047561eae98d7c3 /drivers/net/ethernet/marvell/octeontx2/af/rvu.c
parentocteontx2-af: Add NPC KPU profile (diff)
downloadlinux-dev-23923ea4b144ed43ad8f6e5110b06221d0ff1656.tar.xz
linux-dev-23923ea4b144ed43ad8f6e5110b06221d0ff1656.zip
octeontx2-af: Config NPC KPU engines with parser profile
This patch configures all 16 KPUs and iKPU (pkinds) with the KPU parser profile defined in npc_profile.h. Each KPU engine has a 128 entry CAM, only CAM entries which are listed in the profile are enabled and rest are left disabled. Also - Memory is allocated for pkind's bitmap and PFFUNC, interface channel mapping. - Added all CSR offsets of NPC HW block. Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/octeontx2/af/rvu.c')
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/rvu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
index 3bf007aa4725..dc28fa2b9481 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
@@ -180,6 +180,9 @@ int rvu_get_blkaddr(struct rvu *rvu, int blktype, u16 pcifunc)
bool is_pf;
switch (blktype) {
+ case BLKTYPE_NPC:
+ blkaddr = BLKADDR_NPC;
+ goto exit;
case BLKTYPE_NPA:
blkaddr = BLKADDR_NPA;
goto exit;
@@ -566,6 +569,7 @@ static void rvu_free_hw_resources(struct rvu *rvu)
u64 cfg;
rvu_npa_freemem(rvu);
+ rvu_npc_freemem(rvu);
rvu_nix_freemem(rvu);
/* Free block LF bitmaps */
@@ -771,6 +775,10 @@ init:
rvu_scan_block(rvu, block);
}
+ err = rvu_npc_init(rvu);
+ if (err)
+ return err;
+
err = rvu_npa_init(rvu);
if (err)
return err;