Lines Matching refs:ctx

81 	int ctx;
95 for (ctx = 0; ctx < ncb; ctx++) {
96 SET_BPRCOSH(base, ctx, 0);
97 SET_BPRCISH(base, ctx, 0);
98 SET_BPRCNSH(base, ctx, 0);
99 SET_BPSHCFG(base, ctx, 0);
100 SET_BPMTCFG(base, ctx, 0);
101 SET_ACTLR(base, ctx, 0);
102 SET_SCTLR(base, ctx, 0);
103 SET_FSRRESTORE(base, ctx, 0);
104 SET_TTBR0(base, ctx, 0);
105 SET_TTBR1(base, ctx, 0);
106 SET_TTBCR(base, ctx, 0);
107 SET_BFBCR(base, ctx, 0);
108 SET_PAR(base, ctx, 0);
109 SET_FAR(base, ctx, 0);
110 SET_CTX_TLBIALL(base, ctx, 0);
111 SET_TLBFLPTER(base, ctx, 0);
112 SET_TLBSLPTER(base, ctx, 0);
113 SET_TLBLKCR(base, ctx, 0);
114 SET_CONTEXTIDR(base, ctx, 0);
217 int mid, ctx, i;
221 ctx = master->num;
224 SET_CBACR_N(iommu->base, ctx, 0);
230 SET_CBNDX(iommu->base, mid, ctx);
233 SET_CBVMID(iommu->base, ctx, 0);
236 SET_CONTEXTIDR_ASID(iommu->base, ctx, ctx);
243 static void __reset_context(void __iomem *base, int ctx)
245 SET_BPRCOSH(base, ctx, 0);
246 SET_BPRCISH(base, ctx, 0);
247 SET_BPRCNSH(base, ctx, 0);
248 SET_BPSHCFG(base, ctx, 0);
249 SET_BPMTCFG(base, ctx, 0);
250 SET_ACTLR(base, ctx, 0);
251 SET_SCTLR(base, ctx, 0);
252 SET_FSRRESTORE(base, ctx, 0);
253 SET_TTBR0(base, ctx, 0);
254 SET_TTBR1(base, ctx, 0);
255 SET_TTBCR(base, ctx, 0);
256 SET_BFBCR(base, ctx, 0);
257 SET_PAR(base, ctx, 0);
258 SET_FAR(base, ctx, 0);
259 SET_CTX_TLBIALL(base, ctx, 0);
260 SET_TLBFLPTER(base, ctx, 0);
261 SET_TLBSLPTER(base, ctx, 0);
262 SET_TLBLKCR(base, ctx, 0);
265 static void __program_context(void __iomem *base, int ctx,
268 __reset_context(base, ctx);
271 SET_TRE(base, ctx, 1);
272 SET_AFE(base, ctx, 1);
276 SET_TLBMCFG(base, ctx, 0x3);
279 SET_V2PCFG(base, ctx, 0x3);
281 SET_TTBCR(base, ctx, priv->cfg.arm_v7s_cfg.tcr);
282 SET_TTBR0(base, ctx, priv->cfg.arm_v7s_cfg.ttbr);
283 SET_TTBR1(base, ctx, 0);
286 SET_PRRR(base, ctx, priv->cfg.arm_v7s_cfg.prrr);
287 SET_NMRR(base, ctx, priv->cfg.arm_v7s_cfg.nmrr);
290 SET_CTX_TLBIALL(base, ctx, 0);
293 SET_IRPTNDX(base, ctx, 0);
296 SET_CFEIE(base, ctx, 1);
299 SET_CFCFG(base, ctx, 1);
302 SET_RCISH(base, ctx, 1);
303 SET_RCOSH(base, ctx, 1);
304 SET_RCNSH(base, ctx, 1);
307 SET_BFBDFE(base, ctx, 1);
310 SET_M(base, ctx, 1);
567 static void print_ctx_regs(void __iomem *base, int ctx)
569 unsigned int fsr = GET_FSR(base, ctx);
571 GET_FAR(base, ctx), GET_PAR(base, ctx));
585 GET_FSYNR0(base, ctx), GET_FSYNR1(base, ctx));
587 GET_TTBR0(base, ctx), GET_TTBR1(base, ctx));
589 GET_SCTLR(base, ctx), GET_ACTLR(base, ctx));
808 pr_info("device mapped at %p, irq %d with %d ctx banks\n",