[PATCH 2/2] arm: rmobile: Remove duplicate code from beacon-rzg2m and hihope-rzg2
Adam Ford
aford173 at gmail.com
Fri Aug 27 22:57:18 CEST 2021
With reset_cpu() now existing in common code, there is no need to
have this exist in each board.
Signed-off-by: Adam Ford <aford173 at gmail.com>
diff --git a/board/beacon/beacon-rzg2m/beacon-rzg2m.c b/board/beacon/beacon-rzg2m/beacon-rzg2m.c
index c12ff77fb2..f5146594b5 100644
--- a/board/beacon/beacon-rzg2m/beacon-rzg2m.c
+++ b/board/beacon/beacon-rzg2m/beacon-rzg2m.c
@@ -27,12 +27,3 @@ int board_init(void)
return 0;
}
-
-#define RST_BASE 0xE6160000
-#define RST_CA57RESCNT (RST_BASE + 0x40)
-#define RST_CODE 0xA5A5000F
-
-void reset_cpu(void)
-{
- writel(RST_CODE, RST_CA57RESCNT);
-}
diff --git a/board/hoperun/hihope-rzg2/hihope-rzg2.c b/board/hoperun/hihope-rzg2/hihope-rzg2.c
index c1db387b27..59e124c829 100644
--- a/board/hoperun/hihope-rzg2/hihope-rzg2.c
+++ b/board/hoperun/hihope-rzg2/hihope-rzg2.c
@@ -16,12 +16,6 @@
#include <linux/delay.h>
#include <linux/libfdt.h>
-#define RST_BASE 0xE6160000
-#define RST_CA57RESCNT (RST_BASE + 0x40)
-#define RST_CA53RESCNT (RST_BASE + 0x44)
-#define RST_CA57_CODE 0xA5A5000F
-#define RST_CA53_CODE 0x5A5A000F
-
DECLARE_GLOBAL_DATA_PTR;
#define HSUSB_MSTP704 BIT(4) /* HSUSB */
@@ -65,19 +59,6 @@ int board_init(void)
return 0;
}
-void reset_cpu(void)
-{
- unsigned long midr, cputype;
-
- asm volatile("mrs %0, midr_el1" : "=r" (midr));
- cputype = (midr >> 4) & 0xfff;
-
- if (cputype == 0xd03)
- writel(RST_CA53_CODE, RST_CA53RESCNT);
- else
- writel(RST_CA57_CODE, RST_CA57RESCNT);
-}
-
#if defined(CONFIG_MULTI_DTB_FIT)
/* If the firmware passed a device tree, use it for board identification. */
extern u64 rcar_atf_boot_args[];
--
2.25.1
More information about the U-Boot
mailing list