/* * Apple Watchdog MMIO registers * * This HW block has three separate watchdogs. WD0 resets the machine * to recovery mode and is not very useful for us. WD1 and WD2 trigger a normal * machine reset. WD0 additionally supports a configurable interrupt. * This information can be used to implement pretimeout support at a later time. * * APPLE_WDT_WDx_CUR_TIME is a simple counter incremented for each tick of the * reference clock. It can also be overwritten to any value. * Whenever APPLE_WDT_CTRL_RESET_EN is set in APPLE_WDT_WDx_CTRL and * APPLE_WDT_WDx_CUR_TIME >= APPLE_WDT_WDx_BITE_TIME the entire machine is * reset. * Whenever APPLE_WDT_CTRL_IRQ_EN is set and APPLE_WDTx_WD1_CUR_TIME >= * APPLE_WDTx_WD1_BARK_TIME an interrupt is triggered and * APPLE_WDT_CTRL_IRQ_STATUS is set. The interrupt can be cleared by writing * 1 to APPLE_WDT_CTRL_IRQ_STATUS.
*/ #define APPLE_WDT_WD0_CUR_TIME 0x00 #define APPLE_WDT_WD0_BITE_TIME 0x04 #define APPLE_WDT_WD0_BARK_TIME 0x08 #define APPLE_WDT_WD0_CTRL 0x0c
/* * Flush writes and then wait for the SoC to reset. Even though the * reset is queued almost immediately experiments have shown that it * can take up to ~120-125ms until the SoC is actually reset. Just * wait 150ms here to be safe.
*/
(void)readl(wdt->regs + APPLE_WDT_WD1_CUR_TIME);
mdelay(150);
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.