Example #1
0
void
sscapeintr(int irq)
{
    u_char   bits, tmp;

    DEB(printf("sscapeintr(0x%02x)\n", (bits = sscape_read(devc, GA_INTSTAT_REG))));
    if ((sscape_sleep_flag.mode & WK_SLEEP)) {
	sscape_sleep_flag.mode = WK_WAKEUP;
	wakeup(sscape_sleeper);
    }
    if (bits & 0x02) {	/* Host interface interrupt */
	printf("SSCAPE: Host interrupt, data=%02x\n", host_read(devc));
    }
#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
    if (bits & 0x01) {
	static int debug = 0;

	mpuintr(irq);
	if (debug++ > 10) {	/* Temporary debugging hack */
	    sscape_write(devc, GA_INTENA_REG, 0x00); /* Disable all interr. */
	}
    }
#endif

    /*
     * Acknowledge interrupts (toggle the interrupt bits)
     */

    tmp = sscape_read(devc, GA_INTENA_REG);
    sscape_write(devc, GA_INTENA_REG, (~bits & 0x0e) | (tmp & 0xf1));
}
Example #2
0
void
sscapeintr (int irq, void *dev_id, struct pt_regs *dummy)
{
  unsigned char   bits, tmp;
  static int      debug = 0;

  bits = sscape_read (devc, GA_INTSTAT_REG);
  if ((sscape_sleep_flag.flags & WK_SLEEP))
    {
      {
	sscape_sleep_flag.flags = WK_WAKEUP;
	module_wake_up (&sscape_sleeper);
      };
    }

  if (bits & 0x02)		/* Host interface interrupt */
    {
      printk ("SSCAPE: Host interrupt, data=%02x\n", host_read (devc));
    }

#if defined(CONFIG_MPU_EMU) && defined(CONFIG_MIDI)
  if (bits & 0x01)
    {
      mpuintr (irq, NULL, NULL);
      if (debug++ > 10)		/* Temporary debugging hack */
	{
	  sscape_write (devc, GA_INTENA_REG, 0x00);	/* Disable all interrupts */
	}
    }
#endif

  /*
     * Acknowledge interrupts (toggle the interrupt bits)
   */

  tmp = sscape_read (devc, GA_INTENA_REG);
  sscape_write (devc, GA_INTENA_REG, (~bits & 0x0e) | (tmp & 0xf1));

}