summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2015-04-17 05:44:15 -0400
committerRalf Baechle <ralf@linux-mips.org>2015-07-10 05:02:18 -0400
commit6249ecbbb75cd635025cc681fcf51fb8659edbab (patch)
tree3b83c08082dc43bfefec533245ddac0c1c0c6ea4 /arch/mips
parentcccf34e9411c41b0cbfb41980fe55fc8e7c98fd2 (diff)
MIPS: Malta: Make GIC FDC IRQ workaround Malta specific
Wider testing reveals that the Fast Debug Channel (FDC) interrupt is routed through the GIC just fine on Pistachio SoC, even though it contains interAptiv cores. Clearly the FDC interrupt routing problems previously observed on interAptiv and proAptiv cores are specific to the Malta FPGA bitstreams. Move the workaround for interAptiv and proAptiv out of gic_get_c0_fdc_int() in the GIC irqchip driver into Malta's get_c0_fdc_int() platform callback, to allow the Pistachio SoC to use the FDC interrupt. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Andrew Bresticker <abrestic@chromium.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: linux-mips@linux-mips.org Reviewed-by: Andrew Bresticker <abrestic@chromium.org> Cc: James Hartley <james.hartley@imgtec.com> Patchwork: http://patchwork.linux-mips.org/patch/9748/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/mti-malta/malta-time.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c
index 185e68261f45..5625b190edc0 100644
--- a/arch/mips/mti-malta/malta-time.c
+++ b/arch/mips/mti-malta/malta-time.c
@@ -119,18 +119,24 @@ void read_persistent_clock(struct timespec *ts)
119 119
120int get_c0_fdc_int(void) 120int get_c0_fdc_int(void)
121{ 121{
122 int mips_cpu_fdc_irq; 122 /*
123 * Some cores claim the FDC is routable through the GIC, but it doesn't
124 * actually seem to be connected for those Malta bitstreams.
125 */
126 switch (current_cpu_type()) {
127 case CPU_INTERAPTIV:
128 case CPU_PROAPTIV:
129 return -1;
130 };
123 131
124 if (cpu_has_veic) 132 if (cpu_has_veic)
125 mips_cpu_fdc_irq = -1; 133 return -1;
126 else if (gic_present) 134 else if (gic_present)
127 mips_cpu_fdc_irq = gic_get_c0_fdc_int(); 135 return gic_get_c0_fdc_int();
128 else if (cp0_fdc_irq >= 0) 136 else if (cp0_fdc_irq >= 0)
129 mips_cpu_fdc_irq = MIPS_CPU_IRQ_BASE + cp0_fdc_irq; 137 return MIPS_CPU_IRQ_BASE + cp0_fdc_irq;
130 else 138 else
131 mips_cpu_fdc_irq = -1; 139 return -1;
132
133 return mips_cpu_fdc_irq;
134} 140}
135 141
136int get_c0_perfcount_int(void) 142int get_c0_perfcount_int(void)