imx8: Add a default reset_cpu() implementation
Subsystems (3)
Fabio Estevam
reviewerPATCH 1/1 imx8: Add a default reset_cpu() implementation
From: Fabio Estevam <[email protected]>
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 <[email protected]>
--- arch/arm/mach-imx/imx8/cpu.c | 4 ++++ board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c | 11 ----------- board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c | 8 -------- board/congatec/cgtqmx8/cgtqmx8.c | 7 ------- board/freescale/imx8qm_mek/imx8qm_mek.c | 8 -------- board/freescale/imx8qxp_mek/imx8qxp_mek.c | 8 -------- board/toradex/apalis-imx8/apalis-imx8.c | 8 -------- board/toradex/colibri-imx8x/colibri-imx8x.c | 8 -------- 8 files changed, 4 insertions(+), 58 deletions(-)
arch/arm/mach-imx/imx8/cpu.c +4 -0
@@ -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 )
board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c +0 -11
@@ -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) {
board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c +0 -8
@@ -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;
board/congatec/cgtqmx8/cgtqmx8.c +0 -7
@@ -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)
board/freescale/imx8qm_mek/imx8qm_mek.c +0 -8
@@ -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) {
board/freescale/imx8qxp_mek/imx8qxp_mek.c +0 -8
@@ -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) {
board/toradex/apalis-imx8/apalis-imx8.c +0 -8
@@ -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) {
board/toradex/colibri-imx8x/colibri-imx8x.c +0 -8
@@ -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) {
Signature · 1 line
2.34.1
Quoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Add a weak default
reset_cpu()implementation just like it is done onarch/arm/mach-imx/cpu.c.This allows the removal of the empty
reset_cpu()in several board files.Signed-off-by Fabio Estevam <[email protected]>
Thanks Fabio!
Quoted 164 lines
--- arch/arm/mach-imx/imx8/cpu.c | 4 ++++ board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c | 11 ----------- board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c | 8 -------- board/congatec/cgtqmx8/cgtqmx8.c | 7 ------- board/freescale/imx8qm_mek/imx8qm_mek.c | 8 -------- board/freescale/imx8qxp_mek/imx8qxp_mek.c | 8 -------- board/toradex/apalis-imx8/apalis-imx8.c | 8 -------- board/toradex/colibri-imx8x/colibri-imx8x.c | 8 -------- 8 files changed, 4 insertions(+), 58 deletions(-)arch/arm/mach-imx/imx8/cpu.c +4
-0@@ -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 )board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c +0
-11@@ -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) {board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c +0
-8@@ -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;board/congatec/cgtqmx8/cgtqmx8.c +0
-7@@ -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)board/freescale/imx8qm_mek/imx8qm_mek.c +0
-8@@ -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) {board/freescale/imx8qxp_mek/imx8qxp_mek.c +0
-8@@ -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) {board/toradex/apalis-imx8/apalis-imx8.c +0
-8@@ -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) {board/toradex/colibri-imx8x/colibri-imx8x.c +0
-8@@ -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) {Signature · 1 line
2.34.1
Fabio Estevam
reviewerQuoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Add a weak default
reset_cpu()implementation just like it is done onarch/arm/mach-imx/cpu.c.This allows the removal of the empty
reset_cpu()in several board files.Signed-off-by Fabio Estevam <[email protected]>
Applied to u-boot-imx/next, thanks.