aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bresticker <abrestic@chromium.org>2014-09-18 17:47:19 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-11-24 01:44:54 -0500
commit8a19b8f19429b86c91e10745bc131bc600e60ede (patch)
tree36a7d37a8ce46f0dbe979705bd75aa23ebc2fa78
parent8635233ca5987bd42953aeffab1f60a3b8ffc78f (diff)
MIPS: Move GIC to drivers/irqchip/
Move GIC irqchip support to drivers/irqchip/ and rename the Kconfig option from IRQ_GIC to MIPS_GIC to avoid confusion with the ARM GIC. Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Acked-by: Jason Cooper <jason@lakedaemon.net> Reviewed-by: Qais Yousef <qais.yousef@imgtec.com> Tested-by: Qais Yousef <qais.yousef@imgtec.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jeffrey Deans <jeffrey.deans@imgtec.com> Cc: Markos Chandras <markos.chandras@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Jonas Gorski <jogo@openwrt.org> Cc: John Crispin <blogic@openwrt.org> Cc: David Daney <ddaney.cavm@gmail.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/7812/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/Kconfig10
-rw-r--r--arch/mips/kernel/Makefile1
-rw-r--r--arch/mips/kernel/cevt-r4k.c2
-rw-r--r--arch/mips/kernel/smp-mt.c4
-rw-r--r--arch/mips/mti-malta/malta-time.c10
-rw-r--r--drivers/irqchip/Kconfig4
-rw-r--r--drivers/irqchip/Makefile1
-rw-r--r--drivers/irqchip/irq-mips-gic.c (renamed from arch/mips/kernel/irq-gic.c)0
8 files changed, 16 insertions, 16 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index e08aeec7d916..e0b7c2006900 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -320,7 +320,7 @@ config MIPS_MALTA
320 select GENERIC_ISA_DMA 320 select GENERIC_ISA_DMA
321 select HAVE_PCSPKR_PLATFORM 321 select HAVE_PCSPKR_PLATFORM
322 select IRQ_CPU 322 select IRQ_CPU
323 select IRQ_GIC 323 select MIPS_GIC
324 select HW_HAS_PCI 324 select HW_HAS_PCI
325 select I8253 325 select I8253
326 select I8259 326 select I8259
@@ -362,7 +362,7 @@ config MIPS_SEAD3
362 select CPU_MIPSR2_IRQ_EI 362 select CPU_MIPSR2_IRQ_EI
363 select DMA_NONCOHERENT 363 select DMA_NONCOHERENT
364 select IRQ_CPU 364 select IRQ_CPU
365 select IRQ_GIC 365 select MIPS_GIC
366 select LIBFDT 366 select LIBFDT
367 select MIPS_MSC 367 select MIPS_MSC
368 select SYS_HAS_CPU_MIPS32_R1 368 select SYS_HAS_CPU_MIPS32_R1
@@ -1073,10 +1073,6 @@ config IRQ_TXX9
1073config IRQ_GT641XX 1073config IRQ_GT641XX
1074 bool 1074 bool
1075 1075
1076config IRQ_GIC
1077 select MIPS_CM
1078 bool
1079
1080config PCI_GT64XXX_PCI0 1076config PCI_GT64XXX_PCI0
1081 bool 1077 bool
1082 1078
@@ -1890,7 +1886,7 @@ config FORCE_MAX_ZONEORDER
1890 1886
1891config CEVT_GIC 1887config CEVT_GIC
1892 bool "Use GIC global counter for clock events" 1888 bool "Use GIC global counter for clock events"
1893 depends on IRQ_GIC && !MIPS_SEAD3 1889 depends on MIPS_GIC && !MIPS_SEAD3
1894 help 1890 help
1895 Use the GIC global counter for the clock events. The R4K clock 1891 Use the GIC global counter for the clock events. The R4K clock
1896 event driver is always present, so if the platform ends up not 1892 event driver is always present, so if the platform ends up not
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index 008a2fed0584..3982e5138f61 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -68,7 +68,6 @@ obj-$(CONFIG_IRQ_CPU_RM7K) += irq-rm7000.o
68obj-$(CONFIG_MIPS_MSC) += irq-msc01.o 68obj-$(CONFIG_MIPS_MSC) += irq-msc01.o
69obj-$(CONFIG_IRQ_TXX9) += irq_txx9.o 69obj-$(CONFIG_IRQ_TXX9) += irq_txx9.o
70obj-$(CONFIG_IRQ_GT641XX) += irq-gt641xx.o 70obj-$(CONFIG_IRQ_GT641XX) += irq-gt641xx.o
71obj-$(CONFIG_IRQ_GIC) += irq-gic.o
72 71
73obj-$(CONFIG_KPROBES) += kprobes.o 72obj-$(CONFIG_KPROBES) += kprobes.o
74obj-$(CONFIG_32BIT) += scall32-o32.o 73obj-$(CONFIG_32BIT) += scall32-o32.o
diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c
index bc127e22fdab..5b8f8e32b47d 100644
--- a/arch/mips/kernel/cevt-r4k.c
+++ b/arch/mips/kernel/cevt-r4k.c
@@ -85,7 +85,7 @@ void mips_event_handler(struct clock_event_device *dev)
85 */ 85 */
86static int c0_compare_int_pending(void) 86static int c0_compare_int_pending(void)
87{ 87{
88#ifdef CONFIG_IRQ_GIC 88#ifdef CONFIG_MIPS_GIC
89 if (cpu_has_veic) 89 if (cpu_has_veic)
90 return gic_get_timer_pending(); 90 return gic_get_timer_pending();
91#endif 91#endif
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index 21f23add04f4..d60475fe5957 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -119,7 +119,7 @@ static void vsmp_send_ipi_single(int cpu, unsigned int action)
119 unsigned long flags; 119 unsigned long flags;
120 int vpflags; 120 int vpflags;
121 121
122#ifdef CONFIG_IRQ_GIC 122#ifdef CONFIG_MIPS_GIC
123 if (gic_present) { 123 if (gic_present) {
124 gic_send_ipi_single(cpu, action); 124 gic_send_ipi_single(cpu, action);
125 return; 125 return;
@@ -158,7 +158,7 @@ static void vsmp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
158 158
159static void vsmp_init_secondary(void) 159static void vsmp_init_secondary(void)
160{ 160{
161#ifdef CONFIG_IRQ_GIC 161#ifdef CONFIG_MIPS_GIC
162 /* This is Malta specific: IPI,performance and timer interrupts */ 162 /* This is Malta specific: IPI,performance and timer interrupts */
163 if (gic_present) 163 if (gic_present)
164 change_c0_status(ST0_IM, STATUSF_IP3 | STATUSF_IP4 | 164 change_c0_status(ST0_IM, STATUSF_IP3 | STATUSF_IP4 |
diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c
index a4e035c8acf6..17cfc8a379a6 100644
--- a/arch/mips/mti-malta/malta-time.c
+++ b/arch/mips/mti-malta/malta-time.c
@@ -70,7 +70,7 @@ static void __init estimate_frequencies(void)
70{ 70{
71 unsigned long flags; 71 unsigned long flags;
72 unsigned int count, start; 72 unsigned int count, start;
73#ifdef CONFIG_IRQ_GIC 73#ifdef CONFIG_MIPS_GIC
74 unsigned int giccount = 0, gicstart = 0; 74 unsigned int giccount = 0, gicstart = 0;
75#endif 75#endif
76 76
@@ -87,7 +87,7 @@ static void __init estimate_frequencies(void)
87 87
88 /* Initialize counters. */ 88 /* Initialize counters. */
89 start = read_c0_count(); 89 start = read_c0_count();
90#ifdef CONFIG_IRQ_GIC 90#ifdef CONFIG_MIPS_GIC
91 if (gic_present) 91 if (gic_present)
92 GICREAD(GIC_REG(SHARED, GIC_SH_COUNTER_31_00), gicstart); 92 GICREAD(GIC_REG(SHARED, GIC_SH_COUNTER_31_00), gicstart);
93#endif 93#endif
@@ -97,7 +97,7 @@ static void __init estimate_frequencies(void)
97 while (!(CMOS_READ(RTC_REG_A) & RTC_UIP)); 97 while (!(CMOS_READ(RTC_REG_A) & RTC_UIP));
98 98
99 count = read_c0_count(); 99 count = read_c0_count();
100#ifdef CONFIG_IRQ_GIC 100#ifdef CONFIG_MIPS_GIC
101 if (gic_present) 101 if (gic_present)
102 GICREAD(GIC_REG(SHARED, GIC_SH_COUNTER_31_00), giccount); 102 GICREAD(GIC_REG(SHARED, GIC_SH_COUNTER_31_00), giccount);
103#endif 103#endif
@@ -107,7 +107,7 @@ static void __init estimate_frequencies(void)
107 count -= start; 107 count -= start;
108 mips_hpt_frequency = count; 108 mips_hpt_frequency = count;
109 109
110#ifdef CONFIG_IRQ_GIC 110#ifdef CONFIG_MIPS_GIC
111 if (gic_present) { 111 if (gic_present) {
112 giccount -= gicstart; 112 giccount -= gicstart;
113 gic_frequency = giccount; 113 gic_frequency = giccount;
@@ -189,7 +189,7 @@ void __init plat_time_init(void)
189 setup_pit_timer(); 189 setup_pit_timer();
190#endif 190#endif
191 191
192#ifdef CONFIG_IRQ_GIC 192#ifdef CONFIG_MIPS_GIC
193 if (gic_present) { 193 if (gic_present) {
194 freq = freqround(gic_frequency, 5000); 194 freq = freqround(gic_frequency, 5000);
195 printk("GIC frequency %d.%02d MHz\n", freq/1000000, 195 printk("GIC frequency %d.%02d MHz\n", freq/1000000,
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index b21f12f1766d..f2dde146bbdb 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -125,3 +125,7 @@ config KEYSTONE_IRQ
125 help 125 help
126 Support for Texas Instruments Keystone 2 IRQ controller IP which 126 Support for Texas Instruments Keystone 2 IRQ controller IP which
127 is part of the Keystone 2 IPC mechanism 127 is part of the Keystone 2 IPC mechanism
128
129config MIPS_GIC
130 bool
131 select MIPS_CM
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index 173bb5fa2cc9..021833079c91 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -38,3 +38,4 @@ obj-$(CONFIG_IRQ_CROSSBAR) += irq-crossbar.o
38obj-$(CONFIG_BRCMSTB_L2_IRQ) += irq-brcmstb-l2.o \ 38obj-$(CONFIG_BRCMSTB_L2_IRQ) += irq-brcmstb-l2.o \
39 irq-bcm7120-l2.o 39 irq-bcm7120-l2.o
40obj-$(CONFIG_KEYSTONE_IRQ) += irq-keystone.o 40obj-$(CONFIG_KEYSTONE_IRQ) += irq-keystone.o
41obj-$(CONFIG_MIPS_GIC) += irq-mips-gic.o
diff --git a/arch/mips/kernel/irq-gic.c b/drivers/irqchip/irq-mips-gic.c
index 582883069ef6..582883069ef6 100644
--- a/arch/mips/kernel/irq-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c