Lines Matching full:fic

16 /* FIC Registers */
44 static void al_fic_set_trigger(struct al_fic *fic, in al_fic_set_trigger() argument
49 u32 control = readl_relaxed(fic->base + AL_FIC_CONTROL); in al_fic_set_trigger()
59 fic->state = new_state; in al_fic_set_trigger()
60 writel_relaxed(control, fic->base + AL_FIC_CONTROL); in al_fic_set_trigger()
66 struct al_fic *fic = gc->private; in al_fic_irq_set_type() local
74 pr_debug("fic doesn't support flow type %d\n", flow_type); in al_fic_irq_set_type()
83 * A given FIC instance can be either all level or all edge triggered. in al_fic_irq_set_type()
91 if (fic->state == AL_FIC_UNCONFIGURED) { in al_fic_irq_set_type()
92 al_fic_set_trigger(fic, gc, new_state); in al_fic_irq_set_type()
93 } else if (fic->state != new_state) { in al_fic_irq_set_type()
94 pr_debug("fic %s state already configured to %d\n", in al_fic_irq_set_type()
95 fic->name, fic->state); in al_fic_irq_set_type()
108 struct al_fic *fic = irq_desc_get_handler_data(desc); in al_fic_irq_handler() local
109 struct irq_domain *domain = fic->domain; in al_fic_irq_handler()
117 pending = readl_relaxed(fic->base + AL_FIC_CAUSE); in al_fic_irq_handler()
129 struct al_fic *fic = gc->private; in al_fic_irq_retrigger() local
131 writel_relaxed(BIT(data->hwirq), fic->base + AL_FIC_SET_CAUSE); in al_fic_irq_retrigger()
137 struct al_fic *fic) in al_fic_register() argument
142 fic->domain = irq_domain_add_linear(node, in al_fic_register()
145 fic); in al_fic_register()
146 if (!fic->domain) { in al_fic_register()
151 ret = irq_alloc_domain_generic_chips(fic->domain, in al_fic_register()
153 1, fic->name, in al_fic_register()
161 gc = irq_get_domain_generic_chip(fic->domain, 0); in al_fic_register()
162 gc->reg_base = fic->base; in al_fic_register()
171 gc->private = fic; in al_fic_register()
173 irq_set_chained_handler_and_data(fic->parent_irq, in al_fic_register()
175 fic); in al_fic_register()
179 irq_domain_remove(fic->domain); in al_fic_register()
185 * al_fic_wire_init() - initialize and configure fic in wire mode
187 * @base: mmio to fic register
188 * @name: name of the fic
191 * This API will configure the fic hardware to to work in wire mode.
192 * In wire mode, fic hardware is generating a wire ("wired") interrupt.
194 * to be determined based on connected hardware to this fic.
201 struct al_fic *fic; in al_fic_wire_init() local
205 fic = kzalloc(sizeof(*fic), GFP_KERNEL); in al_fic_wire_init()
206 if (!fic) in al_fic_wire_init()
209 fic->base = base; in al_fic_wire_init()
210 fic->parent_irq = parent_irq; in al_fic_wire_init()
211 fic->name = name; in al_fic_wire_init()
214 writel_relaxed(0xFFFFFFFF, fic->base + AL_FIC_MASK); in al_fic_wire_init()
217 writel_relaxed(0, fic->base + AL_FIC_CAUSE); in al_fic_wire_init()
219 writel_relaxed(control, fic->base + AL_FIC_CONTROL); in al_fic_wire_init()
221 ret = al_fic_register(node, fic); in al_fic_wire_init()
228 fic->name, parent_irq); in al_fic_wire_init()
230 return fic; in al_fic_wire_init()
233 kfree(fic); in al_fic_wire_init()
243 struct al_fic *fic; in al_fic_init_dt() local
264 fic = al_fic_wire_init(node, in al_fic_init_dt()
268 if (IS_ERR(fic)) { in al_fic_init_dt()
271 PTR_ERR(fic)); in al_fic_init_dt()
272 ret = PTR_ERR(fic); in al_fic_init_dt()
286 IRQCHIP_DECLARE(al_fic, "amazon,al-fic", al_fic_init_dt);