/* * Reset the system. It is called by machine_restart().
*/ void mxc_restart(enum reboot_mode mode, constchar *cmd)
{ if (!wdog_base) goto reset_fallback;
if (!IS_ERR(wdog_clk))
clk_enable(wdog_clk);
/* Assert SRS signal */
imx_writew(wcr_enable, wdog_base); /* * Due to imx6q errata ERR004346 (WDOG: WDOG SRS bit requires to be * written twice), we add another two writes to ensure there must be at * least two writes happen in the same one 32kHz clock period. We save * the target check here, since the writes shouldn't be a huge burden * for other platforms.
*/
imx_writew(wcr_enable, wdog_base);
imx_writew(wcr_enable, wdog_base);
/* wait for reset to assert... */
mdelay(500);
pr_err("%s: Watchdog reset failed to assert reset\n", __func__);
/* delay to allow the serial port to show the message */
mdelay(50);
reset_fallback: /* we'll take a jump through zero as a poor second */
soft_restart(0);
}
np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache"); if (!np) return;
l2x0_base = of_iomap(np, 0); if (!l2x0_base) goto put_node;
if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { /* Configure the L2 PREFETCH and POWER registers */
val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
val |= L310_PREFETCH_CTRL_DBL_LINEFILL |
L310_PREFETCH_CTRL_INSTR_PREFETCH |
L310_PREFETCH_CTRL_DATA_PREFETCH;
/* Set perfetch offset to improve performance */
val &= ~L310_PREFETCH_CTRL_OFFSET_MASK;
val |= 15;
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.