Lines Matching refs:p
62 static void update_irq(struct loongson_liointc *p) in update_irq() argument
68 p->isr = p->pin_state; in update_irq()
71 p->isr &= p->ien; in update_irq()
75 p->per_core_isr[core] = 0; in update_irq()
80 if (!(p->isr & (1 << irq))) { in update_irq()
85 if ((p->mapper[irq] & (1 << core))) { in update_irq()
86 p->per_core_isr[core] |= (1 << irq); in update_irq()
91 if ((p->mapper[irq] & (1 << (ip + 4)))) { in update_irq()
101 if (p->parent_state[parent] != in update_irq()
102 (!!p->per_core_isr[core] && !!per_ip_isr[ip])) { in update_irq()
103 p->parent_state[parent] = !p->parent_state[parent]; in update_irq()
104 qemu_set_irq(p->parent_irq[parent], p->parent_state[parent]); in update_irq()
113 struct loongson_liointc *p = opaque; in liointc_read() local
118 r = p->mapper[addr]; in liointc_read()
134 r = p->per_core_isr[core]; in liointc_read()
140 r = p->isr; in liointc_read()
143 r = p->ien; in liointc_read()
159 struct loongson_liointc *p = opaque; in liointc_write() local
167 p->mapper[addr] = value; in liointc_write()
183 p->per_core_isr[core] = value; in liointc_write()
189 p->ien |= value; in liointc_write()
192 p->ien &= ~value; in liointc_write()
199 update_irq(p); in liointc_write()
214 struct loongson_liointc *p = opaque; in irq_handler() local
216 p->pin_state &= ~(1 << irq); in irq_handler()
217 p->pin_state |= level << irq; in irq_handler()
218 update_irq(p); in irq_handler()
223 struct loongson_liointc *p = LOONGSON_LIOINTC(obj); in loongson_liointc_init() local
229 sysbus_init_irq(SYS_BUS_DEVICE(obj), &p->parent_irq[i]); in loongson_liointc_init()
232 memory_region_init_io(&p->mmio, obj, &pic_ops, p, in loongson_liointc_init()
234 sysbus_init_mmio(SYS_BUS_DEVICE(obj), &p->mmio); in loongson_liointc_init()