Lines Matching full:pic
64 static void __iomem *spider_get_irq_config(struct spider_pic *pic, in spider_get_irq_config() argument
67 return pic->regs + TIR_CFGA + 8 * src; in spider_get_irq_config()
72 struct spider_pic *pic = spider_irq_data_to_pic(d); in spider_unmask_irq() local
73 void __iomem *cfg = spider_get_irq_config(pic, irqd_to_hwirq(d)); in spider_unmask_irq()
80 struct spider_pic *pic = spider_irq_data_to_pic(d); in spider_mask_irq() local
81 void __iomem *cfg = spider_get_irq_config(pic, irqd_to_hwirq(d)); in spider_mask_irq()
88 struct spider_pic *pic = spider_irq_data_to_pic(d); in spider_ack_irq() local
101 out_be32(pic->regs + TIR_EDC, 0x100 | (src & 0xf)); in spider_ack_irq()
107 struct spider_pic *pic = spider_irq_data_to_pic(d); in spider_set_irq_type() local
109 void __iomem *cfg = spider_get_irq_config(pic, hw); in spider_set_irq_type()
145 (pic->node_id << 4) | 0xe); in spider_set_irq_type()
193 struct spider_pic *pic = irq_desc_get_handler_data(desc); in spider_irq_cascade() local
196 cs = in_be32(pic->regs + TIR_CS) >> 24; in spider_irq_cascade()
198 generic_handle_domain_irq(pic->host, cs); in spider_irq_cascade()
211 static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic) in spider_find_cascade_and_node() argument
219 of_node = irq_domain_get_of_node(pic->host); in spider_find_cascade_and_node()
255 pic->node_id = (*tmp) >> 1; in spider_find_cascade_and_node()
264 (pic->node_id << IIC_IRQ_NODE_SHIFT) | in spider_find_cascade_and_node()
276 struct spider_pic *pic = &spider_pics[chip]; in spider_init_one() local
280 pic->regs = ioremap(addr, 0x1000); in spider_init_one()
281 if (pic->regs == NULL) in spider_init_one()
285 pic->host = irq_domain_add_linear(of_node, SPIDER_SRC_COUNT, in spider_init_one()
286 &spider_host_ops, pic); in spider_init_one()
287 if (pic->host == NULL) in spider_init_one()
292 void __iomem *cfg = pic->regs + TIR_CFGA + 8 * i; in spider_init_one()
297 out_be32(pic->regs + TIR_MSK, 0x0); in spider_init_one()
300 out_be32(pic->regs + TIR_PIEN, in_be32(pic->regs + TIR_PIEN) | 0x1); in spider_init_one()
303 virq = spider_find_cascade_and_node(pic); in spider_init_one()
306 irq_set_handler_data(virq, pic); in spider_init_one()
310 pic->node_id, addr, of_node); in spider_init_one()
313 out_be32(pic->regs + TIR_DEN, in_be32(pic->regs + TIR_DEN) | 0x1); in spider_init_one()
330 if (of_device_is_compatible(dn, "CBEA,platform-spider-pic")) { in spider_init_IRQ()
332 printk(KERN_WARNING "spider-pic: Failed\n"); in spider_init_IRQ()
335 } else if (of_device_is_compatible(dn, "sti,platform-spider-pic") in spider_init_IRQ()