Lines Matching refs:heathrow
75 "heathrow",
83 int heathrow;
85 heathrow = OF_finddevice("/pci/mac-io");
86 if (heathrow == -1)
87 heathrow = OF_finddevice("mac-io");
88 if (heathrow == -1)
91 if (! of_compatible(heathrow, compat))
94 if (OF_getprop(heathrow, "assigned-addresses", reg, sizeof(reg)) != 20)
98 aprint_normal("found heathrow PIC at %08x\n", obio_base);
100 /* TODO: look for 2nd Heathrow */
107 struct heathrow_ops *heathrow;
110 heathrow = kmem_zalloc(sizeof(struct heathrow_ops), KM_SLEEP);
111 pic = &heathrow->pic;
123 strcpy(pic->pic_name, "heathrow");
125 heathrow->pending_events_l = 0;
126 heathrow->enable_mask_l = 0;
127 heathrow->level_mask_l = 0;
128 heathrow->pending_events_h = 0;
129 heathrow->enable_mask_h = 0;
130 heathrow->level_mask_h = 0;
135 return heathrow;
141 struct heathrow_ops *heathrow = (struct heathrow_ops *)pic;
145 heathrow->enable_mask_h |= mask;
146 out32rb(INT_ENABLE_REG_H, heathrow->enable_mask_h);
148 heathrow->enable_mask_l |= mask;
149 out32rb(INT_ENABLE_REG_L, heathrow->enable_mask_l);
156 struct heathrow_ops *heathrow = (struct heathrow_ops *)pic;
161 heathrow->enable_mask_h |= mask;
162 out32rb(INT_ENABLE_REG_H, heathrow->enable_mask_h);
169 heathrow->enable_mask_l |= mask;
170 out32rb(INT_ENABLE_REG_L, heathrow->enable_mask_l);
182 struct heathrow_ops *heathrow = (struct heathrow_ops *)pic;
186 heathrow->enable_mask_h &= ~mask;
187 out32rb(INT_ENABLE_REG_H, heathrow->enable_mask_h);
189 heathrow->enable_mask_l &= ~mask;
190 out32rb(INT_ENABLE_REG_L, heathrow->enable_mask_l);
195 heathrow_read_events(struct heathrow_ops *heathrow)
197 struct pic_ops *pic = &heathrow->pic;
202 events = irqs & ~heathrow->level_mask_l;
204 levels = in32rb(INT_LEVEL_REG_L) & heathrow->enable_mask_l;
205 events |= levels & heathrow->level_mask_l;
207 heathrow->pending_events_l |= events;
211 events = irqs & ~heathrow->level_mask_h;
212 levels = in32rb(INT_LEVEL_REG_L) & heathrow->enable_mask_h;
213 events |= levels & heathrow->level_mask_h;
215 heathrow->pending_events_h |= events;
221 struct heathrow_ops *heathrow = (struct heathrow_ops *)pic;
224 if ((heathrow->pending_events_h == 0) &&
225 (heathrow->pending_events_l == 0))
226 heathrow_read_events(heathrow);
228 if ((heathrow->pending_events_h == 0) &&
229 (heathrow->pending_events_l == 0))
232 if (heathrow->pending_events_l != 0) {
233 bit = 31 - __builtin_clz(heathrow->pending_events_l);
235 heathrow->pending_events_l &= ~mask;
239 if (heathrow->pending_events_h != 0) {
240 bit = 31 - __builtin_clz(heathrow->pending_events_h);
242 heathrow->pending_events_h &= ~mask;
257 struct heathrow_ops *heathrow = (struct heathrow_ops *)pic;
266 heathrow->level_mask_h |= mask;
269 heathrow->level_mask_h &= ~mask;
274 heathrow->level_mask_l |= mask;
277 heathrow->level_mask_l &= ~mask;
280 aprint_debug("mask: %08x %08x\n", heathrow->level_mask_h,
281 heathrow->level_mask_l);