Lines Matching refs:intc

79 static inline unsigned int reg_status(struct bcm7038_l1_chip *intc,
82 return (0 * intc->n_words + word) * sizeof(u32);
85 static inline unsigned int reg_mask_status(struct bcm7038_l1_chip *intc,
88 return (1 * intc->n_words + word) * sizeof(u32);
91 static inline unsigned int reg_mask_set(struct bcm7038_l1_chip *intc,
94 return (2 * intc->n_words + word) * sizeof(u32);
97 static inline unsigned int reg_mask_clr(struct bcm7038_l1_chip *intc,
100 return (3 * intc->n_words + word) * sizeof(u32);
121 struct bcm7038_l1_chip *intc = irq_desc_get_handler_data(desc);
127 cpu = intc->cpus[cpu_logical_map(smp_processor_id())];
129 cpu = intc->cpus[0];
134 for (idx = 0; idx < intc->n_words; idx++) {
139 raw_spin_lock_irqsave(&intc->lock, flags);
140 pending = l1_readl(cpu->map_base + reg_status(intc, idx)) &
142 raw_spin_unlock_irqrestore(&intc->lock, flags);
145 generic_handle_domain_irq(intc->domain, base + hwirq);
153 struct bcm7038_l1_chip *intc = irq_data_get_irq_chip_data(d);
157 intc->cpus[cpu_idx]->mask_cache[word] &= ~mask;
158 l1_writel(mask, intc->cpus[cpu_idx]->map_base +
159 reg_mask_clr(intc, word));
164 struct bcm7038_l1_chip *intc = irq_data_get_irq_chip_data(d);
168 intc->cpus[cpu_idx]->mask_cache[word] |= mask;
169 l1_writel(mask, intc->cpus[cpu_idx]->map_base +
170 reg_mask_set(intc, word));
175 struct bcm7038_l1_chip *intc = irq_data_get_irq_chip_data(d);
178 raw_spin_lock_irqsave(&intc->lock, flags);
179 __bcm7038_l1_unmask(d, intc->affinity[d->hwirq]);
180 raw_spin_unlock_irqrestore(&intc->lock, flags);
185 struct bcm7038_l1_chip *intc = irq_data_get_irq_chip_data(d);
188 raw_spin_lock_irqsave(&intc->lock, flags);
189 __bcm7038_l1_mask(d, intc->affinity[d->hwirq]);
190 raw_spin_unlock_irqrestore(&intc->lock, flags);
198 struct bcm7038_l1_chip *intc = irq_data_get_irq_chip_data(d);
206 raw_spin_lock_irqsave(&intc->lock, flags);
208 was_disabled = !!(intc->cpus[intc->affinity[hw]]->mask_cache[word] &
210 __bcm7038_l1_mask(d, intc->affinity[hw]);
211 intc->affinity[hw] = first_cpu;
215 raw_spin_unlock_irqrestore(&intc->lock, flags);
224 struct bcm7038_l1_chip *intc)
239 else if (!intc->n_words)
240 intc->n_words = n_words;
241 else if (intc->n_words != n_words)
245 intc->irq_fwd_mask, n_words);
252 cpu = intc->cpus[idx] = kzalloc(sizeof(*cpu) + n_words * sizeof(u32),
262 l1_writel(~intc->irq_fwd_mask[i],
263 cpu->map_base + reg_mask_set(intc, i));
264 l1_writel(intc->irq_fwd_mask[i],
265 cpu->map_base + reg_mask_clr(intc, i));
266 cpu->mask_cache[i] = ~intc->irq_fwd_mask[i];
279 intc);
297 struct bcm7038_l1_chip *intc;
308 list_for_each_entry(intc, &bcm7038_l1_intcs_list, list) {
309 for (word = 0; word < intc->n_words; word++) {
310 val = intc->wake_mask[word] | intc->irq_fwd_mask[word];
312 intc->cpus[boot_cpu]->map_base + reg_mask_set(intc, word));
314 intc->cpus[boot_cpu]->map_base + reg_mask_clr(intc, word));
323 struct bcm7038_l1_chip *intc;
332 list_for_each_entry(intc, &bcm7038_l1_intcs_list, list) {
333 for (word = 0; word < intc->n_words; word++) {
334 l1_writel(intc->cpus[boot_cpu]->mask_cache[word],
335 intc->cpus[boot_cpu]->map_base + reg_mask_set(intc, word));
336 l1_writel(~intc->cpus[boot_cpu]->mask_cache[word],
337 intc->cpus[boot_cpu]->map_base + reg_mask_clr(intc, word));
349 struct bcm7038_l1_chip *intc = irq_data_get_irq_chip_data(d);
354 raw_spin_lock_irqsave(&intc->lock, flags);
356 intc->wake_mask[word] |= mask;
358 intc->wake_mask[word] &= ~mask;
359 raw_spin_unlock_irqrestore(&intc->lock, flags);
380 struct bcm7038_l1_chip *intc = d->host_data;
384 if (intc->irq_fwd_mask[word] & mask)
401 struct bcm7038_l1_chip *intc;
404 intc = kzalloc(sizeof(*intc), GFP_KERNEL);
405 if (!intc)
408 raw_spin_lock_init(&intc->lock);
410 ret = bcm7038_l1_init_one(dn, idx, intc);
414 pr_err("failed to remap intc L1 registers\n");
419 intc->domain = irq_domain_add_linear(dn, IRQS_PER_WORD * intc->n_words,
421 intc);
422 if (!intc->domain) {
430 list_add_tail(&intc->list, &bcm7038_l1_intcs_list);
437 pr_info("registered BCM7038 L1 intc (%pOF, IRQs: %d)\n",
438 dn, IRQS_PER_WORD * intc->n_words);
444 struct bcm7038_l1_cpu *cpu = intc->cpus[idx];
453 kfree(intc);
458 IRQCHIP_MATCH("brcm,bcm7038-l1-intc", bcm7038_l1_of_init)