Lines Matching refs:pia
81 #define pia(dev) ((struct pia *)(dev->base)) macro
88 dummy = pia(p)->pprb; /* clears irq bit */ in mfc3_write_data()
90 pia(p)->pprb = data; in mfc3_write_data()
96 return pia(p)->pprb; in mfc3_read_data()
131 pia(p)->ppra = (pia(p)->ppra & 0x1f) | control_pc_to_mfc3(control); in mfc3_write_control()
137 return control_mfc3_to_pc(pia(p)->ppra & 0xe0); in mfc3_read_control()
191 pia(p)->ppra = (pia(p)->ppra & 0xe0) | status_pc_to_mfc3(status);
199 status = status_mfc3_to_pc(pia(p)->ppra & 0x1f); in mfc3_read_status()
220 if (pia(this_port[i])->crb & 128) { /* Board caused interrupt */ in mfc3_interrupt()
221 dummy = pia(this_port[i])->pprb; /* clear irq bit */ in mfc3_interrupt()
229 pia(p)->crb |= PIA_C1_ENABLE_IRQ; in mfc3_enable_irq()
234 pia(p)->crb &= ~PIA_C1_ENABLE_IRQ; in mfc3_disable_irq()
240 pia(p)->crb &= ~PIA_DDR; /* make data direction register visible */ in mfc3_data_forward()
241 pia(p)->pddrb = 255; /* all pins output */ in mfc3_data_forward()
242 pia(p)->crb |= PIA_DDR; /* make data register visible - default */ in mfc3_data_forward()
248 pia(p)->crb &= ~PIA_DDR; /* make data direction register visible */ in mfc3_data_reverse()
249 pia(p)->pddrb = 0; /* all pins input */ in mfc3_data_reverse()
250 pia(p)->crb |= PIA_DDR; /* make data register visible - default */ in mfc3_data_reverse()
263 s->u.amiga.data = pia(p)->pprb; in mfc3_save_state()
264 pia(p)->crb &= ~PIA_DDR; in mfc3_save_state()
265 s->u.amiga.datadir = pia(p)->pddrb; in mfc3_save_state()
266 pia(p)->crb |= PIA_DDR; in mfc3_save_state()
267 s->u.amiga.status = pia(p)->ppra; in mfc3_save_state()
268 pia(p)->cra &= ~PIA_DDR; in mfc3_save_state()
269 s->u.amiga.statusdir = pia(p)->pddrb; in mfc3_save_state()
270 pia(p)->cra |= PIA_DDR; in mfc3_save_state()
275 pia(p)->pprb = s->u.amiga.data; in mfc3_restore_state()
276 pia(p)->crb &= ~PIA_DDR; in mfc3_restore_state()
277 pia(p)->pddrb = s->u.amiga.datadir; in mfc3_restore_state()
278 pia(p)->crb |= PIA_DDR; in mfc3_restore_state()
279 pia(p)->ppra = s->u.amiga.status; in mfc3_restore_state()
280 pia(p)->cra &= ~PIA_DDR; in mfc3_restore_state()
281 pia(p)->pddrb = s->u.amiga.statusdir; in mfc3_restore_state()
282 pia(p)->cra |= PIA_DDR; in mfc3_restore_state()
327 struct pia *pp; in parport_mfc3_init()
335 if (!request_mem_region(piabase, sizeof(struct pia), "PIA")) in parport_mfc3_init()
338 pp = (struct pia *)ZTWO_VADDR(piabase); in parport_mfc3_init()
375 release_mem_region(piabase, sizeof(struct pia)); in parport_mfc3_init()
393 release_mem_region(ZTWO_PADDR(this_port[i]->private_data), sizeof(struct pia)); in parport_mfc3_exit()