Lines Matching refs:fic

45 static void al_fic_set_trigger(struct al_fic *fic,
50 u32 control = readl_relaxed(fic->base + AL_FIC_CONTROL);
60 fic->state = new_state;
61 writel_relaxed(control, fic->base + AL_FIC_CONTROL);
67 struct al_fic *fic = gc->private;
75 pr_debug("fic doesn't support flow type %d\n", flow_type);
92 if (fic->state == AL_FIC_UNCONFIGURED) {
93 al_fic_set_trigger(fic, gc, new_state);
94 } else if (fic->state != new_state) {
95 pr_debug("fic %s state already configured to %d\n",
96 fic->name, fic->state);
109 struct al_fic *fic = irq_desc_get_handler_data(desc);
110 struct irq_domain *domain = fic->domain;
119 pending = readl_relaxed(fic->base + AL_FIC_CAUSE);
133 struct al_fic *fic = gc->private;
135 writel_relaxed(BIT(data->hwirq), fic->base + AL_FIC_SET_CAUSE);
141 struct al_fic *fic)
146 fic->domain = irq_domain_add_linear(node,
149 fic);
150 if (!fic->domain) {
155 ret = irq_alloc_domain_generic_chips(fic->domain,
157 1, fic->name,
165 gc = irq_get_domain_generic_chip(fic->domain, 0);
166 gc->reg_base = fic->base;
175 gc->private = fic;
177 irq_set_chained_handler_and_data(fic->parent_irq,
179 fic);
183 irq_domain_remove(fic->domain);
189 * al_fic_wire_init() - initialize and configure fic in wire mode
191 * @base: mmio to fic register
192 * @name: name of the fic
195 * This API will configure the fic hardware to to work in wire mode.
196 * In wire mode, fic hardware is generating a wire ("wired") interrupt.
198 * to be determined based on connected hardware to this fic.
205 struct al_fic *fic;
209 fic = kzalloc(sizeof(*fic), GFP_KERNEL);
210 if (!fic)
213 fic->base = base;
214 fic->parent_irq = parent_irq;
215 fic->name = name;
218 writel_relaxed(0xFFFFFFFF, fic->base + AL_FIC_MASK);
221 writel_relaxed(0, fic->base + AL_FIC_CAUSE);
223 writel_relaxed(control, fic->base + AL_FIC_CONTROL);
225 ret = al_fic_register(node, fic);
232 fic->name, parent_irq);
234 return fic;
237 kfree(fic);
247 struct al_fic *fic;
268 fic = al_fic_wire_init(node,
272 if (IS_ERR(fic)) {
275 PTR_ERR(fic));
276 ret = PTR_ERR(fic);
290 IRQCHIP_DECLARE(al_fic, "amazon,al-fic", al_fic_init_dt);