imx8: Add a default reset_cpu() implementation

Add a weak default reset_cpu() implementation just like
it is done on arch/arm/mach-imx/cpu.c.

This allows the removal of the empty reset_cpu() in several
board files.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Tested-by: Hiago De Franco <hiago.franco@toradex.com> # Toradex Colibri iMX8X
This commit is contained in:
Fabio Estevam 2024-03-26 09:19:49 -03:00 committed by Fabio Estevam
parent 77dd945b2c
commit f8b874f542
8 changed files with 4 additions and 58 deletions

View File

@ -84,6 +84,10 @@ static char *get_reset_cause(void)
}
}
__weak void reset_cpu(void)
{
}
int arch_cpu_init(void)
{
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_RECOVER_DATA_SECTION)

View File

@ -136,17 +136,6 @@ void detail_board_ddr_info(void)
puts("\nDDR ");
}
/*
* Board specific reset that is system reset.
*/
void reset_cpu(void)
{
puts("SCI reboot request");
while (1)
putc('.');
}
#ifdef CONFIG_OF_BOARD_SETUP
int ft_board_setup(void *blob, struct bd_info *bd)
{

View File

@ -112,14 +112,6 @@ int board_init(void)
return 0;
}
/*
* Board specific reset that is system reset.
*/
void reset_cpu(void)
{
/* TODO */
}
int board_mmc_get_env_dev(int devno)
{
return devno;

View File

@ -371,13 +371,6 @@ void detail_board_ddr_info(void)
puts("\nDDR ");
}
/*
* Board specific reset that is system reset.
*/
void reset_cpu(void)
{
/* TODO */
}
#ifdef CONFIG_OF_BOARD_SETUP
int ft_board_setup(void *blob, struct bd_info *bd)

View File

@ -102,14 +102,6 @@ int board_init(void)
return 0;
}
/*
* Board specific reset that is system reset.
*/
void reset_cpu(void)
{
/* TODO */
}
#ifdef CONFIG_OF_BOARD_SETUP
int ft_board_setup(void *blob, struct bd_info *bd)
{

View File

@ -126,14 +126,6 @@ int board_init(void)
return 0;
}
/*
* Board specific reset that is system reset.
*/
void reset_cpu(void)
{
/* TODO */
}
#ifdef CONFIG_OF_BOARD_SETUP
int ft_board_setup(void *blob, struct bd_info *bd)
{

View File

@ -291,14 +291,6 @@ int board_init(void)
return 0;
}
/*
* Board specific reset that is system reset.
*/
void reset_cpu(void)
{
/* TODO */
}
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
int ft_board_setup(void *blob, struct bd_info *bd)
{

View File

@ -140,14 +140,6 @@ int board_init(void)
return 0;
}
/*
* Board specific reset that is system reset.
*/
void reset_cpu(void)
{
/* TODO */
}
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
int ft_board_setup(void *blob, struct bd_info *bd)
{