/* * Synopsys DW APB ICTL irqchip driver. * * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> * * based on GPL'ed 2.6 kernel sources * (c) Marvell International Ltd. * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied.
*/
if (!parent) { /* Used as the primary interrupt controller */
parent_irq = 0;
domain_ops = &dw_apb_ictl_irq_domain_ops;
} else { /* Map the parent interrupt for the chained handler */
parent_irq = irq_of_parse_and_map(np, 0); if (parent_irq <= 0) {
pr_err("%pOF: unable to parse irq\n", np); return -EINVAL;
}
domain_ops = &irq_generic_chip_ops;
}
ret = of_address_to_resource(np, 0, &r); if (ret) {
pr_err("%pOF: unable to get resource\n", np); return ret;
}
if (!request_mem_region(r.start, resource_size(&r), np->full_name)) {
pr_err("%pOF: unable to request mem region\n", np); return -ENOMEM;
}
iobase = ioremap(r.start, resource_size(&r)); if (!iobase) {
pr_err("%pOF: unable to map resource\n", np);
ret = -ENOMEM; goto err_release;
}
/* * DW IP can be configured to allow 2-64 irqs. We can determine * the number of irqs supported by writing into enable register * and look for bits not set, as corresponding flip-flops will * have been removed by synthesis tool.
*/
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.