summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/imx8m/soc.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-04-22 08:12:20 -0400
committerTom Rini <trini@konsulko.com>2022-04-22 08:12:20 -0400
commit6e2af641e4bfed24d3edd8519dd40ec397361b4e (patch)
treed387bc01229acd9db9d344f9c8240ce3b852f6fc /arch/arm/mach-imx/imx8m/soc.c
parentea5583b90f9c162af6f2025718dc50ffbb6e4552 (diff)
parentd173b107be94eb474e1ae75a8addbf5f2fecfd56 (diff)
Merge tag 'u-boot-imx-20220422' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
u-boot-imx-20220422 ------------------- - Switch to DM_SERIAL - Drop MMCROOT - several cleanup CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/11815
Diffstat (limited to 'arch/arm/mach-imx/imx8m/soc.c')
-rw-r--r--arch/arm/mach-imx/imx8m/soc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index 7059d87e336..8e23e6da326 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -331,7 +331,7 @@ phys_size_t get_effective_memsize(void)
ulong board_get_usable_ram_top(ulong total_size)
{
- ulong top_addr = PHYS_SDRAM + gd->ram_size;
+ ulong top_addr;
/*
* Some IPs have their accessible address space restricted by
@@ -339,8 +339,7 @@ ulong board_get_usable_ram_top(ulong total_size)
* space below the 4G address boundary (which is 3GiB big),
* even when the effective available memory is bigger.
*/
- if (top_addr > 0x80000000)
- top_addr = 0x80000000;
+ top_addr = clamp_val((u64)PHYS_SDRAM + gd->ram_size, 0, 0xffffffff);
/*
* rom_pointer[0] stores the TEE memory start address.