aboutsummaryrefslogtreecommitdiff
path: root/plat/hisilicon/poplar/include
diff options
context:
space:
mode:
authorVictor Chong <victor.chong@linaro.org>2018-01-29 18:11:02 +0900
committerVictor Chong <victor.chong@linaro.org>2018-02-08 02:14:46 +0900
commit8ad132b3f176d0552b28f1fe77f8d1321449b4ef (patch)
treeb7ce680b32adfeb7b60c7cb1c13774b6ae7f904c /plat/hisilicon/poplar/include
parentce2547f8d3e0fb526ea4a6bdffc4db8905106a30 (diff)
downloadtrusted-firmware-a-8ad132b3f176d0552b28f1fe77f8d1321449b4ef.tar.gz
poplar: Add build option for dram size
Signed-off-by: Victor Chong <victor.chong@linaro.org> Tested-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'plat/hisilicon/poplar/include')
-rw-r--r--plat/hisilicon/poplar/include/platform_def.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/plat/hisilicon/poplar/include/platform_def.h b/plat/hisilicon/poplar/include/platform_def.h
index c0f83711c3..941a84b504 100644
--- a/plat/hisilicon/poplar/include/platform_def.h
+++ b/plat/hisilicon/poplar/include/platform_def.h
@@ -39,9 +39,20 @@
#define MAX_IO_HANDLES (4)
#define MAX_IO_BLOCK_DEVICES (2)
+/* Memory size options */
+#define POPLAR_DRAM_SIZE_1G 0
+#define POPLAR_DRAM_SIZE_2G 1
+
/* Memory map related constants */
#define DDR_BASE (0x00000000)
+
+#if (POPLAR_DRAM_SIZE_ID == POPLAR_DRAM_SIZE_2G)
+#define DDR_SIZE (0x80000000)
+#elif (POPLAR_DRAM_SIZE_ID == POPLAR_DRAM_SIZE_1G)
#define DDR_SIZE (0x40000000)
+#else
+#error "Currently unsupported POPLAR_DRAM_SIZE_ID value"
+#endif
#define DEVICE_BASE (0xF0000000)
#define DEVICE_SIZE (0x0F000000)