Lines Matching refs:dist_base
12 void rkpm_gicv2_dist_save(void __iomem *dist_base, in rkpm_gicv2_dist_save() argument
18 gic_irqs = readl_relaxed(dist_base + GIC_DIST_CTR) & 0x1f; in rkpm_gicv2_dist_save()
25 readl_relaxed(dist_base + GIC_DIST_TARGET + i); in rkpm_gicv2_dist_save()
29 readl_relaxed(dist_base + GIC_DIST_PRI + i); in rkpm_gicv2_dist_save()
33 readl_relaxed(dist_base + GIC_DIST_CONFIG + in rkpm_gicv2_dist_save()
38 readl_relaxed(dist_base + GIC_DIST_IGROUP + in rkpm_gicv2_dist_save()
43 readl_relaxed(dist_base + GIC_DIST_ACTIVE_SET + in rkpm_gicv2_dist_save()
48 readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + in rkpm_gicv2_dist_save()
51 ctx->saved_gicd_ctrl = readl_relaxed(dist_base + GIC_DIST_CTRL); in rkpm_gicv2_dist_save()
54 void rkpm_gicv2_dist_restore(void __iomem *dist_base, in rkpm_gicv2_dist_restore() argument
60 gic_irqs = readl_relaxed(dist_base + GIC_DIST_CTR) & 0x1f; in rkpm_gicv2_dist_restore()
65 writel_relaxed(0, dist_base + GIC_DIST_CTRL); in rkpm_gicv2_dist_restore()
70 dist_base + GIC_DIST_TARGET + i); in rkpm_gicv2_dist_restore()
74 dist_base + GIC_DIST_PRI + i); in rkpm_gicv2_dist_restore()
78 dist_base + GIC_DIST_CONFIG + (i >> 4 << 2)); in rkpm_gicv2_dist_restore()
82 dist_base + GIC_DIST_IGROUP + (i >> 5 << 2)); in rkpm_gicv2_dist_restore()
85 writel_relaxed(~0U, dist_base + GIC_DIST_ACTIVE_CLEAR + (i >> 5 << 2)); in rkpm_gicv2_dist_restore()
88 dist_base + GIC_DIST_ACTIVE_SET + (i >> 5 << 2)); in rkpm_gicv2_dist_restore()
92 writel_relaxed(~0U, dist_base + GIC_DIST_ENABLE_CLEAR + (i >> 5 << 2)); in rkpm_gicv2_dist_restore()
95 dist_base + GIC_DIST_ENABLE_SET + (i >> 5 << 2)); in rkpm_gicv2_dist_restore()
100 writel_relaxed(ctx->saved_gicd_ctrl, dist_base + GIC_DIST_CTRL); in rkpm_gicv2_dist_restore()
104 void rkpm_gicv2_cpu_save(void __iomem *dist_base, in rkpm_gicv2_cpu_save() argument
111 readl_relaxed(dist_base + GIC_DIST_ENABLE_SET); in rkpm_gicv2_cpu_save()
114 readl_relaxed(dist_base + GIC_DIST_ACTIVE_SET); in rkpm_gicv2_cpu_save()
118 readl_relaxed(dist_base + GIC_DIST_CONFIG + i * 4); in rkpm_gicv2_cpu_save()
122 readl_relaxed(dist_base + GIC_DIST_PRI + i * 4); in rkpm_gicv2_cpu_save()
125 readl_relaxed(dist_base + GIC_DIST_IGROUP); in rkpm_gicv2_cpu_save()
133 void rkpm_gicv2_cpu_restore(void __iomem *dist_base, in rkpm_gicv2_cpu_restore() argument
142 writel_relaxed(~0U, dist_base + GIC_DIST_ENABLE_CLEAR); in rkpm_gicv2_cpu_restore()
144 writel_relaxed(ctx->saved_ppi_enable, dist_base + GIC_DIST_ENABLE_SET); in rkpm_gicv2_cpu_restore()
146 writel_relaxed(~0U, dist_base + GIC_DIST_ACTIVE_CLEAR); in rkpm_gicv2_cpu_restore()
148 writel_relaxed(ctx->saved_ppi_active, dist_base + GIC_DIST_ACTIVE_SET); in rkpm_gicv2_cpu_restore()
151 writel_relaxed(ctx->saved_ppi_conf[i], dist_base + GIC_DIST_CONFIG + i * 4); in rkpm_gicv2_cpu_restore()
154 writel_relaxed(ctx->saved_ppi_prio[i], dist_base + GIC_DIST_PRI + i * 4); in rkpm_gicv2_cpu_restore()
156 writel_relaxed(ctx->saved_ppi_grp, dist_base + GIC_DIST_IGROUP); in rkpm_gicv2_cpu_restore()