1 // SPDX-License-Identifier: GPL-2.0-only 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* 2 /* 3 * 3 * 4 * Copyright (C) 2014 Broadcom Corporation 4 * Copyright (C) 2014 Broadcom Corporation 5 * Author: Kevin Cernekee <cernekee@gmail.com> 5 * Author: Kevin Cernekee <cernekee@gmail.com> 6 */ 6 */ 7 7 8 #include <linux/of.h> 8 #include <linux/of.h> 9 #include <linux/irqchip.h> 9 #include <linux/irqchip.h> 10 10 11 #include <asm/bmips.h> 11 #include <asm/bmips.h> 12 #include <asm/irq.h> 12 #include <asm/irq.h> 13 #include <asm/irq_cpu.h> 13 #include <asm/irq_cpu.h> 14 #include <asm/time.h> 14 #include <asm/time.h> 15 15 16 static const struct of_device_id smp_intc_dt_m 16 static const struct of_device_id smp_intc_dt_match[] = { 17 { .compatible = "brcm,bcm7038-l1-intc" 17 { .compatible = "brcm,bcm7038-l1-intc" }, 18 { .compatible = "brcm,bcm6345-l1-intc" 18 { .compatible = "brcm,bcm6345-l1-intc" }, 19 {} 19 {} 20 }; 20 }; 21 21 22 unsigned int get_c0_compare_int(void) 22 unsigned int get_c0_compare_int(void) 23 { 23 { 24 return CP0_LEGACY_COMPARE_IRQ; 24 return CP0_LEGACY_COMPARE_IRQ; 25 } 25 } 26 26 27 void __init arch_init_irq(void) 27 void __init arch_init_irq(void) 28 { 28 { 29 struct device_node *dn; 29 struct device_node *dn; 30 30 31 /* Only these controllers support SMP 31 /* Only these controllers support SMP IRQ affinity */ 32 dn = of_find_matching_node(NULL, smp_i 32 dn = of_find_matching_node(NULL, smp_intc_dt_match); 33 if (dn) 33 if (dn) 34 of_node_put(dn); 34 of_node_put(dn); 35 else 35 else 36 bmips_tp1_irqs = 0; 36 bmips_tp1_irqs = 0; 37 37 38 irqchip_init(); 38 irqchip_init(); 39 } 39 } 40 40 41 IRQCHIP_DECLARE(mips_cpu_intc, "mti,cpu-interr 41 IRQCHIP_DECLARE(mips_cpu_intc, "mti,cpu-interrupt-controller", 42 mips_cpu_irq_of_init); 42 mips_cpu_irq_of_init); 43 43
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.