diff --git a/common/main.c b/common/main.c index 4b4504557f6..794d4a46b97 100644 --- a/common/main.c +++ b/common/main.c @@ -5,7 +5,8 @@ */ /* #define DEBUG */ - +#include +#include #include #include #include @@ -44,6 +45,26 @@ void main_loop(void) { const char *s; + /* TEMPORARY bring-up diagnostics (krane Round 26) — do not upstream: + * light-gray band = main_loop entered; U-Boot init fully done. */ + { + u32 base = readl((void __iomem *)0x14008f40); + + if (base >= 0x40000000) { + u32 *p = (u32 *)(uintptr_t)(base + 900ULL * 4800); + int i; + + if (dcache_status()) + mmu_map_region(base, 0x8ca000, false); + for (i = 0; i < 40 * 1200; i++) + p[i] = 0x00c0c0c0; + if (dcache_status()) + flush_dcache_range((uintptr_t)p, + (uintptr_t)(p + 40 * 1200)); + } + } + /* end TEMPORARY diagnostics */ + bootstage_mark_name(BOOTSTAGE_ID_MAIN_LOOP, "main_loop"); if (IS_ENABLED(CONFIG_VERSION_VARIABLE)) diff --git a/configs/mt8183_kukui_krane_defconfig b/configs/mt8183_kukui_krane_defconfig index 7dc9bc4c453..df0d3221a16 100644 --- a/configs/mt8183_kukui_krane_defconfig +++ b/configs/mt8183_kukui_krane_defconfig @@ -74,6 +74,7 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_MTK_SERIAL=y CONFIG_WDT=y +# CONFIG_WATCHDOG_AUTOSTART is not set CONFIG_WDT_MTK=y # CONFIG_RANDOM_UUID is not set # CONFIG_REGEX is not set