summaryrefslogtreecommitdiff
path: root/include/plat/common
diff options
context:
space:
mode:
authorYann Gautier <yann.gautier@st.com>2022-02-08 10:21:58 +0100
committerYann Gautier <yann.gautier@st.com>2022-02-08 10:49:36 +0100
commit1af59c457010e6e3e6536752736eb02115bca543 (patch)
treef5cf7c2d83787d494f12dddc3c302a52b0417673 /include/plat/common
parentacd0e9bf64c4d270bc632eca99aa54a54d0e071a (diff)
downloadarm-trusted-firmware-1af59c457010e6e3e6536752736eb02115bca543.tar.gz
feat(common): add SZ_* macros
Add the SZ_* macros from 32 to 2G. This allows removing some defines in raw NAND driver and STM32MP1 boot device selection code. Change-Id: I3c4d4959b0f43e785eeb37a43d03b2906b7fcfbc Signed-off-by: Yann Gautier <yann.gautier@st.com> Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com> Signed-off-by: Arpita S.K <Arpita.S.K@arm.com>
Diffstat (limited to 'include/plat/common')
-rw-r--r--include/plat/common/common_def.h37
1 files changed, 34 insertions, 3 deletions
diff --git a/include/plat/common/common_def.h b/include/plat/common/common_def.h
index 632f1229c..1d3ac15f4 100644
--- a/include/plat/common/common_def.h
+++ b/include/plat/common/common_def.h
@@ -1,17 +1,48 @@
/*
- * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2022, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef COMMON_DEF_H
#define COMMON_DEF_H
-#include <platform_def.h>
-
#include <common/bl_common.h>
#include <lib/utils_def.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
+#include <platform_def.h>
+
+#define SZ_32 U(0x00000020)
+#define SZ_64 U(0x00000040)
+#define SZ_128 U(0x00000080)
+#define SZ_256 U(0x00000100)
+#define SZ_512 U(0x00000200)
+
+#define SZ_1K U(0x00000400)
+#define SZ_2K U(0x00000800)
+#define SZ_4K U(0x00001000)
+#define SZ_8K U(0x00002000)
+#define SZ_16K U(0x00004000)
+#define SZ_32K U(0x00008000)
+#define SZ_64K U(0x00010000)
+#define SZ_128K U(0x00020000)
+#define SZ_256K U(0x00040000)
+#define SZ_512K U(0x00080000)
+
+#define SZ_1M U(0x00100000)
+#define SZ_2M U(0x00200000)
+#define SZ_4M U(0x00400000)
+#define SZ_8M U(0x00800000)
+#define SZ_16M U(0x01000000)
+#define SZ_32M U(0x02000000)
+#define SZ_64M U(0x04000000)
+#define SZ_128M U(0x08000000)
+#define SZ_256M U(0x10000000)
+#define SZ_512M U(0x20000000)
+
+#define SZ_1G U(0x40000000)
+#define SZ_2G U(0x80000000)
+
/******************************************************************************
* Required platform porting definitions that are expected to be common to
* all platforms