irqc = kzalloc(sizeof(*irqc), GFP_KERNEL); if (!irqc) return -ENOMEM;
irqc->base = of_iomap(intc, 0); if (!irqc->base) {
pr_err("Unable to map registers\n");
ret = -ENXIO; goto err_free;
}
rst = of_reset_control_get_exclusive(intc, NULL); if (IS_ERR(rst)) {
pr_err("Unable to get reset control %pe\n", rst);
ret = PTR_ERR(rst); goto err_unmap;
}
clk = of_clk_get(intc, 0); if (IS_ERR(clk)) {
pr_err("Unable to get clock %pe\n", clk);
ret = PTR_ERR(clk); goto err_reset_put;
}
ret = reset_control_deassert(rst); if (ret) goto err_clk_put;
ret = clk_prepare_enable(clk); if (ret) goto err_reset_assert;
raw_spin_lock_init(&irqc->lock);
irqc->domain = irq_domain_create_linear(of_fwnode_handle(intc), STARFIVE_INTC_SRC_IRQ_NUM,
&starfive_intc_domain_ops, irqc); if (!irqc->domain) {
pr_err("Unable to create IRQ domain\n");
ret = -EINVAL; goto err_clk_disable;
}
parent_irq = of_irq_get(intc, 0); if (parent_irq < 0) {
pr_err("Failed to get main IRQ: %d\n", parent_irq);
ret = parent_irq; goto err_remove_domain;
}
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.