]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx8: Add a default reset_cpu() implementation
authorFabio Estevam <festevam@denx.de>
Tue, 26 Mar 2024 12:19:49 +0000 (09:19 -0300)
committerFabio Estevam <festevam@gmail.com>
Sat, 30 Mar 2024 16:57:14 +0000 (13:57 -0300)
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
arch/arm/mach-imx/imx8/cpu.c
board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c
board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
board/congatec/cgtqmx8/cgtqmx8.c
board/freescale/imx8qm_mek/imx8qm_mek.c
board/freescale/imx8qxp_mek/imx8qxp_mek.c
board/toradex/apalis-imx8/apalis-imx8.c
board/toradex/colibri-imx8x/colibri-imx8x.c

index 0b91e448a5d9241c8e336594bf4487e9f111ec16..6e643188f4028394ec575c726e358887eee5dcf2 100644 (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)
index 8b4d73052eb5f65fd7a982eb6ee11c213aaedb20..56b7bdb57c944347e3d94cc5e14b9f6dadca250f 100644 (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)
 {
index 206ce7d5c13ea1e8453c8a2d9524f47b7a0873ad..7f766a688bb5eaa713ef164499dd2c5c96983972 100644 (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;
index 26189ff66f586dd3843d85d90bb35e5bcadddf9a..3b01354bb6b0f4c685dfcb30b6e647d3d0380989 100644 (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)
index d96d1d07bb1e5120f99e24c1841eb677656b74a7..2b209c8886f2c15d853aa8ed7502d93aecb5bfa9 100644 (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)
 {
index 516cefd2f2468503e9587e12a885117ec657f63a..833bee55462d1757e4dda413e99df10cf8e7ffc4 100644 (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)
 {
index 49719f2f55330a4aae6ded851671a173d661050f..0f993e644d71b7cece48add5d26af96e06530af2 100644 (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)
 {
index 6fc8076163c6aa88adfddaf39679a9746b906526..a507d666c073f5c6e78009a50ecc87a48ad4f575 100644 (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)
 {