base = of_io_request_and_map(node, 0, "integrator-timer"); if (IS_ERR(base)) return PTR_ERR(base);
clk = of_clk_get(node, 0); if (IS_ERR(clk)) {
pr_err("No clock for %pOFn\n", node); return PTR_ERR(clk);
}
clk_prepare_enable(clk);
rate = clk_get_rate(clk);
writel(0, base + TIMER_CTRL);
err = of_property_read_string(of_aliases, "arm,timer-primary", &path); if (err) {
pr_warn("Failed to read property\n"); return err;
}
alias_node = of_find_node_by_path(path);
/* * The pointer is used as an identifier not as a pointer, we * can drop the refcount on the of__node immediately after * getting it.
*/
of_node_put(alias_node);
if (node == alias_node) /* The primary timer lacks IRQ, use as clocksource */ return integrator_clocksource_init(rate, base);
err = of_property_read_string(of_aliases, "arm,timer-secondary", &path); if (err) {
pr_warn("Failed to read property\n"); return err;
}
alias_node = of_find_node_by_path(path);
of_node_put(alias_node);
if (node == alias_node) { /* The secondary timer will drive the clock event */
irq = irq_of_parse_and_map(node, 0); return integrator_clockevent_init(rate, base, irq);
}
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.