Lines Matching refs:bit
27 int bit; member
46 static int __maybe_unused apmu_power_on(void __iomem *p, int bit) in apmu_power_on() argument
49 writel_relaxed(BIT(bit), p + WUPCR_OFFS); in apmu_power_on()
58 static int __maybe_unused apmu_power_off(void __iomem *p, int bit) in apmu_power_off() argument
61 writel_relaxed(3, p + CPUNCR_OFFS(bit)); in apmu_power_off()
65 static int __maybe_unused apmu_power_off_poll(void __iomem *p, int bit) in apmu_power_off_poll() argument
70 if (CPUNST(readl_relaxed(p + PSTR_OFFS), bit) == CPUST_STANDBY) in apmu_power_off_poll()
83 return p ? fn(p, apmu_cpus[cpu].bit) : -EINVAL; in apmu_wrap()
185 static void apmu_init_cpu(struct resource *res, int cpu, int bit) in apmu_init_cpu() argument
193 apmu_cpus[cpu].bit = bit; in apmu_init_cpu()
195 pr_debug("apmu ioremap %d %d %pr\n", cpu, bit, res); in apmu_init_cpu()
199 x |= DBGCPUREN | DBGCPUNREN(bit) | DBGCPUPREN; in apmu_init_cpu()
208 static void apmu_parse_dt(void (*fn)(struct resource *res, int cpu, int bit)) in apmu_parse_dt() argument
212 int bit, index; in apmu_parse_dt() local
219 for (bit = 0; bit < CONFIG_NR_CPUS; bit++) { in apmu_parse_dt()
220 np_cpu = of_parse_phandle(np_apmu, "cpus", bit); in apmu_parse_dt()
236 for (bit = 0; bit < CONFIG_NR_CPUS; bit++) { in apmu_parse_dt()
237 np_cpu = of_parse_phandle(np_apmu, "cpus", bit); in apmu_parse_dt()
244 fn(&res, index, bit); in apmu_parse_dt()