aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBin Meng <bin.meng@windriver.com>2020-08-18 01:09:21 -0700
committerAndes <uboot@andestech.com>2020-08-25 09:33:16 +0800
commit3ab260105214d56a419c84e6dacbb8ae514548f1 (patch)
tree67d7f55e8288ac322ed8ea774733ee942e1384ac /drivers
parent52dc7ae74918d01fa55ca103841a0eaa0dfa7409 (diff)
downloadu-boot-3ab260105214d56a419c84e6dacbb8ae514548f1.zip
u-boot-3ab260105214d56a419c84e6dacbb8ae514548f1.tar.gz
u-boot-3ab260105214d56a419c84e6dacbb8ae514548f1.tar.bz2
ram: sifive: Fix compiler warnings for 32-bit
priv->info.size is of type 'size_t' but the length modifier is l. Fix this by casting priv->info.size. Note 'z' cannot be used as the modifier as SPL does not support that. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Pragnesh Patel <pragnesh.patel@openfive.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ram/sifive/fu540_ddr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ram/sifive/fu540_ddr.c b/drivers/ram/sifive/fu540_ddr.c
index 2eef1e7..5ff8869 100644
--- a/drivers/ram/sifive/fu540_ddr.c
+++ b/drivers/ram/sifive/fu540_ddr.c
@@ -316,12 +316,12 @@ static int fu540_ddr_setup(struct udevice *dev)
priv->info.size = get_ram_size((long *)priv->info.base,
ddr_size);
- debug("%s : %lx\n", __func__, priv->info.size);
+ debug("%s : %lx\n", __func__, (uintptr_t)priv->info.size);
/* check memory access for all memory */
if (priv->info.size != ddr_size) {
printf("DDR invalid size : 0x%lx, expected 0x%lx\n",
- priv->info.size, (uintptr_t)ddr_size);
+ (uintptr_t)priv->info.size, (uintptr_t)ddr_size);
return -EINVAL;
}