/* * REVISIT: Linux doesn't have a good framework for the kind of performance * knobs this driver controls. We can't use device tree properties as it deals * with hardware configuration rather than description. We also don't want to * commit to maintaining some random sysfs attributes. * * For now we just hardcode the register values for the boards that need * some changes (as is the case for the LCD controller on da850-lcdk - the * first board we support here). When linux gets an appropriate framework, * we'll easily convert the driver to it.
*/
setting = da8xx_ddrctl_get_board_settings(); if (!setting) {
dev_err(dev, "no settings defined for this board\n"); return -EINVAL;
}
ddrctl = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(ddrctl)) {
dev_err(dev, "unable to map memory controller registers\n"); return PTR_ERR(ddrctl);
}
for (; setting->name; setting++) {
knob = da8xx_ddrctl_match_knob(setting); if (!knob) {
dev_warn(dev, "no such config option: %s\n", setting->name); continue;
}
if (knob->reg + sizeof(u32) > resource_size(res)) {
dev_warn(dev, "register offset of '%s' exceeds mapped memory size\n",
knob->name); continue;
}
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.