mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] fixup! ARM: rockchip: rk3588: add memsize detection
Date: Mon, 22 May 2023 07:13:54 +0200	[thread overview]
Message-ID: <20230522051354.1035717-1-a.fatoum@pengutronix.de> (raw)

Extension of the Rockchip DMC driver for RK3588 support broke the
existing support for RK3566. Patch that up.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/mach-rockchip/dmc.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-rockchip/dmc.c b/arch/arm/mach-rockchip/dmc.c
index 85fa8acd192f..630f0f6b7347 100644
--- a/arch/arm/mach-rockchip/dmc.c
+++ b/arch/arm/mach-rockchip/dmc.c
@@ -25,6 +25,7 @@
 
 #define RK3399_INT_REG_START		0xf0000000
 #define RK3568_INT_REG_START		RK3399_INT_REG_START
+#define RK3588_INT_REG_START		RK3568_INT_REG_START
 
 struct rockchip_dmc_drvdata {
 	unsigned int os_reg2;
@@ -228,11 +229,17 @@ static const struct rockchip_dmc_drvdata rk3399_drvdata = {
 };
 
 static const struct rockchip_dmc_drvdata rk3568_drvdata = {
+	.os_reg2 = RK3568_PMUGRF_OS_REG2,
+	.os_reg3 = RK3568_PMUGRF_OS_REG3,
+	.internal_registers_start = RK3568_INT_REG_START,
+};
+
+static const struct rockchip_dmc_drvdata rk3588_drvdata = {
 	.os_reg2 = RK3588_PMUGRF_OS_REG2,
 	.os_reg3 = RK3588_PMUGRF_OS_REG3,
 	.os_reg4 = RK3588_PMUGRF_OS_REG4,
 	.os_reg5 = RK3588_PMUGRF_OS_REG5,
-	.internal_registers_start = RK3568_INT_REG_START,
+	.internal_registers_start = RK3588_INT_REG_START,
 };
 
 static struct of_device_id rockchip_dmc_dt_ids[] = {
@@ -246,7 +253,7 @@ static struct of_device_id rockchip_dmc_dt_ids[] = {
 	},
 	{
 		.compatible = "rockchip,rk3588-dmc",
-		.data = &rk3568_drvdata,
+		.data = &rk3588_drvdata,
 	},
 	{ /* sentinel */ }
 };
-- 
2.39.2




                 reply	other threads:[~2023-05-22  5:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230522051354.1035717-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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