From 5db32addf766b3b58f4860860e27aef6edd23d95 Mon Sep 17 00:00:00 2001 From: Varun Sethi Date: Mon, 22 Jul 2013 19:33:54 +0530 Subject: Add operation mapping for PMAN. Setup and operation mapping index for PMAN. Signed-off-by: Varun Sethi Change-Id: I4384a247491293260c1da1d4cf6cfc3b2bec2034 Reviewed-on: http://git.am.freescale.net:8181/3441 Reviewed-by: Yoder Stuart-B08248 Reviewed-by: Fleming Andrew-AFLEMING Tested-by: Fleming Andrew-AFLEMING diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index ddd0836..e85c039 100644 --- a/drivers/iommu/fsl_pamu.c +++ b/drivers/iommu/fsl_pamu.c @@ -617,6 +617,7 @@ found_cpu_node: #define QMAN_PORTAL_PAACE 2 #define BMAN_PAACE 3 #define FMAN_PAACE 4 +#define PMAN_PAACE 5 /** * Setup operation mapping and stash destinations for QMAN and QMAN portal. @@ -652,6 +653,10 @@ static void setup_dpaa_paace(struct paace *ppaace, int paace_type) set_bf(ppaace->impl_attr, PAACE_IA_CID, get_stash_id(IOMMU_ATTR_CACHE_L3, 0)); break; + case PMAN_PAACE: + set_bf(ppaace->impl_attr, PAACE_IA_OTM, PAACE_OTM_INDEXED); + ppaace->op_encode.index_ot.omi = OMI_PMAN; + break; } } @@ -696,6 +701,13 @@ static void __init setup_omt(struct ome *omt) ome = &omt[OMI_CAAM]; ome->moe[IOE_READ_IDX] = EOE_VALID | EOE_READI; ome->moe[IOE_WRITE_IDX] = EOE_VALID | EOE_WRITE; + + /* Configure OMI_PMAN */ + ome = &omt[OMI_PMAN]; + ome->moe[IOE_DIRECT0_IDX] = EOE_LDEC | EOE_VALID; + ome->moe[IOE_DIRECT1_IDX] = EOE_LDEC | EOE_VALID; + + } /* @@ -815,6 +827,8 @@ static void __init setup_liodns(void) setup_dpaa_paace(ppaace, QMAN_PAACE); if (of_device_is_compatible(node, "fsl,bman")) setup_dpaa_paace(ppaace, BMAN_PAACE); + if (of_device_is_compatible(node, "fsl,pman")) + setup_dpaa_paace(ppaace, PMAN_PAACE); #ifdef CONFIG_FSL_FMAN_CPC_STASH if (of_device_is_compatible(node, "fsl,fman-port-10g-rx") || of_device_is_compatible(node, "fsl,fman-port-1g-rx")) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index afdf87b..42a2508 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -88,6 +88,8 @@ enum omap_index { OMI_FMAN, OMI_QMAN_PRIV, OMI_CAAM, + OMI_PMAN, + OMI_MAX, }; /* -- cgit v0.10.2