// SPDX-License-Identifier: GPL-2.0-only /* * ARM Integrator Logical Module bus driver * Copyright (C) 2020 Linaro Ltd. * Author: Linus Walleij <linus.walleij@linaro.org> * * See the device tree bindings for this block for more details on the * hardware.
*/
base = INTEGRATOR_AP_EXP_BASE + (num * INTEGRATOR_AP_EXP_STRIDE);
/* Walk over the child nodes and see what chipselects we use */
for_each_available_child_of_node(np, child) { struct resource res;
ret = of_address_to_resource(child, 0, &res); if (ret) {
dev_info(dev, "no valid address on child\n"); continue;
}
/* First populate the syscon then any devices */ if (res.start == base) {
dev_info(dev, "populate module @0x%08x from DT\n",
base);
ret = of_platform_default_populate(child, NULL, dev); if (ret) {
dev_err(dev, "failed to populate module\n");
of_node_put(child); return ret;
}
}
}
/* Look up the system controller */
syscon = of_find_matching_node(NULL, integrator_ap_syscon_match); if (!syscon) {
dev_err(dev, "could not find Integrator/AP system controller\n"); return -ENODEV;
}
map = syscon_node_to_regmap(syscon);
of_node_put(syscon); if (IS_ERR(map)) {
dev_err(dev, "could not find Integrator/AP system controller\n"); return PTR_ERR(map);
}
ret = regmap_read(map, INTEGRATOR_SC_DEC_OFFSET, &val); if (ret) {
dev_err(dev, "could not read from Integrator/AP syscon\n"); return ret;
}
/* Loop over the connected modules */ for (i = 0; i < 4; i++) { if (!(val & BIT(4 + i))) continue;
dev_info(dev, "detected module in slot %d\n", i);
ret = integrator_lm_populate(i, dev); if (ret) return ret;
}
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.