• Home
  • Raw
  • Download

Lines Matching refs:pic

62 	struct megamod_pic *pic;  member
70 struct megamod_pic *pic = irq_data_get_irq_chip_data(data); in mask_megamod() local
72 u32 __iomem *evtmask = &pic->regs->evtmask[src / 32]; in mask_megamod()
74 raw_spin_lock(&pic->lock); in mask_megamod()
76 raw_spin_unlock(&pic->lock); in mask_megamod()
81 struct megamod_pic *pic = irq_data_get_irq_chip_data(data); in unmask_megamod() local
83 u32 __iomem *evtmask = &pic->regs->evtmask[src / 32]; in unmask_megamod()
85 raw_spin_lock(&pic->lock); in unmask_megamod()
87 raw_spin_unlock(&pic->lock); in unmask_megamod()
99 struct megamod_pic *pic; in megamod_irq_cascade() local
106 pic = cascade->pic; in megamod_irq_cascade()
109 while ((events = soc_readl(&pic->regs->mevtflag[idx])) != 0) { in megamod_irq_cascade()
112 irq = irq_linear_revmap(pic->irqhost, idx * 32 + n); in megamod_irq_cascade()
114 soc_writel(1 << n, &pic->regs->evtclr[idx]); in megamod_irq_cascade()
123 struct megamod_pic *pic = h->host_data; in megamod_map() local
128 if (pic->output_to_irq[i] == hw) in megamod_map()
131 irq_set_chip_data(virq, pic); in megamod_map()
145 static void __init set_megamod_mux(struct megamod_pic *pic, int src, int output) in set_megamod_mux() argument
151 pic->output_to_irq[output] = IRQ_UNMAPPED; in set_megamod_mux()
159 val = soc_readl(&pic->regs->intmux[index]); in set_megamod_mux()
162 soc_writel(val, &pic->regs->intmux[index]); in set_megamod_mux()
178 static void __init parse_priority_map(struct megamod_pic *pic, in parse_priority_map() argument
181 struct device_node *np = irq_domain_get_of_node(pic->irqhost); in parse_priority_map()
203 struct megamod_pic *pic; in init_megamod_pic() local
209 pic = kzalloc(sizeof(struct megamod_pic), GFP_KERNEL); in init_megamod_pic()
210 if (!pic) { in init_megamod_pic()
215 pic->irqhost = irq_domain_add_linear(np, NR_COMBINERS * 32, in init_megamod_pic()
216 &megamod_domain_ops, pic); in init_megamod_pic()
217 if (!pic->irqhost) { in init_megamod_pic()
222 pic->irqhost->host_data = pic; in init_megamod_pic()
224 raw_spin_lock_init(&pic->lock); in init_megamod_pic()
226 pic->regs = of_iomap(np, 0); in init_megamod_pic()
227 if (!pic->regs) { in init_megamod_pic()
236 parse_priority_map(pic, mapping, ARRAY_SIZE(mapping)); in init_megamod_pic()
279 cascade_data[i].pic = pic; in init_megamod_pic()
283 soc_writel(~0, &pic->regs->evtmask[i]); in init_megamod_pic()
284 soc_writel(~0, &pic->regs->evtclr[i]); in init_megamod_pic()
295 set_megamod_mux(pic, mapping[i], i); in init_megamod_pic()
299 return pic; in init_megamod_pic()
302 kfree(pic); in init_megamod_pic()