summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8183
diff options
context:
space:
mode:
authorTristan Shieh <tristan.shieh@mediatek.com>2018-08-06 13:57:50 +0800
committerPatrick Georgi <pgeorgi@google.com>2018-08-13 12:17:45 +0000
commit9315a045cb28301dd6a45c070d64f5c3a26bcad4 (patch)
treed701295334e53fddcb1a2cace42a5922735c0598 /src/soc/mediatek/mt8183
parent128b0cf66ee2df3227c7099ffcf3deb2d335440a (diff)
mediatek/mt8183: Add DRAM resource in ramstage
Add DRAM resource in ramstage to load payload. BUG=b:80501386 TEST=Load bl31 and depthcharge correctly on Kukui with more patches applied. Change-Id: Ie793b403bbbdb3c231dfa2caef29dcbb596b1a61 Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com> Reviewed-on: https://review.coreboot.org/27971 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek/mt8183')
-rw-r--r--src/soc/mediatek/mt8183/soc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8183/soc.c b/src/soc/mediatek/mt8183/soc.c
index b8348a1457..b51e7d4653 100644
--- a/src/soc/mediatek/mt8183/soc.c
+++ b/src/soc/mediatek/mt8183/soc.c
@@ -14,7 +14,15 @@
*/
#include <device/device.h>
+#include <soc/emi.h>
#include <soc/mmu_operations.h>
+#include <symbols.h>
+
+
+static void soc_read_resources(struct device *dev)
+{
+ ram_resource(dev, 0, (uintptr_t)_dram / KiB, sdram_size() / KiB);
+}
static void soc_init(struct device *dev)
{
@@ -22,6 +30,7 @@ static void soc_init(struct device *dev)
}
static struct device_operations soc_ops = {
+ .read_resources = soc_read_resources,
.init = soc_init,
};