summaryrefslogtreecommitdiff
path: root/src/soc/qualcomm/ipq806x/soc.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-06-26 14:12:54 +0300
committerFelix Held <felix-coreboot@felixheld.de>2022-06-30 16:27:34 +0000
commitf35c074ad4dc1916496b13524f6b453ef5cf2635 (patch)
treed89003d9441ab173d1d3de7c8db87a729f866623 /src/soc/qualcomm/ipq806x/soc.c
parentb20a714bfab30a530b7e96aea19042caac4e6645 (diff)
soc/qualcomm: Do resource transition
For ipq806x this fixes two resources getting declared with same index. The latter previously overwrote former. Change-Id: Ifee321d930d5433c824e2e977f1bb455766582f0 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55914 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/soc/qualcomm/ipq806x/soc.c')
-rw-r--r--src/soc/qualcomm/ipq806x/soc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/soc/qualcomm/ipq806x/soc.c b/src/soc/qualcomm/ipq806x/soc.c
index 481ffc8e72..ad0510f021 100644
--- a/src/soc/qualcomm/ipq806x/soc.c
+++ b/src/soc/qualcomm/ipq806x/soc.c
@@ -5,14 +5,16 @@
#include <symbols.h>
#include <soc/ipq_uart.h>
-#define RESERVED_SIZE_KB (0x01500000 / KiB)
+#define RESERVED_SIZE 0x01500000 /* 21 MiB */
static void soc_read_resources(struct device *dev)
{
- /* Reserve bottom 0x150_0000 bytes for NSS, SMEM, etc. */
- reserved_ram_resource_kb(dev, 0, (uintptr_t)_dram / KiB, RESERVED_SIZE_KB);
- ram_resource_kb(dev, 0, (uintptr_t)_dram / KiB + RESERVED_SIZE_KB,
- (CONFIG_DRAM_SIZE_MB * KiB) - RESERVED_SIZE_KB);
+ /* Reserve bottom 21 MiB for NSS, SMEM, etc. */
+ uintptr_t reserve_ram_end = (uintptr_t)_dram + RESERVED_SIZE;
+ uint64_t ram_end = CONFIG_DRAM_SIZE_MB * (uint64_t)MiB;
+
+ reserved_ram_from_to(dev, 0, (uintptr_t)_dram, reserve_ram_end);
+ ram_from_to(dev, 1, reserve_ram_end, ram_end);
}
static void soc_init(struct device *dev)