Confirmed on hardware that the chainload boots. The per-call blink instrumentation lived in hot paths (clk_enable/qcom_gate_clk_en/serial probe) and did a full 10 MiB framebuffer clear + cache flush on every call, noticeably slowing boot. Replaced with a single progress bar hooked once per INITCALL step (include/initcall.h) plus an explicit 100% draw at the end of board_late_init(), touching only the bar's rectangle instead of the whole screen. Kept the real fixes from the same patch (qcom,kalama-gcc-v2 GCC compatible, the IS_ERR(clk) handling in serial_msm_geni.c) untouched.
50 lines
1.1 KiB
C
50 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright (c) 2011 The Chromium OS Authors.
|
|
*/
|
|
|
|
#ifndef __INITCALL_H
|
|
#define __INITCALL_H
|
|
|
|
#include <asm/types.h>
|
|
#include <event.h>
|
|
#include <hang.h>
|
|
|
|
_Static_assert(EVT_COUNT < 256, "Can only support 256 event types with 8 bits");
|
|
|
|
#ifdef CONFIG_ARCH_SNAPDRAGON
|
|
void rtwo_boot_progress_step(void);
|
|
#define RTWO_BOOT_PROGRESS() rtwo_boot_progress_step()
|
|
#else
|
|
#define RTWO_BOOT_PROGRESS()
|
|
#endif
|
|
|
|
#define INITCALL(_call) \
|
|
do { \
|
|
RTWO_BOOT_PROGRESS(); \
|
|
if (_call()) { \
|
|
printf("%s(): initcall %s() failed\n", __func__, \
|
|
#_call); \
|
|
hang(); \
|
|
} \
|
|
} while (0)
|
|
|
|
#define INITCALL_EVT(_evt) \
|
|
do { \
|
|
if (event_notify_null(_evt)) { \
|
|
printf("%s(): event %d/%s failed\n", __func__, _evt, \
|
|
event_type_name(_evt)) ; \
|
|
hang(); \
|
|
} \
|
|
} while (0)
|
|
|
|
#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG)
|
|
#define WATCHDOG_INIT() INITCALL(init_func_watchdog_init)
|
|
#define WATCHDOG_RESET() INITCALL(init_func_watchdog_reset)
|
|
#else
|
|
#define WATCHDOG_INIT()
|
|
#define WATCHDOG_RESET()
|
|
#endif
|
|
|
|
#endif
|