• Home
  • Raw
  • Download

Lines Matching refs:intc

83 static inline unsigned int reg_status(struct bcm7038_l1_chip *intc,  in reg_status()  argument
86 return (0 * intc->n_words + word) * sizeof(u32); in reg_status()
89 static inline unsigned int reg_mask_status(struct bcm7038_l1_chip *intc, in reg_mask_status() argument
92 return (1 * intc->n_words + word) * sizeof(u32); in reg_mask_status()
95 static inline unsigned int reg_mask_set(struct bcm7038_l1_chip *intc, in reg_mask_set() argument
98 return (2 * intc->n_words + word) * sizeof(u32); in reg_mask_set()
101 static inline unsigned int reg_mask_clr(struct bcm7038_l1_chip *intc, in reg_mask_clr() argument
104 return (3 * intc->n_words + word) * sizeof(u32); in reg_mask_clr()
125 struct bcm7038_l1_chip *intc = irq_desc_get_handler_data(desc); in bcm7038_l1_irq_handle() local
131 cpu = intc->cpus[cpu_logical_map(smp_processor_id())]; in bcm7038_l1_irq_handle()
133 cpu = intc->cpus[0]; in bcm7038_l1_irq_handle()
138 for (idx = 0; idx < intc->n_words; idx++) { in bcm7038_l1_irq_handle()
143 raw_spin_lock_irqsave(&intc->lock, flags); in bcm7038_l1_irq_handle()
144 pending = l1_readl(cpu->map_base + reg_status(intc, idx)) & in bcm7038_l1_irq_handle()
146 raw_spin_unlock_irqrestore(&intc->lock, flags); in bcm7038_l1_irq_handle()
149 generic_handle_domain_irq(intc->domain, base + hwirq); in bcm7038_l1_irq_handle()
157 struct bcm7038_l1_chip *intc = irq_data_get_irq_chip_data(d); in __bcm7038_l1_unmask() local
161 intc->cpus[cpu_idx]->mask_cache[word] &= ~mask; in __bcm7038_l1_unmask()
162 l1_writel(mask, intc->cpus[cpu_idx]->map_base + in __bcm7038_l1_unmask()
163 reg_mask_clr(intc, word)); in __bcm7038_l1_unmask()
168 struct bcm7038_l1_chip *intc = irq_data_get_irq_chip_data(d); in __bcm7038_l1_mask() local
172 intc->cpus[cpu_idx]->mask_cache[word] |= mask; in __bcm7038_l1_mask()
173 l1_writel(mask, intc->cpus[cpu_idx]->map_base + in __bcm7038_l1_mask()
174 reg_mask_set(intc, word)); in __bcm7038_l1_mask()
179 struct bcm7038_l1_chip *intc = irq_data_get_irq_chip_data(d); in bcm7038_l1_unmask() local
182 raw_spin_lock_irqsave(&intc->lock, flags); in bcm7038_l1_unmask()
183 __bcm7038_l1_unmask(d, intc->affinity[d->hwirq]); in bcm7038_l1_unmask()
184 raw_spin_unlock_irqrestore(&intc->lock, flags); in bcm7038_l1_unmask()
189 struct bcm7038_l1_chip *intc = irq_data_get_irq_chip_data(d); in bcm7038_l1_mask() local
192 raw_spin_lock_irqsave(&intc->lock, flags); in bcm7038_l1_mask()
193 __bcm7038_l1_mask(d, intc->affinity[d->hwirq]); in bcm7038_l1_mask()
194 raw_spin_unlock_irqrestore(&intc->lock, flags); in bcm7038_l1_mask()
201 struct bcm7038_l1_chip *intc = irq_data_get_irq_chip_data(d); in bcm7038_l1_set_affinity() local
209 raw_spin_lock_irqsave(&intc->lock, flags); in bcm7038_l1_set_affinity()
211 was_disabled = !!(intc->cpus[intc->affinity[hw]]->mask_cache[word] & in bcm7038_l1_set_affinity()
213 __bcm7038_l1_mask(d, intc->affinity[hw]); in bcm7038_l1_set_affinity()
214 intc->affinity[hw] = first_cpu; in bcm7038_l1_set_affinity()
218 raw_spin_unlock_irqrestore(&intc->lock, flags); in bcm7038_l1_set_affinity()
253 struct bcm7038_l1_chip *intc) in bcm7038_l1_init_one() argument
268 else if (!intc->n_words) in bcm7038_l1_init_one()
269 intc->n_words = n_words; in bcm7038_l1_init_one()
270 else if (intc->n_words != n_words) in bcm7038_l1_init_one()
274 intc->irq_fwd_mask, n_words); in bcm7038_l1_init_one()
281 cpu = intc->cpus[idx] = kzalloc(sizeof(*cpu) + n_words * sizeof(u32), in bcm7038_l1_init_one()
291 l1_writel(~intc->irq_fwd_mask[i], in bcm7038_l1_init_one()
292 cpu->map_base + reg_mask_set(intc, i)); in bcm7038_l1_init_one()
293 l1_writel(intc->irq_fwd_mask[i], in bcm7038_l1_init_one()
294 cpu->map_base + reg_mask_clr(intc, i)); in bcm7038_l1_init_one()
295 cpu->mask_cache[i] = ~intc->irq_fwd_mask[i]; in bcm7038_l1_init_one()
308 intc); in bcm7038_l1_init_one()
326 struct bcm7038_l1_chip *intc; in bcm7038_l1_suspend() local
337 list_for_each_entry(intc, &bcm7038_l1_intcs_list, list) { in bcm7038_l1_suspend()
338 for (word = 0; word < intc->n_words; word++) { in bcm7038_l1_suspend()
339 val = intc->wake_mask[word] | intc->irq_fwd_mask[word]; in bcm7038_l1_suspend()
341 intc->cpus[boot_cpu]->map_base + reg_mask_set(intc, word)); in bcm7038_l1_suspend()
343 intc->cpus[boot_cpu]->map_base + reg_mask_clr(intc, word)); in bcm7038_l1_suspend()
352 struct bcm7038_l1_chip *intc; in bcm7038_l1_resume() local
361 list_for_each_entry(intc, &bcm7038_l1_intcs_list, list) { in bcm7038_l1_resume()
362 for (word = 0; word < intc->n_words; word++) { in bcm7038_l1_resume()
363 l1_writel(intc->cpus[boot_cpu]->mask_cache[word], in bcm7038_l1_resume()
364 intc->cpus[boot_cpu]->map_base + reg_mask_set(intc, word)); in bcm7038_l1_resume()
365 l1_writel(~intc->cpus[boot_cpu]->mask_cache[word], in bcm7038_l1_resume()
366 intc->cpus[boot_cpu]->map_base + reg_mask_clr(intc, word)); in bcm7038_l1_resume()
378 struct bcm7038_l1_chip *intc = irq_data_get_irq_chip_data(d); in bcm7038_l1_set_wake() local
383 raw_spin_lock_irqsave(&intc->lock, flags); in bcm7038_l1_set_wake()
385 intc->wake_mask[word] |= mask; in bcm7038_l1_set_wake()
387 intc->wake_mask[word] &= ~mask; in bcm7038_l1_set_wake()
388 raw_spin_unlock_irqrestore(&intc->lock, flags); in bcm7038_l1_set_wake()
410 struct bcm7038_l1_chip *intc = d->host_data; in bcm7038_l1_map() local
414 if (intc->irq_fwd_mask[word] & mask) in bcm7038_l1_map()
431 struct bcm7038_l1_chip *intc; in bcm7038_l1_of_init() local
434 intc = kzalloc(sizeof(*intc), GFP_KERNEL); in bcm7038_l1_of_init()
435 if (!intc) in bcm7038_l1_of_init()
438 raw_spin_lock_init(&intc->lock); in bcm7038_l1_of_init()
440 ret = bcm7038_l1_init_one(dn, idx, intc); in bcm7038_l1_of_init()
449 intc->domain = irq_domain_add_linear(dn, IRQS_PER_WORD * intc->n_words, in bcm7038_l1_of_init()
451 intc); in bcm7038_l1_of_init()
452 if (!intc->domain) { in bcm7038_l1_of_init()
460 list_add_tail(&intc->list, &bcm7038_l1_intcs_list); in bcm7038_l1_of_init()
468 dn, IRQS_PER_WORD * intc->n_words); in bcm7038_l1_of_init()
474 struct bcm7038_l1_cpu *cpu = intc->cpus[idx]; in bcm7038_l1_of_init()
483 kfree(intc); in bcm7038_l1_of_init()