irq.c 994 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * This program is free software; you can redistribute it and/or modify it
  3. * under the terms of the GNU General Public License version 2 as published
  4. * by the Free Software Foundation.
  5. *
  6. * Copyright (C) 2014 Broadcom Corporation
  7. * Author: Kevin Cernekee <cernekee@gmail.com>
  8. */
  9. #include <linux/of.h>
  10. #include <linux/irqchip.h>
  11. #include <asm/bmips.h>
  12. #include <asm/irq.h>
  13. #include <asm/irq_cpu.h>
  14. #include <asm/time.h>
  15. static const struct of_device_id smp_intc_dt_match[] = {
  16. { .compatible = "brcm,bcm7038-l1-intc" },
  17. { .compatible = "brcm,bcm6345-l1-intc" },
  18. {}
  19. };
  20. unsigned int get_c0_compare_int(void)
  21. {
  22. return CP0_LEGACY_COMPARE_IRQ;
  23. }
  24. void __init arch_init_irq(void)
  25. {
  26. struct device_node *dn;
  27. /* Only these controllers support SMP IRQ affinity */
  28. dn = of_find_matching_node(NULL, smp_intc_dt_match);
  29. if (dn)
  30. of_node_put(dn);
  31. else
  32. bmips_tp1_irqs = 0;
  33. irqchip_init();
  34. }
  35. IRQCHIP_DECLARE(mips_cpu_intc, "mti,cpu-interrupt-controller",
  36. mips_cpu_irq_of_init);