30 #include <asm/machdep.h>
34 { .compatible =
"fsl,mpc5200-gpio", },
35 { .compatible =
"mpc5200-gpio", },
40 #define MEDIA5200_IRQ_ENABLE (0x40c)
41 #define MEDIA5200_IRQ_STATUS (0x410)
42 #define MEDIA5200_NUM_IRQS (6)
43 #define MEDIA5200_IRQ_SHIFT (32 - MEDIA5200_NUM_IRQS)
52 static void media5200_irq_unmask(
struct irq_data *
d)
64 static void media5200_irq_mask(
struct irq_data *
d)
76 static struct irq_chip media5200_irq_chip = {
77 .name =
"Media5200 FPGA",
78 .irq_unmask = media5200_irq_unmask,
79 .irq_mask = media5200_irq_mask,
80 .irq_mask_ack = media5200_irq_mask,
110 if (!irqd_irq_disabled(&desc->
irq_data))
115 static int media5200_irq_map(
struct irq_domain *
h,
unsigned int virq,
118 pr_debug(
"%s: h=%p, virq=%i, hwirq=%i\n", __func__, h, virq, (
int)hw);
126 const u32 *intspec,
unsigned int intsize,
128 unsigned int *out_flags)
133 pr_debug(
"%s: bank=%i, number=%i\n", __func__, intspec[0], intspec[1]);
134 *out_hwirq = intspec[1];
140 .map = media5200_irq_map,
141 .xlate = media5200_irq_xlate,
147 static void __init media5200_init_irq(
void)
169 pr_debug(
"%s: cascaded on virq=%i\n", __func__, cascade_virq);
180 pr_debug(
"%s: allocated irqhost\n", __func__);
188 pr_err(
"Could not find Media5200 FPGA; PCI interrupts will not work\n");
194 static void __init media5200_setup_arch(
void)
202 ppc_md.progress(
"media5200_setup_arch()", 0);
224 port_config &= ~0x03000000;
225 port_config |= 0x01000000;
243 static int __init media5200_probe(
void)
245 return of_flat_dt_match(of_get_flat_dt_root(),
board);
249 .name =
"media5200-platform",
250 .probe = media5200_probe,
251 .setup_arch = media5200_setup_arch,
253 .init_IRQ = media5200_init_irq,