irq.c 848 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. *
  4. * Copyright (C) 2014 Broadcom Corporation
  5. * Author: Kevin Cernekee <cernekee@gmail.com>
  6. */
  7. #include <linux/of.h>
  8. #include <linux/irqchip.h>
  9. #include <asm/bmips.h>
  10. #include <asm/irq.h>
  11. #include <asm/irq_cpu.h>
  12. #include <asm/time.h>
  13. static const struct of_device_id smp_intc_dt_match[] = {
  14. { .compatible = "brcm,bcm7038-l1-intc" },
  15. { .compatible = "brcm,bcm6345-l1-intc" },
  16. {}
  17. };
  18. unsigned int get_c0_compare_int(void)
  19. {
  20. return CP0_LEGACY_COMPARE_IRQ;
  21. }
  22. void __init arch_init_irq(void)
  23. {
  24. struct device_node *dn;
  25. /* Only these controllers support SMP IRQ affinity */
  26. dn = of_find_matching_node(NULL, smp_intc_dt_match);
  27. if (dn)
  28. of_node_put(dn);
  29. else
  30. bmips_tp1_irqs = 0;
  31. irqchip_init();
  32. }
  33. IRQCHIP_DECLARE(mips_cpu_intc, "mti,cpu-interrupt-controller",
  34. mips_cpu_irq_of_init);