Lines Matching refs:fic
44 static void al_fic_set_trigger(struct al_fic *fic,
49 u32 control = readl_relaxed(fic->base + AL_FIC_CONTROL);
59 fic->state = new_state;
60 writel_relaxed(control, fic->base + AL_FIC_CONTROL);
66 struct al_fic *fic = gc->private;
74 pr_debug("fic doesn't support flow type %d\n", flow_type);
91 if (fic->state == AL_FIC_UNCONFIGURED) {
92 al_fic_set_trigger(fic, gc, new_state);
93 } else if (fic->state != new_state) {
94 pr_debug("fic %s state already configured to %d\n",
95 fic->name, fic->state);
108 struct al_fic *fic = irq_desc_get_handler_data(desc);
109 struct irq_domain *domain = fic->domain;
117 pending = readl_relaxed(fic->base + AL_FIC_CAUSE);
129 struct al_fic *fic = gc->private;
131 writel_relaxed(BIT(data->hwirq), fic->base + AL_FIC_SET_CAUSE);
137 struct al_fic *fic)
142 fic->domain = irq_domain_add_linear(node,
145 fic);
146 if (!fic->domain) {
151 ret = irq_alloc_domain_generic_chips(fic->domain,
153 1, fic->name,
161 gc = irq_get_domain_generic_chip(fic->domain, 0);
162 gc->reg_base = fic->base;
171 gc->private = fic;
173 irq_set_chained_handler_and_data(fic->parent_irq,
175 fic);
179 irq_domain_remove(fic->domain);
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;
205 fic = kzalloc(sizeof(*fic), GFP_KERNEL);
206 if (!fic)
209 fic->base = base;
210 fic->parent_irq = parent_irq;
211 fic->name = name;
214 writel_relaxed(0xFFFFFFFF, fic->base + AL_FIC_MASK);
217 writel_relaxed(0, fic->base + AL_FIC_CAUSE);
219 writel_relaxed(control, fic->base + AL_FIC_CONTROL);
221 ret = al_fic_register(node, fic);
228 fic->name, parent_irq);
230 return fic;
233 kfree(fic);
243 struct al_fic *fic;
264 fic = al_fic_wire_init(node,
268 if (IS_ERR(fic)) {
271 PTR_ERR(fic));
272 ret = PTR_ERR(fic);
286 IRQCHIP_DECLARE(al_fic, "amazon,al-fic", al_fic_init_dt);