hpsim_irq.c 946 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Platform dependent support for HP simulator.
  3. *
  4. * Copyright (C) 1998-2001 Hewlett-Packard Co
  5. * Copyright (C) 1998-2001 David Mosberger-Tang <davidm@hpl.hp.com>
  6. */
  7. #include <linux/init.h>
  8. #include <linux/kernel.h>
  9. #include <linux/sched.h>
  10. #include <linux/irq.h>
  11. static unsigned int
  12. hpsim_irq_startup (unsigned int irq)
  13. {
  14. return 0;
  15. }
  16. static void
  17. hpsim_irq_noop (unsigned int irq)
  18. {
  19. }
  20. static void
  21. hpsim_set_affinity_noop (unsigned int a, cpumask_t b)
  22. {
  23. }
  24. static struct hw_interrupt_type irq_type_hp_sim = {
  25. .name = "hpsim",
  26. .startup = hpsim_irq_startup,
  27. .shutdown = hpsim_irq_noop,
  28. .enable = hpsim_irq_noop,
  29. .disable = hpsim_irq_noop,
  30. .ack = hpsim_irq_noop,
  31. .end = hpsim_irq_noop,
  32. .set_affinity = hpsim_set_affinity_noop,
  33. };
  34. void __init
  35. hpsim_irq_init (void)
  36. {
  37. irq_desc_t *idesc;
  38. int i;
  39. for (i = 0; i < NR_IRQS; ++i) {
  40. idesc = irq_desc + i;
  41. if (idesc->chip == &no_irq_type)
  42. idesc->chip = &irq_type_hp_sim;
  43. }
  44. }