// SPDX-License-Identifier: GPL-2.0-or-later /* * Support for 'media5200-platform' compatible boards. * * Copyright (C) 2008 Secret Lab Technologies Ltd. * * Description: * This code implements support for the Freescape Media5200 platform * (built around the MPC5200 SoC). * * Notable characteristic of the Media5200 is the presence of an FPGA * that has all external IRQ lines routed through it. This file implements * a cascaded interrupt controller driver which attaches itself to the * Virtual IRQ subsystem after the primary mpc5200 interrupt controller * is initialized.
*/
/* Mask off the cascaded IRQ */
raw_spin_lock(&desc->lock);
chip->irq_mask(&desc->irq_data);
raw_spin_unlock(&desc->lock);
/* Ask the FPGA for IRQ status. If 'val' is 0, then no irqs
* are pending. 'ffs()' is 1 based */
status = in_be32(media5200_irq.regs + MEDIA5200_IRQ_ENABLE);
enable = in_be32(media5200_irq.regs + MEDIA5200_IRQ_STATUS);
val = ffs((status & enable) >> MEDIA5200_IRQ_SHIFT); if (val) {
generic_handle_domain_irq(media5200_irq.irqhost, val - 1); /* pr_debug("%s: virq=%i s=%.8x e=%.8x hwirq=%i\n", * __func__, virq, status, enable, val - 1);
*/
}
/* Processing done; can reenable the cascade now */
raw_spin_lock(&desc->lock);
chip->irq_ack(&desc->irq_data); if (!irqd_irq_disabled(&desc->irq_data))
chip->irq_unmask(&desc->irq_data);
raw_spin_unlock(&desc->lock);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.