/* * SPDX-License-Identifier: Apache-2.0 * * Copyright (c) 2024 Realtek Semiconductor Corporation, SIBG-SD7 * Author: Lin Yu-Cheng / Titan Chen */ #include #include #include #include #include "debug_swj.h" LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL); #if defined(CONFIG_RTS5912_ON_ENTER_CPU_IDLE_HOOK) bool z_arm_on_enter_cpu_idle(void) { /* Returning false prevent device goes to sleep mode */ return false; } #endif /** * @brief Perform basic hardware initialization at boot. * * This needs to be run from the very beginning. */ void soc_early_init_hook(void) { if (!IS_ENABLED(CONFIG_RTS5912_DEBUG_SWJ)) { return; } int ret; /* Apply device related preinit configuration */ ret = swj_connector_init(); if (ret < 0) { LOG_ERR("SWJ init failed"); } }