• Home
  • Raw
  • Download

Lines Matching refs:pic

59 	struct megamod_pic *pic;  member
67 struct megamod_pic *pic = irq_data_get_irq_chip_data(data); in mask_megamod() local
69 u32 __iomem *evtmask = &pic->regs->evtmask[src / 32]; in mask_megamod()
71 raw_spin_lock(&pic->lock); in mask_megamod()
73 raw_spin_unlock(&pic->lock); in mask_megamod()
78 struct megamod_pic *pic = irq_data_get_irq_chip_data(data); in unmask_megamod() local
80 u32 __iomem *evtmask = &pic->regs->evtmask[src / 32]; in unmask_megamod()
82 raw_spin_lock(&pic->lock); in unmask_megamod()
84 raw_spin_unlock(&pic->lock); in unmask_megamod()
96 struct megamod_pic *pic; in megamod_irq_cascade() local
103 pic = cascade->pic; in megamod_irq_cascade()
106 while ((events = soc_readl(&pic->regs->mevtflag[idx])) != 0) { in megamod_irq_cascade()
109 irq = irq_linear_revmap(pic->irqhost, idx * 32 + n); in megamod_irq_cascade()
111 soc_writel(1 << n, &pic->regs->evtclr[idx]); in megamod_irq_cascade()
120 struct megamod_pic *pic = h->host_data; in megamod_map() local
125 if (pic->output_to_irq[i] == hw) in megamod_map()
128 irq_set_chip_data(virq, pic); in megamod_map()
142 static void __init set_megamod_mux(struct megamod_pic *pic, int src, int output) in set_megamod_mux() argument
148 pic->output_to_irq[output] = IRQ_UNMAPPED; in set_megamod_mux()
156 val = soc_readl(&pic->regs->intmux[index]); in set_megamod_mux()
159 soc_writel(val, &pic->regs->intmux[index]); in set_megamod_mux()
175 static void __init parse_priority_map(struct megamod_pic *pic, in parse_priority_map() argument
178 struct device_node *np = irq_domain_get_of_node(pic->irqhost); in parse_priority_map()
200 struct megamod_pic *pic; in init_megamod_pic() local
206 pic = kzalloc(sizeof(struct megamod_pic), GFP_KERNEL); in init_megamod_pic()
207 if (!pic) { in init_megamod_pic()
212 pic->irqhost = irq_domain_add_linear(np, NR_COMBINERS * 32, in init_megamod_pic()
213 &megamod_domain_ops, pic); in init_megamod_pic()
214 if (!pic->irqhost) { in init_megamod_pic()
219 pic->irqhost->host_data = pic; in init_megamod_pic()
221 raw_spin_lock_init(&pic->lock); in init_megamod_pic()
223 pic->regs = of_iomap(np, 0); in init_megamod_pic()
224 if (!pic->regs) { in init_megamod_pic()
233 parse_priority_map(pic, mapping, ARRAY_SIZE(mapping)); in init_megamod_pic()
276 cascade_data[i].pic = pic; in init_megamod_pic()
280 soc_writel(~0, &pic->regs->evtmask[i]); in init_megamod_pic()
281 soc_writel(~0, &pic->regs->evtclr[i]); in init_megamod_pic()
292 set_megamod_mux(pic, mapping[i], i); in init_megamod_pic()
296 return pic; in init_megamod_pic()
299 kfree(pic); in init_megamod_pic()