Lines Matching refs:domain
143 static int pmu_domain_power_off(struct generic_pm_domain *domain) in pmu_domain_power_off() argument
145 struct pmu_domain *pmu_dom = to_pmu_domain(domain); in pmu_domain_power_off()
177 static int pmu_domain_power_on(struct generic_pm_domain *domain) in pmu_domain_power_on() argument
179 struct pmu_domain *pmu_dom = to_pmu_domain(domain); in pmu_domain_power_on()
211 static void __pmu_domain_register(struct pmu_domain *domain, in __pmu_domain_register() argument
214 unsigned int val = readl_relaxed(domain->pmu->pmu_base + PMU_PWR); in __pmu_domain_register()
216 domain->base.power_off = pmu_domain_power_off; in __pmu_domain_register()
217 domain->base.power_on = pmu_domain_power_on; in __pmu_domain_register()
219 pm_genpd_init(&domain->base, NULL, !(val & domain->pwr_mask)); in __pmu_domain_register()
222 of_genpd_add_provider_simple(np, &domain->base); in __pmu_domain_register()
230 struct irq_domain *domain = pmu->irq_domain; in pmu_irq_handler() local
246 generic_handle_irq(irq_find_mapping(domain, hwirq)); in pmu_irq_handler()
270 struct irq_domain *domain; in dove_init_pmu_irq() local
277 domain = irq_domain_add_linear(pmu->of_node, NR_PMU_IRQS, in dove_init_pmu_irq()
279 if (!domain) { in dove_init_pmu_irq()
284 ret = irq_alloc_domain_generic_chips(domain, NR_PMU_IRQS, 1, name, in dove_init_pmu_irq()
290 irq_domain_remove(domain); in dove_init_pmu_irq()
294 gc = irq_get_domain_generic_chip(domain, 0); in dove_init_pmu_irq()
300 pmu->irq_domain = domain; in dove_init_pmu_irq()
326 struct pmu_domain *domain; in dove_init_pmu_legacy() local
328 domain = kzalloc(sizeof(*domain), GFP_KERNEL); in dove_init_pmu_legacy()
329 if (domain) { in dove_init_pmu_legacy()
330 domain->pmu = pmu; in dove_init_pmu_legacy()
331 domain->pwr_mask = domain_initdata->pwr_mask; in dove_init_pmu_legacy()
332 domain->rst_mask = domain_initdata->rst_mask; in dove_init_pmu_legacy()
333 domain->iso_mask = domain_initdata->iso_mask; in dove_init_pmu_legacy()
334 domain->base.name = domain_initdata->name; in dove_init_pmu_legacy()
336 __pmu_domain_register(domain, NULL); in dove_init_pmu_legacy()
410 struct pmu_domain *domain; in dove_init_pmu() local
412 domain = kzalloc(sizeof(*domain), GFP_KERNEL); in dove_init_pmu()
413 if (!domain) in dove_init_pmu()
416 domain->pmu = pmu; in dove_init_pmu()
417 domain->base.name = kasprintf(GFP_KERNEL, "%pOFn", np); in dove_init_pmu()
418 if (!domain->base.name) { in dove_init_pmu()
419 kfree(domain); in dove_init_pmu()
424 &domain->pwr_mask); in dove_init_pmu()
426 &domain->iso_mask); in dove_init_pmu()
437 domain->rst_mask = BIT(args.args[0]); in dove_init_pmu()
441 __pmu_domain_register(domain, np); in dove_init_pmu()