public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Adam Ford <aford173@gmail.com>
To: u-boot@lists.denx.de
Cc: marek.vasut+renesas@gmail.com, biju.das.jz@bp.renesas.com,
	Adam Ford <aford173@gmail.com>
Subject: [PATCH 2/2] arm: rmobile: Remove duplicate code from beacon-rzg2m and hihope-rzg2
Date: Fri, 27 Aug 2021 15:57:18 -0500	[thread overview]
Message-ID: <20210827205718.536008-2-aford173@gmail.com> (raw)
In-Reply-To: <20210827205718.536008-1-aford173@gmail.com>

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@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


  reply	other threads:[~2021-08-27 20:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27 20:57 [PATCH 1/2] arm: mach-rmobile: Move cpu_reset to rzg2-reset.c Adam Ford
2021-08-27 20:57 ` Adam Ford [this message]
2021-08-29 16:22 ` Marek Vasut
2021-08-30 17:52   ` Adam Ford
2021-08-30 17:58     ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210827205718.536008-2-aford173@gmail.com \
    --to=aford173@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=marek.vasut+renesas@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox