zephyr/soc/snps/hsdk4xd/soc_ctrl.h
Evgeniy Paltsev 6d083cac7e Revert "arch: arc: replace ARC_EARLY_SOC_INIT with PLATFORM_RESET_HOOK"
The commit introduced regression for hsdk4xd platform.
The hsdk4xd SoC setup from soc_early_asm_init_percpu need to be done
in early code before any C code execution.

The current approach has multiple issues
 - we call function (which can be easily implemented in C for
   this or other SoC) from the place where we haven't setup stack
   pointer (so we can't use stack) - which is very error-prone
 - we never return back from soc_reset_hook on hsdk4xd platform

So let's just revert it for now. If any other ARC SoC need to use
soc_reset_hook - than it can be implemented properly.

This reverts commit 8c32a82e47.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2024-10-22 18:28:37 -04:00

18 lines
368 B
C

/*
* Copyright (c) 2023 Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _ARC_HSDK4XD_SOC_CTRL_H_
#define _ARC_HSDK4XD_SOC_CTRL_H_
#ifdef _ASMLANGUAGE
.macro soc_early_asm_init_percpu
mov r0, 1 /* disable LPB for HS4XD */
sr r0, [_ARC_V2_LPB_CTRL]
.endm
#endif /* _ASMLANGUAGE */
#endif /* _ARC_HSDK4XD_SOC_CTRL_H_ */