ARM Sunxi Platform Development
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Cc: Tom Rini <trini@konsulko.com>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Cody Eksal <masterr3c0rd@epochal.quest>,
	Chris Morgan <macromorgan@hotmail.com>,
	linux-sunxi@lists.linux.dev
Subject: [PATCH 1/3] sunxi: a133: dram: fix data type for address variable
Date: Sat,  2 Aug 2025 00:49:16 +0100	[thread overview]
Message-ID: <20250801234918.19176-2-andre.przywara@arm.com> (raw)
In-Reply-To: <20250801234918.19176-1-andre.przywara@arm.com>

Variables holding addresses are typically using the "long" C type in
U-Boot, to be easily compatible with both 32-bit and 64-bit builds.

The A133 DRAM driver is typically compiled for AArch64, so u64 is the
same type as unsigned long, but that breaks when compiling the DRAM
driver in AArch32 (for some experiments).

Fix the type to make the code more portable.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm/mach-sunxi/dram_sun50i_a133.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-sunxi/dram_sun50i_a133.c b/arch/arm/mach-sunxi/dram_sun50i_a133.c
index 3a231141168..1496f99624d 100644
--- a/arch/arm/mach-sunxi/dram_sun50i_a133.c
+++ b/arch/arm/mach-sunxi/dram_sun50i_a133.c
@@ -416,7 +416,7 @@ static void mctl_com_init(const struct dram_para *para,
 static void mctl_drive_odt_config(const struct dram_para *para)
 {
 	u32 val;
-	u64 base;
+	ulong base;
 	u32 i;
 
 	/* DX drive */
-- 
2.46.3


  reply	other threads:[~2025-08-01 23:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-01 23:49 [PATCH 0/3] sunxi: assorted fixes to DRAM and clock init Andre Przywara
2025-08-01 23:49 ` Andre Przywara [this message]
2025-08-11 15:36   ` [PATCH 1/3] sunxi: a133: dram: fix data type for address variable Jernej Škrabec
2025-08-01 23:49 ` [PATCH 2/3] sunxi: spl: initialise timer before clocks Andre Przywara
2025-08-11 15:34   ` Jernej Škrabec
2025-08-11 15:52     ` Andre Przywara
2025-08-11 16:31       ` Jernej Škrabec
2025-08-11 23:01       ` Andre Przywara
2025-08-12  4:14   ` Jernej Škrabec
2025-08-01 23:49 ` [PATCH 3/3] sunxi: H616: dram: fix LPDDR3 mode register settings Andre Przywara
2025-08-11 15:49   ` Jernej Škrabec
2025-08-11 16:08     ` Andre Przywara
2025-08-11 16:28       ` Jernej Škrabec

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=20250801234918.19176-2-andre.przywara@arm.com \
    --to=andre.przywara@arm.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=macromorgan@hotmail.com \
    --cc=masterr3c0rd@epochal.quest \
    --cc=trini@konsulko.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