Lines Matching +full:im +full:-
2 * HP i8042-based System Device Controller driver.
31 * for Part Number 1820-4784 Revision B. Dwg No. A-1820-4784-2
32 * Helge Deller's original hilkbd.c port for PA-RISC.
55 * The i8042 write index and the values in the 4-byte input buffer
75 /* Machine-specific abstraction */
78 # include <asm/parisc-device.h>
92 MODULE_DESCRIPTION("HP i8042-based SDC Driver");
193 curr->seq[curr->idx++] = status; in hp_sdc_take()
194 curr->seq[curr->idx++] = data; in hp_sdc_take()
195 hp_sdc.rqty -= 2; in hp_sdc_take()
200 if (curr->seq[curr->actidx] & HP_SDC_ACT_SEMAPHORE) in hp_sdc_take()
201 if (curr->act.semaphore) in hp_sdc_take()
202 up(curr->act.semaphore); in hp_sdc_take()
204 if (curr->seq[curr->actidx] & HP_SDC_ACT_CALLBACK) in hp_sdc_take()
205 if (curr->act.irqhook) in hp_sdc_take()
206 curr->act.irqhook(irq, dev_id, status, data); in hp_sdc_take()
208 curr->actidx = curr->idx; in hp_sdc_take()
209 curr->idx++; in hp_sdc_take()
212 hp_sdc.rcurr = -1; in hp_sdc_take()
323 curr->idx += hp_sdc.rqty; in hp_sdc_tasklet()
325 tmp = curr->seq[curr->actidx]; in hp_sdc_tasklet()
326 curr->seq[curr->actidx] |= HP_SDC_ACT_DEAD; in hp_sdc_tasklet()
328 if (curr->act.semaphore) in hp_sdc_tasklet()
329 up(curr->act.semaphore); in hp_sdc_tasklet()
335 if (curr->act.irqhook) in hp_sdc_tasklet()
336 curr->act.irqhook(0, NULL, 0, 0); in hp_sdc_tasklet()
339 curr->actidx = curr->idx; in hp_sdc_tasklet()
340 curr->idx++; in hp_sdc_tasklet()
341 hp_sdc.rcurr = -1; in hp_sdc_tasklet()
383 curridx = -1; /* Wrap to top */ in hp_sdc_put()
396 curridx = -1; in hp_sdc_put()
404 hp_sdc_status_out8(hp_sdc.im | HP_SDC_CMD_SET_IM); in hp_sdc_put()
409 if (hp_sdc.wcurr == -1) in hp_sdc_put()
413 idx = curr->actidx; in hp_sdc_put()
415 if (curr->actidx >= curr->endidx) { in hp_sdc_put()
424 act = curr->seq[idx]; in hp_sdc_put()
427 if (curr->idx >= curr->endidx) { in hp_sdc_put()
439 if (curr->idx != idx) { in hp_sdc_put()
444 hp_sdc_status_out8(curr->seq[idx]); in hp_sdc_put()
445 curr->idx++; in hp_sdc_put()
449 /* skip quantity field if data-out sequence follows. */ in hp_sdc_put()
451 curr->idx++; in hp_sdc_put()
457 qty = curr->seq[idx]; in hp_sdc_put()
459 if (curr->idx - idx < qty) { in hp_sdc_put()
460 hp_sdc_data_out8(curr->seq[curr->idx]); in hp_sdc_put()
461 curr->idx++; in hp_sdc_put()
463 if (curr->idx - idx >= qty && in hp_sdc_put()
475 mask = curr->seq[idx]; in hp_sdc_put()
476 if (idx != curr->idx) { in hp_sdc_put()
486 w7[0] = (mask & 1) ? curr->seq[++idx] : hp_sdc.r7[0]; in hp_sdc_put()
487 w7[1] = (mask & 2) ? curr->seq[++idx] : hp_sdc.r7[1]; in hp_sdc_put()
488 w7[2] = (mask & 4) ? curr->seq[++idx] : hp_sdc.r7[2]; in hp_sdc_put()
489 w7[3] = (mask & 8) ? curr->seq[++idx] : hp_sdc.r7[3]; in hp_sdc_put()
492 w7[hp_sdc.wi - 0x70] == hp_sdc.r7[hp_sdc.wi - 0x70]) { in hp_sdc_put()
509 curr->idx = idx; in hp_sdc_put()
514 hp_sdc_data_out8(w7[hp_sdc.wi - 0x70]); in hp_sdc_put()
515 hp_sdc.r7[hp_sdc.wi - 0x70] = w7[hp_sdc.wi - 0x70]; in hp_sdc_put()
523 curr->idx = idx + 1; in hp_sdc_put()
544 /* curr->idx should == idx at this point. */ in hp_sdc_put()
545 postcmd = curr->seq[idx]; in hp_sdc_put()
546 curr->idx++; in hp_sdc_put()
550 hp_sdc.rqty = curr->seq[curr->idx]; in hp_sdc_put()
552 curr->idx++; in hp_sdc_put()
566 up(curr->act.semaphore); in hp_sdc_put()
568 curr->act.irqhook(0,NULL,0,0); in hp_sdc_put()
570 if (curr->idx >= curr->endidx) { /* This transaction is over. */ in hp_sdc_put()
575 curr->actidx = idx + 1; in hp_sdc_put()
576 curr->idx = idx + 2; in hp_sdc_put()
604 return -EINVAL; in __hp_sdc_enqueue_transaction()
612 this->actidx = 0; in __hp_sdc_enqueue_transaction()
613 this->idx = 1; in __hp_sdc_enqueue_transaction()
624 return -EBUSY; in __hp_sdc_enqueue_transaction()
628 return -EINVAL; in __hp_sdc_enqueue_transaction()
665 return -EINVAL; in hp_sdc_request_timer_irq()
670 return -EBUSY; in hp_sdc_request_timer_irq()
675 hp_sdc.im &= ~HP_SDC_IM_FH; in hp_sdc_request_timer_irq()
676 hp_sdc.im &= ~HP_SDC_IM_PT; in hp_sdc_request_timer_irq()
677 hp_sdc.im &= ~HP_SDC_IM_TIMERS; in hp_sdc_request_timer_irq()
689 return -EINVAL; in hp_sdc_request_hil_irq()
694 return -EBUSY; in hp_sdc_request_hil_irq()
698 hp_sdc.im &= ~(HP_SDC_IM_HIL | HP_SDC_IM_RESET); in hp_sdc_request_hil_irq()
710 return -EINVAL; in hp_sdc_request_cooked_irq()
715 return -EBUSY; in hp_sdc_request_cooked_irq()
720 hp_sdc.im &= ~(HP_SDC_IM_HIL | HP_SDC_IM_RESET); in hp_sdc_request_cooked_irq()
735 return -EINVAL; in hp_sdc_release_timer_irq()
740 hp_sdc.im |= HP_SDC_IM_TIMERS; in hp_sdc_release_timer_irq()
741 hp_sdc.im |= HP_SDC_IM_FH; in hp_sdc_release_timer_irq()
742 hp_sdc.im |= HP_SDC_IM_PT; in hp_sdc_release_timer_irq()
756 return -EINVAL; in hp_sdc_release_hil_irq()
762 hp_sdc.im |= (HP_SDC_IM_HIL | HP_SDC_IM_RESET); in hp_sdc_release_hil_irq()
777 return -EINVAL; in hp_sdc_release_cooked_irq()
783 hp_sdc.im |= (HP_SDC_IM_HIL | HP_SDC_IM_RESET); in hp_sdc_release_cooked_irq()
797 /* Re-insert the periodic task. */ in hp_sdc_kicker()
844 hp_sdc.im = HP_SDC_IM_MASK; /* Mask maskable irqs */ in hp_sdc_init()
855 hp_sdc.wcurr = -1; in hp_sdc_init()
856 hp_sdc.rcurr = -1; in hp_sdc_init()
859 hp_sdc.dev_err = -ENODEV; in hp_sdc_init()
869 hp_sdc.dev_err = -EBUSY; in hp_sdc_init()
944 hp_sdc.irq = d->irq; in hp_sdc_init_hppa()
945 hp_sdc.nmi = d->aux_irq; in hp_sdc_init_hppa()
946 hp_sdc.base_io = d->hpa.start; in hp_sdc_init_hppa()
947 hp_sdc.data_io = d->hpa.start + 0x800; in hp_sdc_init_hppa()
948 hp_sdc.status_io = d->hpa.start + 0x801; in hp_sdc_init_hppa()
972 /* Turn off all maskable "sub-function" irq's. */ in hp_sdc_exit()
1005 return -ENODEV; in hp_sdc_register()
1013 return -ENODEV; in hp_sdc_register()
1017 return -ENODEV; in hp_sdc_register()
1056 return -ENODEV; in hp_sdc_register()
1071 return -ENODEV; in hp_sdc_register()
1079 printk(KERN_INFO PREFIX "OKI MSM-58321 BBRTC present\n"); in hp_sdc_register()
1095 printk(KERN_INFO PREFIX "Old style SDC (1820-%s).\n", in hp_sdc_register()
1104 /* Timing notes: These measurements taken on my 64MHz 7100-LC (715/64)
1105 * cycles cycles-adj time