Lines Matching refs:ctx

80 	int ctx;
94 for (ctx = 0; ctx < ncb; ctx++) {
95 SET_BPRCOSH(base, ctx, 0);
96 SET_BPRCISH(base, ctx, 0);
97 SET_BPRCNSH(base, ctx, 0);
98 SET_BPSHCFG(base, ctx, 0);
99 SET_BPMTCFG(base, ctx, 0);
100 SET_ACTLR(base, ctx, 0);
101 SET_SCTLR(base, ctx, 0);
102 SET_FSRRESTORE(base, ctx, 0);
103 SET_TTBR0(base, ctx, 0);
104 SET_TTBR1(base, ctx, 0);
105 SET_TTBCR(base, ctx, 0);
106 SET_BFBCR(base, ctx, 0);
107 SET_PAR(base, ctx, 0);
108 SET_FAR(base, ctx, 0);
109 SET_CTX_TLBIALL(base, ctx, 0);
110 SET_TLBFLPTER(base, ctx, 0);
111 SET_TLBSLPTER(base, ctx, 0);
112 SET_TLBLKCR(base, ctx, 0);
113 SET_CONTEXTIDR(base, ctx, 0);
209 int mid, ctx, i;
213 ctx = master->num;
216 SET_CBACR_N(iommu->base, ctx, 0);
222 SET_CBNDX(iommu->base, mid, ctx);
225 SET_CBVMID(iommu->base, ctx, 0);
228 SET_CONTEXTIDR_ASID(iommu->base, ctx, ctx);
235 static void __reset_context(void __iomem *base, int ctx)
237 SET_BPRCOSH(base, ctx, 0);
238 SET_BPRCISH(base, ctx, 0);
239 SET_BPRCNSH(base, ctx, 0);
240 SET_BPSHCFG(base, ctx, 0);
241 SET_BPMTCFG(base, ctx, 0);
242 SET_ACTLR(base, ctx, 0);
243 SET_SCTLR(base, ctx, 0);
244 SET_FSRRESTORE(base, ctx, 0);
245 SET_TTBR0(base, ctx, 0);
246 SET_TTBR1(base, ctx, 0);
247 SET_TTBCR(base, ctx, 0);
248 SET_BFBCR(base, ctx, 0);
249 SET_PAR(base, ctx, 0);
250 SET_FAR(base, ctx, 0);
251 SET_CTX_TLBIALL(base, ctx, 0);
252 SET_TLBFLPTER(base, ctx, 0);
253 SET_TLBSLPTER(base, ctx, 0);
254 SET_TLBLKCR(base, ctx, 0);
257 static void __program_context(void __iomem *base, int ctx,
260 __reset_context(base, ctx);
263 SET_TRE(base, ctx, 1);
264 SET_AFE(base, ctx, 1);
268 SET_TLBMCFG(base, ctx, 0x3);
271 SET_V2PCFG(base, ctx, 0x3);
273 SET_TTBCR(base, ctx, priv->cfg.arm_v7s_cfg.tcr);
274 SET_TTBR0(base, ctx, priv->cfg.arm_v7s_cfg.ttbr);
275 SET_TTBR1(base, ctx, 0);
278 SET_PRRR(base, ctx, priv->cfg.arm_v7s_cfg.prrr);
279 SET_NMRR(base, ctx, priv->cfg.arm_v7s_cfg.nmrr);
282 SET_CTX_TLBIALL(base, ctx, 0);
285 SET_IRPTNDX(base, ctx, 0);
288 SET_CFEIE(base, ctx, 1);
291 SET_CFCFG(base, ctx, 1);
294 SET_RCISH(base, ctx, 1);
295 SET_RCOSH(base, ctx, 1);
296 SET_RCNSH(base, ctx, 1);
299 SET_BFBDFE(base, ctx, 1);
302 SET_M(base, ctx, 1);
561 static void print_ctx_regs(void __iomem *base, int ctx)
563 unsigned int fsr = GET_FSR(base, ctx);
565 GET_FAR(base, ctx), GET_PAR(base, ctx));
579 GET_FSYNR0(base, ctx), GET_FSYNR1(base, ctx));
581 GET_TTBR0(base, ctx), GET_TTBR1(base, ctx));
583 GET_SCTLR(base, ctx), GET_ACTLR(base, ctx));
799 pr_info("device mapped at %p, irq %d with %d ctx banks\n",