/** * zynq_pm_ioremap() - Create IO mappings * @comp: DT compatible string * Return: Pointer to the mapped memory or NULL. * * Remap the memory region for a compatible DT node.
*/ staticvoid __iomem *zynq_pm_ioremap(constchar *comp)
{ struct device_node *np; void __iomem *base = NULL;
np = of_find_compatible_node(NULL, NULL, comp); if (np) {
base = of_iomap(np, 0);
of_node_put(np);
} else {
pr_warn("%s: no compatible node found for '%s'\n", __func__,
comp);
}
return base;
}
/** * zynq_pm_late_init() - Power management init * * Initialization of power management related features and infrastructure.
*/ void __init zynq_pm_late_init(void)
{
u32 reg;
ddrc_base = zynq_pm_ioremap("xlnx,zynq-ddrc-a05"); if (!ddrc_base) {
pr_warn("%s: Unable to map DDRC IO memory.\n", __func__);
} else { /* * Enable DDRC clock stop feature. The HW takes care of * entering/exiting the correct mode depending * on activity state.
*/
reg = readl(ddrc_base + DDRC_DRAM_PARAM_REG3_OFFS);
reg |= DDRC_CLOCKSTOP_MASK;
writel(reg, ddrc_base + DDRC_DRAM_PARAM_REG3_OFFS);
}
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet)
¤
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.