/* * The OMAP4 bus structure contains asynchronous bridges which can buffer * data writes from the MPU. These asynchronous bridges can be found on * paths between the MPU to EMIF, and the MPU to L3 interconnects. * * We need to be careful about re-ordering which can happen as a result * of different accesses being performed via different paths, and * therefore different asynchronous bridges.
*/
/* * OMAP4 interconnect barrier which is called for each mb() and wmb(). * This is to ensure that normal paths to DRAM (normal memory, cacheable * accesses) are properly synchronised with writes to DMA coherent memory * (normal memory, uncacheable) and device writes. * * The mb() and wmb() barriers only operate only on the MPU->MA->EMIF * path, as we need to ensure that data is visible to other system * masters prior to writes to those system masters being seen. * * Note: the SRAM path is not synchronised via mb() and wmb().
*/ staticvoid omap4_mb(void)
{ if (dram_sync)
writel_relaxed(0, dram_sync);
}
/* * OMAP4 Errata i688 - asynchronous bridge corruption when entering WFI. * * If a data is stalled inside asynchronous bridge because of back * pressure, it may be accepted multiple times, creating pointer * misalignment that will corrupt next transfers on that data path until * next reset of the system. No recovery procedure once the issue is hit, * the path remains consistently broken. * * Async bridges can be found on paths between MPU to EMIF and MPU to L3 * interconnects. * * This situation can happen only when the idle is initiated by a Master * Request Disconnection (which is trigged by software when executing WFI * on the CPU). * * The work-around for this errata needs all the initiators connected * through an async bridge to ensure that data path is properly drained * before issuing WFI. This condition will be met if one Strongly ordered * access is performed to the target right before executing the WFI. * * In MPU case, L3 T2ASYNC FIFO and DDR T2ASYNC FIFO needs to be drained. * IO barrier ensure that there is no synchronisation loss on initiators * operating on both interconnect port simultaneously. * * This is a stronger version of the OMAP4 memory barrier below, and * operates on both the MPU->MA->EMIF path but also the MPU->OCP path * as well, and is necessary prior to executing a WFI.
*/ void omap_interconnect_sync(void)
{ if (dram_sync && sram_sync) {
writel_relaxed(readl_relaxed(dram_sync), dram_sync);
writel_relaxed(readl_relaxed(sram_sync), sram_sync);
isb();
}
}
if (twd_int && !(gic_int & BIT(IRQ_LOCALTIMER))) { /* * The local timer interrupt got lost while the distributor was * disabled. Ack the pending interrupt, and retrigger it.
*/
pr_warn("%s: lost localtimer interrupt\n", __func__);
writel_relaxed(1, twd_base + TWD_TIMER_INTSTAT); if (!(twd_ctrl & TWD_TIMER_CONTROL_PERIODIC)) {
writel_relaxed(1, twd_base + TWD_TIMER_COUNTER);
twd_ctrl |= TWD_TIMER_CONTROL_ENABLE;
writel_relaxed(twd_ctrl, twd_base + TWD_TIMER_CONTROL);
}
}
}
/* * SAR RAM used to save and restore the HW context in low power modes. * Note that we need to initialize this very early for kexec. See * omap4_mpuss_early_init().
*/ void __init omap4_sar_ram_init(void)
{ unsignedlong sar_base;
/* * To avoid code running on other OMAPs in * multi-omap builds
*/ if (cpu_is_omap44xx())
sar_base = OMAP44XX_SAR_RAM_BASE; elseif (soc_is_omap54xx())
sar_base = OMAP54XX_SAR_RAM_BASE; else return;
/* Static mapping, never released */
sar_ram_base = ioremap(sar_base, SZ_16K); if (WARN_ON(!sar_ram_base)) return;
}
intc_node = of_find_matching_node(NULL, intc_match); if (WARN_ON(!intc_node)) {
pr_err("No WUGEN found in DT, system will misbehave.\n");
pr_err("UPDATE YOUR DEVICE TREE!\n");
}
/* Extract GIC distributor and TWD bases for OMAP4460 ROM Errata WA */ if (!cpu_is_omap446x()) goto skip_errata_init;
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.