summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Lewis <sam.vr.lewis@gmail.com>2020-08-06 21:38:08 +1000
committerArthur Heymans <arthur@aheymans.xyz>2021-03-30 11:21:59 +0000
commitf1d196c4893a2e613b9cd50031324a1552fcdcc8 (patch)
tree822c371465bd93b732bc3d6b2340fb86db176f51
parent7cbf391bce785cf3a815dc6a841f80611b4db6fe (diff)
soc/ti/am335x: Map useable RAM
Maps the useable RAM so that it can be used for booting a payload. TEST: Booted a simple ELF payload (that just flashes LEDs) on the Beaglebone Black. Change-Id: I7f657c97e4753071c90ba8ca800a96108807e6b9 Signed-off-by: Sam Lewis <sam.vr.lewis@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/44388 Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/soc/ti/am335x/soc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/ti/am335x/soc.c b/src/soc/ti/am335x/soc.c
index 0362ed9c0c..99c651fd8b 100644
--- a/src/soc/ti/am335x/soc.c
+++ b/src/soc/ti/am335x/soc.c
@@ -1,7 +1,15 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <device/device.h>
+#include <symbols.h>
+#include <bootmem.h>
+
+static void soc_enable(struct device *dev)
+{
+ ram_resource(dev, 0, (uintptr_t)_dram / KiB, CONFIG_DRAM_SIZE_MB * MiB / KiB);
+}
struct chip_operations soc_ti_am335x_ops = {
CHIP_NAME("TI AM335X")
+ .enable_dev = soc_enable,
};